Skip to content

Commit 847f4dd

Browse files
[SYCL][NFC] Detach compiler interfaces from PI (#14700)
Our compiler interfaces do not depend on runtime bits and therefore they shouldn't be tied to PI, UR or anything else. This PR is a by-product of #14145 intended to refactor the code in advance so once we move to UR there are less changes required. Moreover, compiler interfaces are not used anywhere in public SYCL headers and therefore they were moved into library. As you can see, there are still some `pi` naming present in filenames and namespaces, but this patch is huge enough already, so further changes will be done as separate PRs.
1 parent 2442ef0 commit 847f4dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+637
-612
lines changed

sycl/include/sycl/detail/pi.h

Lines changed: 5 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -988,186 +988,11 @@ using pi_device_exec_capabilities = pi_bitfield;
988988
static constexpr pi_device_exec_capabilities PI_EXEC_KERNEL = (1 << 0);
989989
static constexpr pi_device_exec_capabilities PI_EXEC_NATIVE_KERNEL = (1 << 1);
990990

991-
// Entry type, matches OpenMP for compatibility
992-
struct _pi_offload_entry_struct {
993-
void *addr;
994-
char *name;
995-
size_t size;
996-
int32_t flags;
997-
int32_t reserved;
998-
};
999-
1000-
using _pi_offload_entry = _pi_offload_entry_struct *;
1001-
1002-
// A type of a binary image property.
1003-
typedef enum {
1004-
PI_PROPERTY_TYPE_UNKNOWN,
1005-
PI_PROPERTY_TYPE_UINT32, // 32-bit integer
1006-
PI_PROPERTY_TYPE_BYTE_ARRAY, // byte array
1007-
PI_PROPERTY_TYPE_STRING // null-terminated string
1008-
} pi_property_type;
1009-
1010-
// Device binary image property.
1011-
// If the type size of the property value is fixed and is no greater than
1012-
// 64 bits, then ValAddr is 0 and the value is stored in the ValSize field.
1013-
// Example - PI_PROPERTY_TYPE_UINT32, which is 32-bit
1014-
struct _pi_device_binary_property_struct {
1015-
char *Name; // null-terminated property name
1016-
void *ValAddr; // address of property value
1017-
uint32_t Type; // _pi_property_type
1018-
uint64_t ValSize; // size of property value in bytes
1019-
};
1020-
1021-
typedef _pi_device_binary_property_struct *pi_device_binary_property;
1022-
1023-
// Named array of properties.
1024-
struct _pi_device_binary_property_set_struct {
1025-
char *Name; // the name
1026-
pi_device_binary_property PropertiesBegin; // array start
1027-
pi_device_binary_property PropertiesEnd; // array end
1028-
};
1029-
1030-
typedef _pi_device_binary_property_set_struct *pi_device_binary_property_set;
1031-
1032-
/// Types of device binary.
1033-
using pi_device_binary_type = uint8_t;
1034-
// format is not determined
1035-
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NONE = 0;
1036-
// specific to a device
1037-
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NATIVE = 1;
1038-
// portable binary types go next
1039-
// SPIR-V
1040-
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_SPIRV = 2;
1041-
// LLVM bitcode
1042-
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE = 3;
1043-
1044-
// Device binary descriptor version supported by this library.
1045-
static const uint16_t PI_DEVICE_BINARY_VERSION = 1;
1046-
1047-
// The kind of offload model the binary employs; must be 4 for SYCL
1048-
static const uint8_t PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL = 4;
1049-
1050-
/// Target identification strings for
1051-
/// pi_device_binary_struct.DeviceTargetSpec
1052-
///
1053-
/// A device type represented by a particular target
1054-
/// triple requires specific binary images. We need
1055-
/// to map the image type onto the device target triple
1056-
///
1057-
#define __SYCL_PI_DEVICE_BINARY_TARGET_UNKNOWN "<unknown>"
1058-
/// SPIR-V 32-bit image <-> "spir", 32-bit OpenCL device
1059-
#define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV32 "spir"
1060-
/// SPIR-V 64-bit image <-> "spir64", 64-bit OpenCL device
1061-
#define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64 "spir64"
1062-
/// Device-specific binary images produced from SPIR-V 64-bit <->
1063-
/// various "spir64_*" triples for specific 64-bit OpenCL devices
1064-
#define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64 "spir64_x86_64"
1065-
#define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN "spir64_gen"
1066-
#define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA "spir64_fpga"
1067-
/// PTX 64-bit image <-> "nvptx64", 64-bit NVIDIA PTX device
1068-
#define __SYCL_PI_DEVICE_BINARY_TARGET_NVPTX64 "nvptx64"
1069-
#define __SYCL_PI_DEVICE_BINARY_TARGET_AMDGCN "amdgcn"
1070-
#define __SYCL_PI_DEVICE_BINARY_TARGET_NATIVE_CPU "native_cpu"
1071-
1072991
/// Extension to denote native support of assert feature by an arbitrary device
1073992
/// piDeviceGetInfo call should return this extension when the device supports
1074993
/// native asserts if supported extensions' names are requested
1075994
#define PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT "cl_intel_devicelib_assert"
1076995

1077-
/// Device binary image property set names recognized by the SYCL runtime.
1078-
/// Name must be consistent with
1079-
/// PropertySetRegistry::SYCL_SPECIALIZATION_CONSTANTS defined in
1080-
/// PropertySetIO.h
1081-
#define __SYCL_PI_PROPERTY_SET_SPEC_CONST_MAP "SYCL/specialization constants"
1082-
/// PropertySetRegistry::SYCL_SPEC_CONSTANTS_DEFAULT_VALUES defined in
1083-
/// PropertySetIO.h
1084-
#define __SYCL_PI_PROPERTY_SET_SPEC_CONST_DEFAULT_VALUES_MAP \
1085-
"SYCL/specialization constants default values"
1086-
/// PropertySetRegistry::SYCL_DEVICELIB_REQ_MASK defined in PropertySetIO.h
1087-
#define __SYCL_PI_PROPERTY_SET_DEVICELIB_REQ_MASK "SYCL/devicelib req mask"
1088-
/// PropertySetRegistry::SYCL_KERNEL_PARAM_OPT_INFO defined in PropertySetIO.h
1089-
#define __SYCL_PI_PROPERTY_SET_KERNEL_PARAM_OPT_INFO "SYCL/kernel param opt"
1090-
/// PropertySetRegistry::SYCL_KERNEL_PROGRAM_METADATA defined in PropertySetIO.h
1091-
#define __SYCL_PI_PROPERTY_SET_PROGRAM_METADATA "SYCL/program metadata"
1092-
/// PropertySetRegistry::SYCL_MISC_PROP defined in PropertySetIO.h
1093-
#define __SYCL_PI_PROPERTY_SET_SYCL_MISC_PROP "SYCL/misc properties"
1094-
/// PropertySetRegistry::SYCL_ASSERT_USED defined in PropertySetIO.h
1095-
#define __SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED "SYCL/assert used"
1096-
/// PropertySetRegistry::SYCL_EXPORTED_SYMBOLS defined in PropertySetIO.h
1097-
#define __SYCL_PI_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS "SYCL/exported symbols"
1098-
/// PropertySetRegistry::SYCL_IMPORTED_SYMBOLS defined in PropertySetIO.h
1099-
#define __SYCL_PI_PROPERTY_SET_SYCL_IMPORTED_SYMBOLS "SYCL/imported symbols"
1100-
/// PropertySetRegistry::SYCL_DEVICE_GLOBALS defined in PropertySetIO.h
1101-
#define __SYCL_PI_PROPERTY_SET_SYCL_DEVICE_GLOBALS "SYCL/device globals"
1102-
/// PropertySetRegistry::SYCL_DEVICE_REQUIREMENTS defined in PropertySetIO.h
1103-
#define __SYCL_PI_PROPERTY_SET_SYCL_DEVICE_REQUIREMENTS \
1104-
"SYCL/device requirements"
1105-
/// PropertySetRegistry::SYCL_HOST_PIPES defined in PropertySetIO.h
1106-
#define __SYCL_PI_PROPERTY_SET_SYCL_HOST_PIPES "SYCL/host pipes"
1107-
/// PropertySetRegistry::SYCL_VIRTUAL_FUNCTIONS defined in PropertySetIO.h
1108-
#define __SYCL_PI_PROPERTY_SET_SYCL_VIRTUAL_FUNCTIONS "SYCL/virtual functions"
1109-
1110-
/// Program metadata tags recognized by the PI backends. For kernels the tag
1111-
/// must appear after the kernel name.
1112-
#define __SYCL_PI_PROGRAM_METADATA_TAG_REQD_WORK_GROUP_SIZE \
1113-
"@reqd_work_group_size"
1114-
#define __SYCL_PI_PROGRAM_METADATA_GLOBAL_ID_MAPPING "@global_id_mapping"
1115-
1116-
#define __SYCL_PI_PROGRAM_METADATA_TAG_NEED_FINALIZATION "Requires finalization"
1117-
1118-
/// This struct is a record of the device binary information. If the Kind field
1119-
/// denotes a portable binary type (SPIR-V or LLVM IR), the DeviceTargetSpec
1120-
/// field can still be specific and denote e.g. FPGA target. It must match the
1121-
/// __tgt_device_image structure generated by the clang-offload-wrapper tool
1122-
/// when their Version field match.
1123-
struct pi_device_binary_struct {
1124-
/// version of this structure - for backward compatibility;
1125-
/// all modifications which change order/type/offsets of existing fields
1126-
/// should increment the version.
1127-
uint16_t Version;
1128-
/// the type of offload model the binary employs; must be 4 for SYCL
1129-
uint8_t Kind;
1130-
/// format of the binary data - SPIR-V, LLVM IR bitcode,...
1131-
uint8_t Format;
1132-
/// null-terminated string representation of the device's target architecture
1133-
/// which holds one of:
1134-
/// __SYCL_PI_DEVICE_BINARY_TARGET_UNKNOWN - unknown
1135-
/// __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV32 - general value for 32-bit OpenCL
1136-
/// devices
1137-
/// __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64 - general value for 64-bit OpenCL
1138-
/// devices
1139-
/// __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64 - 64-bit OpenCL CPU device
1140-
/// __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN - GEN GPU device (64-bit
1141-
/// OpenCL)
1142-
/// __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA - 64-bit OpenCL FPGA device
1143-
const char *DeviceTargetSpec;
1144-
/// a null-terminated string; target- and compiler-specific options
1145-
/// which are suggested to use to "compile" program at runtime
1146-
const char *CompileOptions;
1147-
/// a null-terminated string; target- and compiler-specific options
1148-
/// which are suggested to use to "link" program at runtime
1149-
const char *LinkOptions;
1150-
/// Pointer to the manifest data start
1151-
const char *ManifestStart;
1152-
/// Pointer to the manifest data end
1153-
const char *ManifestEnd;
1154-
/// Pointer to the target code start
1155-
const unsigned char *BinaryStart;
1156-
/// Pointer to the target code end
1157-
const unsigned char *BinaryEnd;
1158-
/// the offload entry table
1159-
_pi_offload_entry EntriesBegin;
1160-
_pi_offload_entry EntriesEnd;
1161-
// Array of preperty sets; e.g. specialization constants symbol-int ID map is
1162-
// propagated to runtime with this mechanism.
1163-
pi_device_binary_property_set PropertySetsBegin;
1164-
pi_device_binary_property_set PropertySetsEnd;
1165-
// TODO Other fields like entries, link options can be propagated using
1166-
// the property set infrastructure. This will improve binary compatibility and
1167-
// add flexibility.
1168-
};
1169-
using pi_device_binary = pi_device_binary_struct *;
1170-
1171996
// pi_buffer_region structure repeats cl_buffer_region, used for sub buffers.
1172997
struct pi_buffer_region_struct {
1173998
size_t origin;
@@ -1211,27 +1036,6 @@ struct pi_image_region_struct {
12111036
};
12121037
using pi_image_region = pi_image_region_struct *;
12131038

1214-
// Offload binaries descriptor version supported by this library.
1215-
static const uint16_t PI_DEVICE_BINARIES_VERSION = 1;
1216-
1217-
/// This struct is a record of all the device code that may be offloaded.
1218-
/// It must match the __tgt_bin_desc structure generated by
1219-
/// the clang-offload-wrapper tool when their Version field match.
1220-
struct pi_device_binaries_struct {
1221-
/// version of this structure - for backward compatibility;
1222-
/// all modifications which change order/type/offsets of existing fields
1223-
/// should increment the version.
1224-
uint16_t Version;
1225-
/// Number of device binaries in this descriptor
1226-
uint16_t NumDeviceBinaries;
1227-
/// Device binaries data
1228-
pi_device_binary DeviceBinaries;
1229-
/// the offload entry table (not used, for compatibility with OpenMP)
1230-
_pi_offload_entry *HostEntriesBegin;
1231-
_pi_offload_entry *HostEntriesEnd;
1232-
};
1233-
using pi_device_binaries = pi_device_binaries_struct *;
1234-
12351039
// This union encapsulates the two external handles we currently support.
12361040
// When choosing the correct field from the union we need to look at the value
12371041
// of the enum `pi_external_mem_handle_type` or
@@ -1369,6 +1173,11 @@ typedef struct {
13691173

13701174
using pi_launch_property = _pi_launch_property;
13711175

1176+
struct sycl_device_binaries_struct;
1177+
typedef sycl_device_binaries_struct *pi_device_binary;
1178+
struct _sycl_device_binary_property_struct;
1179+
typedef _sycl_device_binary_property_struct *pi_device_binary_property;
1180+
13721181
//
13731182
// Following section contains SYCL RT Plugin Interface (PI) functions.
13741183
// They are 3 distinct categories:

sycl/include/sycl/detail/pi.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ using PiPlatformBackend = ::pi_platform_backend;
105105
using PiDevice = ::pi_device;
106106
using PiDeviceType = ::pi_device_type;
107107
using PiDeviceInfo = ::pi_device_info;
108-
using PiDeviceBinaryType = ::pi_device_binary_type;
109108
using PiContext = ::pi_context;
110109
using PiContextInfo = ::pi_context_info;
111110
using PiProgram = ::pi_program;
@@ -238,12 +237,6 @@ uint64_t emitFunctionWithArgsBeginTrace(uint32_t FuncID, const char *FName,
238237
void emitFunctionWithArgsEndTrace(uint64_t CorrelationID, uint32_t FuncID,
239238
const char *FName, unsigned char *ArgsData,
240239
pi_result Result, pi_plugin Plugin);
241-
242-
/// Tries to determine the device binary image foramat. Returns
243-
/// PI_DEVICE_BINARY_TYPE_NONE if unsuccessful.
244-
PiDeviceBinaryType getBinaryImageFormat(const unsigned char *ImgData,
245-
size_t ImgSize);
246-
247240
} // namespace pi
248241

249242
// Workaround for build with GCC 5.x

sycl/plugins/cuda/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ add_sycl_plugin(cuda
4646
${XPTI_INCLUDE}
4747
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime # for Unified Runtime
4848
${UNIFIED_RUNTIME_SOURCE_DIR}/source/ # for adapters/cuda
49+
"${SYCL_SOURCE_DIR}/source" # for compiler.hpp
4950
LIBRARIES
5051
cudadrv
5152
${XPTI_LIBS}

sycl/plugins/hip/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ add_sycl_plugin(hip
122122
${sycl_plugin_dir}
123123
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime
124124
${UNIFIED_RUNTIME_SOURCE_DIR}/source/ # for adapters/hip
125+
"${SYCL_SOURCE_DIR}/source" # for compiler.hpp
125126
LIBRARIES
126127
UnifiedRuntime-Headers
127128
UnifiedRuntimeCommon

sycl/plugins/level_zero/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ add_sycl_plugin(level_zero
4747
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime # for Unified Runtime
4848
${UNIFIED_RUNTIME_SOURCE_DIR}/source/ # for adapters/level_zero
4949
${XPTI_INCLUDE}
50+
"${SYCL_SOURCE_DIR}/source" # for compiler.hpp
5051
LIBRARIES
5152
LevelZeroLoader-Headers
5253
UnifiedRuntime-Headers

sycl/plugins/native_cpu/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ add_sycl_plugin(native_cpu
1717
${sycl_inc_dir}
1818
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime # for Unified Runtime
1919
${UNIFIED_RUNTIME_SOURCE_DIR}/source/ # for adapters/native_cpu
20+
"${SYCL_SOURCE_DIR}/source" # for compiler.hpp
2021
LIBRARIES
2122
sycl
2223
UnifiedRuntime-Headers

sycl/plugins/opencl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ add_sycl_plugin(opencl
1717
${sycl_inc_dir}
1818
${CMAKE_CURRENT_SOURCE_DIR}/../unified_runtime # for Unified Runtime
1919
${UNIFIED_RUNTIME_SOURCE_DIR}/source/ # for adapters/opencl
20+
"${SYCL_SOURCE_DIR}/source" # for compiler.hpp
2021
LIBRARIES
2122
UnifiedRuntime-Headers
2223
UnifiedRuntimeCommon

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ set(UNIFIED_RUNTIME_PLUGIN_ARGS
229229
INCLUDE_DIRS
230230
"${UNIFIED_RUNTIME_SRC_INCLUDE_DIR}"
231231
"${UNIFIED_RUNTIME_COMMON_INCLUDE_DIR}"
232+
"${SYCL_SOURCE_DIR}/source" # for compiler.hpp
232233
)
233234

234235
# We need for #include <ze_api.h> in common.h

sycl/plugins/unified_runtime/pi2ur.hpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "ur_api.h"
1111
#include <cstdarg>
12+
#include <detail/compiler.hpp>
1213
#include <sycl/detail/cuda_definitions.hpp>
1314
#include <sycl/detail/pi.h>
1415
#include <ur/ur.hpp>
@@ -785,15 +786,15 @@ mapPIMetadataToUR(const pi_device_binary_property *pi_metadata,
785786
ur_metadata->pName = (*pi_metadata)->Name;
786787
ur_metadata->size = (*pi_metadata)->ValSize;
787788
switch ((*pi_metadata)->Type) {
788-
case PI_PROPERTY_TYPE_UINT32:
789+
case SYCL_PROPERTY_TYPE_UINT32:
789790
ur_metadata->type = UR_PROGRAM_METADATA_TYPE_UINT32;
790791
ur_metadata->value.data32 = (*pi_metadata)->ValSize;
791792
return UR_RESULT_SUCCESS;
792-
case PI_PROPERTY_TYPE_BYTE_ARRAY:
793+
case SYCL_PROPERTY_TYPE_BYTE_ARRAY:
793794
ur_metadata->type = UR_PROGRAM_METADATA_TYPE_BYTE_ARRAY;
794795
ur_metadata->value.pData = (*pi_metadata)->ValAddr;
795796
return UR_RESULT_SUCCESS;
796-
case PI_PROPERTY_TYPE_STRING:
797+
case SYCL_PROPERTY_TYPE_STRING:
797798
ur_metadata->type = UR_PROGRAM_METADATA_TYPE_STRING;
798799
ur_metadata->value.pString =
799800
reinterpret_cast<char *>((*pi_metadata)->ValAddr);
@@ -1487,47 +1488,48 @@ inline pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime,
14871488

14881489
inline pi_result
14891490
piextDeviceSelectBinary(pi_device Device, // TODO: does this need to be context?
1490-
pi_device_binary *Binaries, pi_uint32 NumBinaries,
1491+
pi_device_binary *PIBinaries, pi_uint32 NumBinaries,
14911492
pi_uint32 *SelectedBinaryInd) {
14921493

14931494
auto UrDevice = reinterpret_cast<ur_device_handle_t>(Device);
14941495
std::vector<ur_device_binary_t> UrBinaries(NumBinaries);
1496+
auto *Binaries = reinterpret_cast<sycl_device_binary *>(PIBinaries);
14951497

14961498
for (uint32_t BinaryCount = 0; BinaryCount < NumBinaries; BinaryCount++) {
14971499
if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1498-
__SYCL_PI_DEVICE_BINARY_TARGET_UNKNOWN) == 0)
1500+
__SYCL_DEVICE_BINARY_TARGET_UNKNOWN) == 0)
14991501
UrBinaries[BinaryCount].pDeviceTargetSpec =
15001502
UR_DEVICE_BINARY_TARGET_UNKNOWN;
15011503
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1502-
__SYCL_PI_DEVICE_BINARY_TARGET_SPIRV32) == 0)
1504+
__SYCL_DEVICE_BINARY_TARGET_SPIRV32) == 0)
15031505
UrBinaries[BinaryCount].pDeviceTargetSpec =
15041506
UR_DEVICE_BINARY_TARGET_SPIRV32;
15051507
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1506-
__SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64) == 0)
1508+
__SYCL_DEVICE_BINARY_TARGET_SPIRV64) == 0)
15071509
UrBinaries[BinaryCount].pDeviceTargetSpec =
15081510
UR_DEVICE_BINARY_TARGET_SPIRV64;
15091511
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1510-
__SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64) == 0)
1512+
__SYCL_DEVICE_BINARY_TARGET_SPIRV64_X86_64) == 0)
15111513
UrBinaries[BinaryCount].pDeviceTargetSpec =
15121514
UR_DEVICE_BINARY_TARGET_SPIRV64_X86_64;
15131515
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1514-
__SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN) == 0)
1516+
__SYCL_DEVICE_BINARY_TARGET_SPIRV64_GEN) == 0)
15151517
UrBinaries[BinaryCount].pDeviceTargetSpec =
15161518
UR_DEVICE_BINARY_TARGET_SPIRV64_GEN;
15171519
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1518-
__SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA) == 0)
1520+
__SYCL_DEVICE_BINARY_TARGET_SPIRV64_FPGA) == 0)
15191521
UrBinaries[BinaryCount].pDeviceTargetSpec =
15201522
UR_DEVICE_BINARY_TARGET_SPIRV64_FPGA;
15211523
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1522-
__SYCL_PI_DEVICE_BINARY_TARGET_NVPTX64) == 0)
1524+
__SYCL_DEVICE_BINARY_TARGET_NVPTX64) == 0)
15231525
UrBinaries[BinaryCount].pDeviceTargetSpec =
15241526
UR_DEVICE_BINARY_TARGET_NVPTX64;
15251527
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1526-
__SYCL_PI_DEVICE_BINARY_TARGET_AMDGCN) == 0)
1528+
__SYCL_DEVICE_BINARY_TARGET_AMDGCN) == 0)
15271529
UrBinaries[BinaryCount].pDeviceTargetSpec =
15281530
UR_DEVICE_BINARY_TARGET_AMDGCN;
15291531
else if (strcmp(Binaries[BinaryCount]->DeviceTargetSpec,
1530-
__SYCL_PI_DEVICE_BINARY_TARGET_NATIVE_CPU) == 0)
1532+
__SYCL_DEVICE_BINARY_TARGET_NATIVE_CPU) == 0)
15311533
UrBinaries[BinaryCount].pDeviceTargetSpec =
15321534
"native_cpu"; // todo: define UR_DEVICE_BINARY_TARGET_NATIVE_CPU;
15331535
else

0 commit comments

Comments
 (0)