Skip to content

Commit 7fa23fc

Browse files
smaslov-intelkbenzie
authored andcommitted
add OpenCL
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent 57e9f0c commit 7fa23fc

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

include/ur.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ def __str__(self):
310310
class ur_platform_backend_v(IntEnum):
311311
UNKNOWN = 0 ## The backend is not a recognized one
312312
LEVEL_ZERO = 1 ## The backend is Level Zero
313-
CUDA = 2 ## The backend is CUDA
314-
HIP = 3 ## The backend is HIP
313+
OPENCL = 2 ## The backend is OpenCL
314+
CUDA = 3 ## The backend is CUDA
315+
HIP = 4 ## The backend is HIP
315316

316317
class ur_platform_backend_t(c_int):
317318
def __str__(self):

include/ur_api.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,9 @@ urGetLastResult(
560560
typedef enum ur_platform_backend_t {
561561
UR_PLATFORM_BACKEND_UNKNOWN = 0, ///< The backend is not a recognized one
562562
UR_PLATFORM_BACKEND_LEVEL_ZERO = 1, ///< The backend is Level Zero
563-
UR_PLATFORM_BACKEND_CUDA = 2, ///< The backend is CUDA
564-
UR_PLATFORM_BACKEND_HIP = 3, ///< The backend is HIP
563+
UR_PLATFORM_BACKEND_OPENCL = 2, ///< The backend is OpenCL
564+
UR_PLATFORM_BACKEND_CUDA = 3, ///< The backend is CUDA
565+
UR_PLATFORM_BACKEND_HIP = 4, ///< The backend is HIP
565566
/// @cond
566567
UR_PLATFORM_BACKEND_FORCE_UINT32 = 0x7fffffff
567568
/// @endcond

scripts/core/platform.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,12 @@ etors:
207207
- name: LEVEL_ZERO
208208
value: "1"
209209
desc: "The backend is Level Zero"
210-
- name: CUDA
210+
- name: OPENCL
211211
value: "2"
212+
desc: "The backend is OpenCL"
213+
- name: CUDA
214+
value: "3"
212215
desc: "The backend is CUDA"
213216
- name: HIP
214-
value: "3"
217+
value: "4"
215218
desc: "The backend is HIP"

source/common/ur_params.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,10 @@ inline std::ostream &operator<<(std::ostream &os,
693693
os << "UR_PLATFORM_BACKEND_LEVEL_ZERO";
694694
break;
695695

696+
case UR_PLATFORM_BACKEND_OPENCL:
697+
os << "UR_PLATFORM_BACKEND_OPENCL";
698+
break;
699+
696700
case UR_PLATFORM_BACKEND_CUDA:
697701
os << "UR_PLATFORM_BACKEND_CUDA";
698702
break;

0 commit comments

Comments
 (0)