Skip to content

Commit

Permalink
[L0] Add support for multi-device kernel compilation
Browse files Browse the repository at this point in the history
sycl changes for oneapi-src/unified-runtime#1135

Enables multi device kernel compilation for level zero

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit committed Jan 19, 2024
1 parent 0f3662a commit 36a889f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
10 changes: 2 additions & 8 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,8 @@ endif()
if(SYCL_PI_UR_USE_FETCH_CONTENT)
include(FetchContent)

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 43c2ad2363f735fd83282bb8da9d4996424dd3cf
# Merge: 5d58871c eba3905b
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
# Date: Fri Jan 19 15:52:55 2024 +0000
# Merge pull request #1260 from kbenzie/benie/dont-include-windows.h-in-ur_info.hpp
# [Common] Don't include Windows.h in ur_util.hpp
set(UNIFIED_RUNTIME_TAG 43c2ad2363f735fd83282bb8da9d4996424dd3cf)
set(UNIFIED_RUNTIME_REPO "https://github.com/nrspruit/unified-runtime.git")
set(UNIFIED_RUNTIME_TAG 1b2cd5b34dda3055c5274b2eb381adef12fd95c8)

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 36a889f

Please sign in to comment.