File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 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 {
110110 }
111111
112112 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);
115126 }
116127
117128 bool has_specialization_constant (const char *SpecName) const noexcept {
You can’t perform that action at this time.
0 commit comments