Skip to content

Commit 0189058

Browse files
authored
Merge pull request #712 from Alcpz/alcpz/native_cpu_constants
[UR] Added Native CPU constants
2 parents d808cab + 4e22bd7 commit 0189058

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

include/ur.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ class ur_platform_backend_v(IntEnum):
530530
OPENCL = 2 ## The backend is OpenCL
531531
CUDA = 3 ## The backend is CUDA
532532
HIP = 4 ## The backend is HIP
533+
NATIVE_CPU = 5 ## The backend is Native CPU
533534

534535
class ur_platform_backend_t(c_int):
535536
def __str__(self):

include/ur_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ typedef enum ur_platform_backend_t {
858858
UR_PLATFORM_BACKEND_OPENCL = 2, ///< The backend is OpenCL
859859
UR_PLATFORM_BACKEND_CUDA = 3, ///< The backend is CUDA
860860
UR_PLATFORM_BACKEND_HIP = 4, ///< The backend is HIP
861+
UR_PLATFORM_BACKEND_NATIVE_CPU = 5, ///< The backend is Native CPU
861862
/// @cond
862863
UR_PLATFORM_BACKEND_FORCE_UINT32 = 0x7fffffff
863864
/// @endcond

scripts/core/platform.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,6 @@ etors:
291291
- name: HIP
292292
value: "4"
293293
desc: "The backend is HIP"
294+
- name: NATIVE_CPU
295+
value: "5"
296+
desc: "The backend is Native CPU"

source/common/ur_params.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,6 +2052,10 @@ inline std::ostream &operator<<(std::ostream &os,
20522052
case UR_PLATFORM_BACKEND_HIP:
20532053
os << "UR_PLATFORM_BACKEND_HIP";
20542054
break;
2055+
2056+
case UR_PLATFORM_BACKEND_NATIVE_CPU:
2057+
os << "UR_PLATFORM_BACKEND_NATIVE_CPU";
2058+
break;
20552059
default:
20562060
os << "unknown enumerator";
20572061
break;

0 commit comments

Comments
 (0)