File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -112,17 +112,13 @@ class device_image_impl {
112112 bool all_specialization_constant_native () const noexcept {
113113 // Specialization constants are natively supported in JIT mode on backends,
114114 // 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 ));
115+ auto IsJITSPIRVTarget = [](const char *Target) {
116+ return (strcmp (Target, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64) == 0 ||
117+ strcmp (Target, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV32) == 0 );
121118 };
122-
123- return !IsAOTBinary (MBinImage->getRawData ().DeviceTargetSpec ) &&
124- (MContext.get_backend () == backend::opencl ||
125- MContext.get_backend () == backend::ext_oneapi_level_zero);
119+ return (MContext.get_backend () == backend::opencl ||
120+ MContext.get_backend () == backend::ext_oneapi_level_zero) &&
121+ IsJITSPIRVTarget (MBinImage->getRawData ().DeviceTargetSpec );
126122 }
127123
128124 bool has_specialization_constant (const char *SpecName) const noexcept {
You can’t perform that action at this time.
0 commit comments