diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index f9866d0b34f07..ea6b259cee2a1 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -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) - # 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} diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index 522df8cb40d91..1f82292f960fe 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -2074,12 +2074,16 @@ piProgramLink(pi_context Context, pi_uint32 NumDevices, auto UrDevices = reinterpret_cast( const_cast(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); }