File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,19 @@ class device_image_impl {
110
110
}
111
111
112
112
bool all_specialization_constant_native () const noexcept {
113
- assert (false && " Not implemented" );
114
- return false ;
113
+ // Specialization constants are natively supported in JIT mode on backends,
114
+ // that are using SPIR-V as IR
115
+ auto IsAOTBinary = [](const char *Format) {
116
+ return (
117
+ (strcmp (Format, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64) ==
118
+ 0 ) ||
119
+ (strcmp (Format, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN) == 0 ) ||
120
+ (strcmp (Format, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA) == 0 ));
121
+ };
122
+
123
+ return !IsAOTBinary (MBinImage->getRawData ().DeviceTargetSpec ) &&
124
+ (MContext.get_backend () == backend::opencl ||
125
+ MContext.get_backend () == backend::ext_oneapi_level_zero);
115
126
}
116
127
117
128
bool has_specialization_constant (const char *SpecName) const noexcept {
You can’t perform that action at this time.
0 commit comments