Uh oh!
There was an error while loading. Please reload this page.
Support compilation from SYCL source code - #2049
Conversation
sommerlukas
commented
Apr 11, 2025
The
|
ndgrigorian
commented
Apr 15, 2025
Builds seem to be failing on the current compiler version, so this will probably need to be gated like the others behind utilities that check for the availability of the "kernel_compiler" extension |
ndgrigorian
commented
Apr 15, 2025
On the plus side, it's passing with 2025.2, and OS builds work—tests won't run until rebased on/merged with master though |
sommerlukas
commented
Apr 15, 2025
SYCL runtime compilation should also be supported with 2025.1, but the @ndgrigorian Do you know how to distinguish the different minor versions? I tried with |
ndgrigorian
commented
Apr 15, 2025
Compiler also defines |
9869a76 to
6c12649Comparesommerlukas
commented
Apr 23, 2025
I ended up using |
ndgrigorian
commented
Apr 24, 2025
Coverage failure relates to two of the newly-added tests |
sommerlukas
commented
Apr 30, 2025
Which version of the Intel OpenCL for CPU runtime is that setup using? Locally, I had segfaults with these tests in If you have control over the setup, we could try updating the driver. Alternatively, we could deactivate the tests (and RTC support) for OpenCL CPU for now. |
This is probably the problem. It installs manually from a pretty old version, I'll go ahead and bump it in a separate PR and if that doesn't introduce any problems, we can rebase this again and see if it resolves it. |
ndgrigorian
commented
May 1, 2025
@sommerlukas |
52b67ad to
92a7fe7Comparendgrigorian
commented
May 6, 2025
@sommerlukas failures in others (on 2025.1.1) are all the same: |
sommerlukas
commented
May 6, 2025
I used the version reported by 2025.1(.0), which is the release date, to distinguish between versions |
@ndgrigorian I fixed another issue that caused the coverage testing to fail in the previous CI run. On 2025.1, querying template kernels by template name is not yet supported, they can only be queried by mangled name. I've adapted the test to account for that. Coverage testing is running correctly for me locally, but the CI workflows need approval. I'm not quite sure what's causing the Jenkins runs to fail. |
ndgrigorian
commented
May 13, 2025
Started them up. And internal tests cite |
sommerlukas
commented
May 13, 2025
I think the coverage went down, because the Python test that I added runs on LevelZero and is skipped in the coverage testing. Does the coverage machine have LevelZero? |
ndgrigorian
commented
May 14, 2025
You're correct, none of our runners have LevelZero. I don't mind the coverage going down in these cases, because there's really not much we can do about it. |
sommerlukas
commented
May 14, 2025
Does the runner have OpenCL? We could have the test run on OpenCL instead. |
ndgrigorian
commented
May 14, 2025
Yes, tests all run on |
153ec69 to
bdf1014Comparesommerlukas
commented
May 21, 2025
I've changed the test to run on I've also added support for inspecting the build log in case compilation fails through the message in the |
| return; | ||
| } | ||
| bool DPCTLDevice_CanCompileSPIRV(__dpctl_keep const DPCTLSyclDeviceRef DRef) |
There was a problem hiding this comment.
Seems to not be used in SyclDevice
There was a problem hiding this comment.
Thanks for catching that, I was indeed using the query for SYCL to check for SPIR-V compilation support. Fixed now.
bdf1014 to
6145876Comparesommerlukas
commented
May 26, 2025
@ndgrigorian Is the Jenkins failure still related to the tests or just flaky? The rest of the CI is green now. |
ndgrigorian
commented
May 27, 2025
The build failures are unrelated, but the test failures still seem to be related. On Windows there's a stack overflow in at least one of the Jenkins runners, and on Linux there's |
Enable SYCL source compilation, but only for DPC++ versions that actually support the compilation, based on the __SYCL_COMPILER_VERSION reported. Uses the correct naming for the property based on DPC++ version, detected through C++ type traits to check which property actually refers to a fully defined type. This commit also works around a bug in DPC++ version 2025.1. The constructor with no parameter of class `include_files` was only declared, but never defined. Calling it when creating a SYCL source kernel bundle therefore leads to references to undefined symbols with DPC++ version 2025.1. This change works around this issue by calling an alternative constructor, which is defined in the release. Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
6145876 to
1db2bfaCompareAs the library aren't included in .bc format in version 2025.2 and earlier, we need to skip the test if no oneAPI Base Toolkit is installed. Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
ndgrigorian
commented
Dec 3, 2025
Superseded by gh-2206 |
This adds support to create a program/executable kernel_bundle from SYCL source code.
It uses the DPC++
kernel_compilerextension. As this is only an extension and not all backends are supported, a query on the device was added to check for support for compilation.