Skip to content

Commit

Permalink
[L0] Add support for multi-device kernel compilation (intel#12032)
Browse files Browse the repository at this point in the history
pre-commit Pr for
oneapi-src/unified-runtime#1135

---------

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
Co-authored-by: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
  • Loading branch information
nrspruit and kbenzie committed Jan 23, 2024
1 parent dcfe7f8 commit fd68283
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
10 changes: 6 additions & 4 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
include(FetchContent)

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

if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")
Expand Down
18 changes: 0 additions & 18 deletions sycl/plugins/unified_runtime/pi2ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1879,11 +1879,6 @@ inline pi_result piProgramCreateWithBinary(
PI_ASSERT(Binaries && Lengths, PI_ERROR_INVALID_VALUE);
PI_ASSERT(Program, PI_ERROR_INVALID_PROGRAM);

// For now we support only one device.
if (NumDevices != 1) {
die("piProgramCreateWithBinary: level_zero supports only one device.");
return PI_ERROR_INVALID_VALUE;
}
if (!Binaries[0] || !Lengths[0]) {
if (BinaryStatus)
*BinaryStatus = PI_ERROR_INVALID_VALUE;
Expand Down Expand Up @@ -1985,11 +1980,6 @@ piProgramLink(pi_context Context, pi_uint32 NumDevices,
pi_uint32 NumInputPrograms, const pi_program *InputPrograms,
void (*PFnNotify)(pi_program Program, void *UserData),
void *UserData, pi_program *RetProgram) {
// We only support one device with Level Zero currently.
if (NumDevices != 1) {
die("piProgramLink: level_zero supports only one device.");
return PI_ERROR_INVALID_VALUE;
}

// Validate input parameters.
PI_ASSERT(DeviceList, PI_ERROR_INVALID_DEVICE);
Expand Down Expand Up @@ -2064,14 +2054,6 @@ piProgramBuild(pi_program Program, pi_uint32 NumDevices,
return PI_ERROR_INVALID_VALUE;
}

// We only support build to one device with Level Zero now.
// TODO: we should eventually build to the possibly multiple root
// devices in the context.
if (NumDevices != 1) {
die("piProgramBuild: level_zero supports only one device.");
return PI_ERROR_INVALID_VALUE;
}

// These aren't supported.
PI_ASSERT(!PFnNotify && !UserData, PI_ERROR_INVALID_VALUE);

Expand Down

0 comments on commit fd68283

Please sign in to comment.