Skip to content

Commit fd68283

Browse files
nrspruitkbenzie
andcommitted
[L0] Add support for multi-device kernel compilation (#12032)
pre-commit Pr for oneapi-src/unified-runtime#1135 --------- Signed-off-by: Spruit, Neil R <[email protected]> Co-authored-by: Kenneth Benzie (Benie) <[email protected]>
1 parent dcfe7f8 commit fd68283

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
5757
include(FetchContent)
5858

5959
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
60-
# commit 2d27a62757ba2f2f4a47ed0a0e86254081634419
60+
# commit 7c58060ffdd86e1e342e9bea12834e49aa2cb187
61+
# Merge: 4f800802 1b2cd5b3
6162
# Author: Kenneth Benzie (Benie) <[email protected]>
62-
# Date: Mon Jan 22 12:31:47 2024 +0000
63-
# Set version to v0.8.3
64-
set(UNIFIED_RUNTIME_TAG v0.8.3)
63+
# Date: Tue Jan 23 11:29:19 2024 +0000
64+
# Merge pull request #1135 from nrspruit/multi_device_kernel_compilation_main
65+
# [L0] Add support for multi-device kernel compilation
66+
set(UNIFIED_RUNTIME_TAG 7c58060ffdd86e1e342e9bea12834e49aa2cb187)
6567

6668
if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
6769
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")

sycl/plugins/unified_runtime/pi2ur.hpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,11 +1879,6 @@ inline pi_result piProgramCreateWithBinary(
18791879
PI_ASSERT(Binaries && Lengths, PI_ERROR_INVALID_VALUE);
18801880
PI_ASSERT(Program, PI_ERROR_INVALID_PROGRAM);
18811881

1882-
// For now we support only one device.
1883-
if (NumDevices != 1) {
1884-
die("piProgramCreateWithBinary: level_zero supports only one device.");
1885-
return PI_ERROR_INVALID_VALUE;
1886-
}
18871882
if (!Binaries[0] || !Lengths[0]) {
18881883
if (BinaryStatus)
18891884
*BinaryStatus = PI_ERROR_INVALID_VALUE;
@@ -1985,11 +1980,6 @@ piProgramLink(pi_context Context, pi_uint32 NumDevices,
19851980
pi_uint32 NumInputPrograms, const pi_program *InputPrograms,
19861981
void (*PFnNotify)(pi_program Program, void *UserData),
19871982
void *UserData, pi_program *RetProgram) {
1988-
// We only support one device with Level Zero currently.
1989-
if (NumDevices != 1) {
1990-
die("piProgramLink: level_zero supports only one device.");
1991-
return PI_ERROR_INVALID_VALUE;
1992-
}
19931983

19941984
// Validate input parameters.
19951985
PI_ASSERT(DeviceList, PI_ERROR_INVALID_DEVICE);
@@ -2064,14 +2054,6 @@ piProgramBuild(pi_program Program, pi_uint32 NumDevices,
20642054
return PI_ERROR_INVALID_VALUE;
20652055
}
20662056

2067-
// We only support build to one device with Level Zero now.
2068-
// TODO: we should eventually build to the possibly multiple root
2069-
// devices in the context.
2070-
if (NumDevices != 1) {
2071-
die("piProgramBuild: level_zero supports only one device.");
2072-
return PI_ERROR_INVALID_VALUE;
2073-
}
2074-
20752057
// These aren't supported.
20762058
PI_ASSERT(!PFnNotify && !UserData, PI_ERROR_INVALID_VALUE);
20772059

0 commit comments

Comments
 (0)