[NATIVE_CPU][SYCL] Switch to using native_cpu compiler pipeline inline instead of OCK fetchContent#19886
Merged
Merged
Conversation
e6122d8 to
5f8574c
Compare
5f8574c to
729e7b5
Compare
729e7b5 to
63d7eb8
Compare
63d7eb8 to
0b99891
Compare
0b99891 to
087ecb6
Compare
087ecb6 to
dd1785f
Compare
There are multiple references which are not publicly visible. Remove the ones under compiler_pipeline and vecz as part of this process.
* Obtain lifetime_(start|end) pointer argument by getting last argument. * Do not update size argument when there is no size argument. * Update tests.
We were generating undef in many places because in older versions of LLVM, poison did not yet exist. As we no longer support those older versions of LLVM, and current LLVM is deprecating undef, switch over to poison.
We were using 'and' to filter branch conditions, trusting that if an entry mask had it set to false, it would assuredly be kept false. This does not work when a branch condition is computed as 'poison', as 'false and poison' evaluates to 'poison', not 'false'. We can generate 'select' instructions instead, which avoid this problem.
Further updates to account for the deprecation of undef: this updates documentation and variable names in line with the previous update to use poison more. It updates tests to no longer use undef where we would no longer generate undef. It restores one use of UndefValue::get where the replacement with PoisonValue::get was wrong: SPIR-V's OpUndef does not allow treating it as poison.
A number of tests were still using %pp-llvm-ver despite not having any LLVM-version-conditional checks.
LLVM 21.1.0 has been released, so by our policy of supporting the two most recent LLVM releases, we can now move from LLVM 19/20 to LLVM 20/21.
undef_debug_info.ll was originally added to test that we did not generate debug info with undef, because we were unable to handle that properly. Later on, when we were able to handle that properly, I removed the logic for keeping undef out of debug info in intel#375, at which point this test no longer tested anything useful. This PR finally removes it.
We require LLVM 20 or newer, so a whole lot of version checks are no longer necessary, and a number of tests that were only running on older LLVM versions no longer serve a purpose. Remove the checks and tests as appropriate.
These tests were inadvertently disabled and hence had not been kept up to date with current LLVM versions. This commit enables and updates them.
There were clang-format-20 and python formatting fixes required post integration of oneAPI Construction Kit pipeline which are addressed here.
This brings the Native CPU compiler pipeline files directly under the ownership of intel/llvm. This removes the direct dependence on the oneAPI Construction Kit, although the history of those files still exists under intel/llvm and the originals still exist at https://github.com/uxlfoundation/oneapi-construction-kit. This is the post merge update to the the oneAPI Construction Kit move of the compiler pipeline files for Native CPU and replaces the original FetchContent method. `llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt` was updated to remove the fetch content and the ugly install workaround. Missing is the lit tests for the pipeline tests as these refer to the use of a non-ported tool, `muxc`. CMakeLists.txt across was updated to use LLVM macros across `compiler_pipeline` and `vecz` ported code, as well as changing `NATIVECPU_USE_OCK` to be the default.The lit tests cfg files were updated to fit with LLVM, and a small change was made to avoid use of `undef`. A brief explanation and limitations of the importing of the files are under `llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_passes.rst`.
86b21b5 to
477f0cd
Compare
Author
|
Note: I've removed most of the docs in favour of a separate PR under sycl/docs. |
aelovikov-intel
previously approved these changes
Sep 5, 2025
Contributor
|
@intel/dpcpp-nativecpu-reviewers , this seems to be blocked by your review. |
uwedolinsky
approved these changes
Sep 5, 2025
aelovikov-intel
approved these changes
Sep 5, 2025
Contributor
|
/merge |
1 similar comment
Contributor
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bring Native CPU pipeline files into dpc++ directly.
This brings the Native CPU compiler pipeline files directly under the ownership of intel/llvm. This removes the direct dependence on the oneAPI Construction Kit, although the history of those files still exists under intel/llvm and the originals still exist at https://github.com/uxlfoundation/oneapi-construction-kit.
This was done as follows:
In the oneAPI Construction Kit repo:
See uxlfoundation/oneapi-construction-kit#969 for more info.
Under intel/llvm:
llvm/lib/SYCLNativeCPUUtils/CMakeLists.txtwas updated to remove the fetch content and the ugly install workaround. Missing is the lit tests for the pipeline tests as these refer to the use of a non-ported tool,muxc. CMakeLists.txt across was updated to use LLVM macros acrosscompiler_pipelineandveczported code, as well as changingNATIVECPU_USE_OCKto be the default. It also applies clang-format-20 to all the .h and .cpp files brought in. Other than that the .cpp and .h files are unchanged. The lit tests cfg files were updated to fit with LLVM, and a small change was made to avoid use ofundef.A brief explanation and limitations of the importing of the files are under
llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_passes.rst.This was based on the oneAPI Construction Kit as hash d3b68da068110b6f3858769ae7ce8c5f6750705b