Skip to content

Commit 21aaf94

Browse files
authored
Merge pull request #753 from uwedolinsky/uwe/native_cpu
(NATIVECPU) added #define for device binary target
2 parents e92ce31 + 4578fa7 commit 21aaf94

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

include/ur.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,10 @@ def __str__(self):
641641
## @brief AMD GCN
642642
UR_DEVICE_BINARY_TARGET_AMDGCN = "amdgcn"
643643

644+
###############################################################################
645+
## @brief Native CPU
646+
UR_DEVICE_BINARY_TARGET_NATIVE_CPU = "native_cpu"
647+
644648
###############################################################################
645649
## @brief Device Binary Type
646650
class ur_device_binary_t(Structure):

include/ur_api.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,12 @@ typedef enum ur_platform_backend_t {
12251225
#define UR_DEVICE_BINARY_TARGET_AMDGCN "amdgcn"
12261226
#endif // UR_DEVICE_BINARY_TARGET_AMDGCN
12271227

1228+
///////////////////////////////////////////////////////////////////////////////
1229+
#ifndef UR_DEVICE_BINARY_TARGET_NATIVE_CPU
1230+
/// @brief Native CPU
1231+
#define UR_DEVICE_BINARY_TARGET_NATIVE_CPU "native_cpu"
1232+
#endif // UR_DEVICE_BINARY_TARGET_NATIVE_CPU
1233+
12281234
///////////////////////////////////////////////////////////////////////////////
12291235
/// @brief Device Binary Type
12301236
typedef struct ur_device_binary_t {

scripts/core/device.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ desc: "AMD GCN"
6161
name: "$X_DEVICE_BINARY_TARGET_AMDGCN"
6262
value: "\"amdgcn\""
6363
--- #--------------------------------------------------------------------------
64+
type: macro
65+
desc: "Native CPU"
66+
name: "$X_DEVICE_BINARY_TARGET_NATIVE_CPU"
67+
value: "\"native_cpu\""
68+
--- #--------------------------------------------------------------------------
6469
type: struct
6570
desc: "Device Binary Type"
6671
name: $x_device_binary_t

0 commit comments

Comments
 (0)