Support SYCL source compilation - #2206
Conversation
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2206/index.html |
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_65 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_66 ran successfully. |
9d64cb8 to
22475d9
Compare
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_104 ran successfully. |
75969ce to
be75a7e
Compare
cf56032 to
7a58ef7
Compare
43d385b to
788fdd2
Compare
788fdd2 to
4656feb
Compare
b610ee3 to
dd74214
Compare
4656feb to
cae6959
Compare
417c4a0 to
ece9fa0
Compare
8d662b5 to
f27db86
Compare
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>
838dcaf to
57cd047
Compare
|
|
||
| bool DPCTLDevice_CanCompileSPIRV(__dpctl_keep const DPCTLSyclDeviceRef DRef) | ||
| { | ||
| auto Dev = unwrap<device>(DRef); |
There was a problem hiding this comment.
Is it expected there is no if (Dev) null check?
| bool DPCTLDevice_CanCompileSPIRV(__dpctl_keep const DPCTLSyclDeviceRef DRef) | ||
| { | ||
| auto Dev = unwrap<device>(DRef); | ||
| auto Backend = Dev->get_platform().get_backend(); |
There was a problem hiding this comment.
That can throw sycl::exception, but no try/catch
|
|
||
| ### Added | ||
| * `dpctl.SyclQueue.copy` and `dpctl.SyclQueue.copy_async` methods [gh-2273](https://github.com/IntelPython/dpctl/pull/2273) | ||
| * Added `create_kernel_bundle_from_sycl_source` for creating `dpctl.SyclKernelBundle` from SYCL source strings via DPC++ extension, as well as corresponding C-API functions to support it [gh-2206](https://github.com/IntelPython/dpctl/pull/2206) |
There was a problem hiding this comment.
Should we list two more added API: is_sycl_source_compilation_available and can_compile ?
| { | ||
| #ifdef SYCL_EXT_ONEAPI_KERNEL_COMPILER | ||
| auto Dev = unwrap<device>(DRef); | ||
| return Dev->ext_oneapi_can_compile( |
There was a problem hiding this comment.
ext_oneapi_can_compile is declared without noexcept, so should it sit inside the try block?
This PR adds support for creating an executable
kernel_bundlefrom SYCL source code todpctlusing thekernel_compilerDPC++ extensionSupersedes gh-2049