Skip to content

Commit

Permalink
[L0] Add support for multi-device kernel compilation (#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 authored Jan 23, 2024
1 parent 00754b7 commit dc37ee4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
12 changes: 6 additions & 6 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
include(FetchContent)

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 6032f6fde37eeadcc3f12c10460e3ffec161dd33
# Merge: 92f44da3 f9ad3d42
# commit 7c58060ffdd86e1e342e9bea12834e49aa2cb187
# Merge: 4f800802 1b2cd5b3
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
# Date: Mon Jan 22 12:30:12 2024 +0000
# Merge pull request #1259 from igchor/fix_sync
# [L0] do not ignore returned values from zeHostSynchronize
set(UNIFIED_RUNTIME_TAG 6032f6fde37eeadcc3f12c10460e3ffec161dd33)
# 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 @@ -1875,11 +1875,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 @@ -1981,11 +1976,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 @@ -2060,14 +2050,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 dc37ee4

Please sign in to comment.