|
12 | 12 | // For device image compression. |
13 | 13 | #include <detail/compression.hpp> |
14 | 14 |
|
| 15 | +#include <llvm/Support/PropertySetIO.h> |
| 16 | + |
15 | 17 | #include <algorithm> |
16 | 18 | #include <cstdlib> |
17 | 19 | #include <cstring> |
@@ -185,28 +187,39 @@ void RTDeviceBinaryImage::init(sycl_device_binary Bin) { |
185 | 187 | // try to determine the format; may remain "NONE" |
186 | 188 | Format = ur::getBinaryImageFormat(Bin->BinaryStart, getSize()); |
187 | 189 |
|
188 | | - SpecConstIDMap.init(Bin, __SYCL_PROPERTY_SET_SPEC_CONST_MAP); |
| 190 | + SpecConstIDMap.init( |
| 191 | + Bin, llvm::util::PropertySetRegistry::SYCL_SPECIALIZATION_CONSTANTS); |
189 | 192 | SpecConstDefaultValuesMap.init( |
190 | | - Bin, __SYCL_PROPERTY_SET_SPEC_CONST_DEFAULT_VALUES_MAP); |
191 | | - DeviceLibReqMask.init(Bin, __SYCL_PROPERTY_SET_DEVICELIB_REQ_MASK); |
192 | | - DeviceLibMetadata.init(Bin, __SYCL_PROPERTY_SET_DEVICELIB_METADATA); |
193 | | - KernelParamOptInfo.init(Bin, __SYCL_PROPERTY_SET_KERNEL_PARAM_OPT_INFO); |
194 | | - AssertUsed.init(Bin, __SYCL_PROPERTY_SET_SYCL_ASSERT_USED); |
195 | | - ImplicitLocalArg.init(Bin, __SYCL_PROPERTY_SET_SYCL_IMPLICIT_LOCAL_ARG); |
196 | | - ProgramMetadata.init(Bin, __SYCL_PROPERTY_SET_PROGRAM_METADATA); |
| 193 | + Bin, llvm::util::PropertySetRegistry::SYCL_SPEC_CONSTANTS_DEFAULT_VALUES); |
| 194 | + DeviceLibReqMask.init( |
| 195 | + Bin, llvm::util::PropertySetRegistry::SYCL_DEVICELIB_REQ_MASK); |
| 196 | + DeviceLibMetadata.init( |
| 197 | + Bin, llvm::util::PropertySetRegistry::SYCL_DEVICELIB_METADATA); |
| 198 | + KernelParamOptInfo.init( |
| 199 | + Bin, llvm::util::PropertySetRegistry::SYCL_KERNEL_PARAM_OPT_INFO); |
| 200 | + AssertUsed.init(Bin, llvm::util::PropertySetRegistry::SYCL_ASSERT_USED); |
| 201 | + ImplicitLocalArg.init( |
| 202 | + Bin, llvm::util::PropertySetRegistry::SYCL_IMPLICIT_LOCAL_ARG); |
| 203 | + ProgramMetadata.init(Bin, |
| 204 | + llvm::util::PropertySetRegistry::SYCL_PROGRAM_METADATA); |
197 | 205 | // Convert ProgramMetadata into the UR format |
198 | 206 | for (const auto &Prop : ProgramMetadata) { |
199 | 207 | ProgramMetadataUR.push_back( |
200 | 208 | ur::mapDeviceBinaryPropertyToProgramMetadata(Prop)); |
201 | 209 | } |
202 | | - ExportedSymbols.init(Bin, __SYCL_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS); |
203 | | - ImportedSymbols.init(Bin, __SYCL_PROPERTY_SET_SYCL_IMPORTED_SYMBOLS); |
204 | | - DeviceGlobals.init(Bin, __SYCL_PROPERTY_SET_SYCL_DEVICE_GLOBALS); |
205 | | - DeviceRequirements.init(Bin, __SYCL_PROPERTY_SET_SYCL_DEVICE_REQUIREMENTS); |
206 | | - HostPipes.init(Bin, __SYCL_PROPERTY_SET_SYCL_HOST_PIPES); |
207 | | - VirtualFunctions.init(Bin, __SYCL_PROPERTY_SET_SYCL_VIRTUAL_FUNCTIONS); |
208 | | - RegisteredKernels.init(Bin, __SYCL_PROPERTY_SET_SYCL_REGISTERED_KERNELS); |
209 | | - Misc.init(Bin, __SYCL_PROPERTY_SET_SYCL_MISC_PROP); |
| 210 | + ExportedSymbols.init(Bin, |
| 211 | + llvm::util::PropertySetRegistry::SYCL_EXPORTED_SYMBOLS); |
| 212 | + ImportedSymbols.init(Bin, |
| 213 | + llvm::util::PropertySetRegistry::SYCL_IMPORTED_SYMBOLS); |
| 214 | + DeviceGlobals.init(Bin, llvm::util::PropertySetRegistry::SYCL_DEVICE_GLOBALS); |
| 215 | + DeviceRequirements.init( |
| 216 | + Bin, llvm::util::PropertySetRegistry::SYCL_DEVICE_REQUIREMENTS); |
| 217 | + HostPipes.init(Bin, llvm::util::PropertySetRegistry::SYCL_HOST_PIPES); |
| 218 | + VirtualFunctions.init( |
| 219 | + Bin, llvm::util::PropertySetRegistry::SYCL_VIRTUAL_FUNCTIONS); |
| 220 | + RegisteredKernels.init( |
| 221 | + Bin, llvm::util::PropertySetRegistry::SYCL_REGISTERED_KERNELS); |
| 222 | + Misc.init(Bin, llvm::util::PropertySetRegistry::SYCL_MISC_PROP); |
210 | 223 | } |
211 | 224 |
|
212 | 225 | std::atomic<uintptr_t> RTDeviceBinaryImage::ImageCounter = 1; |
|
0 commit comments