Skip to content

Commit 4320ea1

Browse files
winstonzhang-intelveselypeta
authored andcommitted
[SYCL][UR][L0] Modify flag for zeInit (#11242)
Based on the existence of NPU driver for L0, GPU flag is now passed to zeInit Signed-off-by: Zhang, Winston <winston.zhang@intel.com>
1 parent 72bc1d4 commit 4320ea1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/adapters/level_zero/platform.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urPlatformGet(
5555
// We must only initialize the driver once, even if urPlatformGet() is called
5656
// multiple times. Declaring the return value as "static" ensures it's only
5757
// called once.
58-
static ze_result_t ZeResult = ZE_CALL_NOCHECK(zeInit, (0));
58+
static ze_result_t ZeResult =
59+
ZE_CALL_NOCHECK(zeInit, (ZE_INIT_FLAG_GPU_ONLY));
5960

6061
// Absorb the ZE_RESULT_ERROR_UNINITIALIZED and just return 0 Platforms.
6162
if (ZeResult == ZE_RESULT_ERROR_UNINITIALIZED) {

0 commit comments

Comments
 (0)