Skip to content

Commit 5b90ccb

Browse files
committed
Add level_zero to liboffload platforms
1 parent ad07ee8 commit 5b90ccb

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

offload/liboffload/API/Platform.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def ol_platform_backend_t : Enum {
2727
Etor<"UNKNOWN", "The backend is not recognized">,
2828
Etor<"CUDA", "The backend is CUDA">,
2929
Etor<"AMDGPU", "The backend is AMDGPU">,
30+
Etor<"LEVEL_ZERO", "The backend is Level Zero">,
3031
Etor<"HOST", "The backend is the host">,
3132
];
3233
}

offload/liboffload/src/OffloadImpl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ constexpr ol_platform_backend_t pluginNameToBackend(StringRef Name) {
231231
return OL_PLATFORM_BACKEND_AMDGPU;
232232
} else if (Name == "cuda") {
233233
return OL_PLATFORM_BACKEND_CUDA;
234+
} else if (Name == "level_zero") {
235+
return OL_PLATFORM_BACKEND_LEVEL_ZERO;
234236
} else {
235237
return OL_PLATFORM_BACKEND_UNKNOWN;
236238
}

0 commit comments

Comments
 (0)