Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(NATIVECPU) added #define for device binary target #753

Merged
merged 9 commits into from
Aug 17, 2023
4 changes: 4 additions & 0 deletions include/ur.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,10 @@ def __str__(self):
## @brief AMD GCN
UR_DEVICE_BINARY_TARGET_AMDGCN = "amdgcn"

###############################################################################
## @brief Native CPU
UR_DEVICE_BINARY_TARGET_NATIVE_CPU = "native_cpu"

###############################################################################
## @brief Device Binary Type
class ur_device_binary_t(Structure):
Expand Down
6 changes: 6 additions & 0 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,12 @@ typedef enum ur_platform_backend_t {
#define UR_DEVICE_BINARY_TARGET_AMDGCN "amdgcn"
#endif // UR_DEVICE_BINARY_TARGET_AMDGCN

///////////////////////////////////////////////////////////////////////////////
#ifndef UR_DEVICE_BINARY_TARGET_NATIVE_CPU
/// @brief Native CPU
#define UR_DEVICE_BINARY_TARGET_NATIVE_CPU "native_cpu"
#endif // UR_DEVICE_BINARY_TARGET_NATIVE_CPU

///////////////////////////////////////////////////////////////////////////////
/// @brief Device Binary Type
typedef struct ur_device_binary_t {
Expand Down
5 changes: 5 additions & 0 deletions scripts/core/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ desc: "AMD GCN"
name: "$X_DEVICE_BINARY_TARGET_AMDGCN"
value: "\"amdgcn\""
--- #--------------------------------------------------------------------------
type: macro
desc: "Native CPU"
name: "$X_DEVICE_BINARY_TARGET_NATIVE_CPU"
value: "\"native_cpu\""
--- #--------------------------------------------------------------------------
type: struct
desc: "Device Binary Type"
name: $x_device_binary_t
Expand Down