Skip to content

Commit

Permalink
[UR] Update to new urProgramLink interface (#13085)
Browse files Browse the repository at this point in the history
Pre-commit PR for
oneapi-src/unified-runtime#1458

---------

Co-authored-by: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
  • Loading branch information
RossBrunton and kbenzie authored Jul 10, 2024
1 parent c7d018f commit 8ddd729
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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 @@ -100,13 +100,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 9d3bce6ad92e6f0a4af0139f9744584b5a402827
# Merge: e0775441 1c9c2d0b
# commit 8cc2b874cfc0dbf2899fe8002f4822fe2d876629 (HEAD -> main, origin/main, origin/HEAD)
# Merge: 2f548cae 25c75c06
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
# Date: Tue Jul 9 15:57:44 2024 +0100
# Merge pull request #1822 from JackAKirk/cuda-cubemap-driver-fix
# [cuda][bindless_images][2025.0 req] Fix for cuda < 11.6 support.
set(UNIFIED_RUNTIME_TAG 9d3bce6ad92e6f0a4af0139f9744584b5a402827)
# Date: Wed Jul 10 12:36:28 2024 +0100
# Merge pull request #1458 from RossBrunton/ross/linkerror
# [UR] Improve handling of error cases in urProgramLink
set(UNIFIED_RUNTIME_TAG 25c75c06999dfae33415fbdb98f620e00bcf10f0)

fetch_adapter_source(level_zero
${UNIFIED_RUNTIME_REPO}
Expand Down
6 changes: 5 additions & 1 deletion sycl/plugins/unified_runtime/pi2ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2074,12 +2074,16 @@ piProgramLink(pi_context Context, pi_uint32 NumDevices,
auto UrDevices = reinterpret_cast<ur_device_handle_t *>(
const_cast<pi_device *>(DeviceList));

// If it fails, urProgramLinkExp will clear the pointer
ur_program_handle_t UrProgramForExp;
auto urResult =
urProgramLinkExp(UrContext, NumDevices, UrDevices, NumInputPrograms,
UrInputPrograms, Options, UrProgram);
UrInputPrograms, Options, &UrProgramForExp);
if (urResult == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) {
urResult = urProgramLink(UrContext, NumInputPrograms, UrInputPrograms,
Options, UrProgram);
} else {
*UrProgram = UrProgramForExp;
}
return ur2piResult(urResult);
}
Expand Down

0 comments on commit 8ddd729

Please sign in to comment.