diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 64ffe1dee7228..3b39b148c1ba4 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -116,14 +116,8 @@ if(SYCL_UR_USE_FETCH_CONTENT) CACHE PATH "Path to external '${name}' adapter source dir" FORCE) endfunction() - set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit b79ebe4e98789144bcdf3832088eb6e6b5ae6967 - # Merge: 7b4bc761 fbb6e862 - # Author: Kenneth Benzie (Benie) - # Date: Fri Oct 4 16:39:59 2024 +0100 - # Merge pull request #2018 from wenju-he/L0-bindless-image-device-query - # [L0] Fix device query of bindless image support - set(UNIFIED_RUNTIME_TAG b79ebe4e98789144bcdf3832088eb6e6b5ae6967) + set(UNIFIED_RUNTIME_REPO "https://github.com/aarongreig/unified-runtime.git") + set(UNIFIED_RUNTIME_TAG aaron/makeDeviceCompileExtCore) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need diff --git a/sycl/source/backend.cpp b/sycl/source/backend.cpp index 2c876a570e3c6..e7ef5e62d8bef 100644 --- a/sycl/source/backend.cpp +++ b/sycl/source/backend.cpp @@ -226,23 +226,11 @@ make_kernel_bundle(ur_native_handle_t NativeHandle, switch (BinaryType) { case (UR_PROGRAM_BINARY_TYPE_NONE): if (State == bundle_state::object) { - auto Res = Adapter->call_nocheck( - UrProgram, 1, &Dev, nullptr); - if (Res == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - Res = Adapter->call_nocheck( - ContextImpl->getHandleRef(), UrProgram, nullptr); - } - Adapter->checkUrResult(Res); + Adapter->call(UrProgram, 1, &Dev, nullptr); } else if (State == bundle_state::executable) { - auto Res = Adapter->call_nocheck( - UrProgram, 1, &Dev, nullptr); - if (Res == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - Res = Adapter->call_nocheck( - ContextImpl->getHandleRef(), UrProgram, nullptr); - } - Adapter->checkUrResult(Res); + Adapter->call(UrProgram, 1, &Dev, nullptr); } break; @@ -255,15 +243,9 @@ make_kernel_bundle(ur_native_handle_t NativeHandle, detail::codeToString(UR_RESULT_ERROR_INVALID_VALUE)); if (State == bundle_state::executable) { ur_program_handle_t UrLinkedProgram = nullptr; - auto Res = Adapter->call_nocheck( - ContextImpl->getHandleRef(), 1, &Dev, 1, &UrProgram, nullptr, - &UrLinkedProgram); - if (Res == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - Res = Adapter->call_nocheck( - ContextImpl->getHandleRef(), 1, &UrProgram, nullptr, - &UrLinkedProgram); - } - Adapter->checkUrResult(Res); + Adapter->call(ContextImpl->getHandleRef(), 1, + &Dev, 1, &UrProgram, nullptr, + &UrLinkedProgram); if (UrLinkedProgram != nullptr) { UrProgram = UrLinkedProgram; } diff --git a/sycl/source/detail/kernel_bundle_impl.hpp b/sycl/source/detail/kernel_bundle_impl.hpp index 38b6bb1deb920..dcb1d8e42614e 100644 --- a/sycl/source/detail/kernel_bundle_impl.hpp +++ b/sycl/source/detail/kernel_bundle_impl.hpp @@ -462,13 +462,8 @@ class kernel_bundle_impl { "urProgramCreateWithIL resulted in a null program handle."); std::string XsFlags = extractXsFlags(BuildOptions); - auto Res = Adapter->call_nocheck( - UrProgram, DeviceVec.size(), DeviceVec.data(), XsFlags.c_str()); - if (Res == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - Res = Adapter->call_nocheck( - ContextImpl->getHandleRef(), UrProgram, XsFlags.c_str()); - } - Adapter->checkUrResult(Res); + Adapter->call(UrProgram, DeviceVec.size(), + DeviceVec.data(), XsFlags.c_str()); // Get the number of kernels in the program. size_t NumKernels; diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 6ab92c6e27d04..c38f6bde5309a 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -1158,13 +1158,8 @@ static ur_result_t doCompile(const AdapterPtr &Adapter, const char *Opts) { // Try to compile with given devices, fall back to compiling with the program // context if unsupported by the adapter - auto Result = Adapter->call_nocheck( - Program, NumDevs, Devs, Opts); - if (Result == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - return Adapter->call_nocheck(Ctx, Program, - Opts); - } - return Result; + return Adapter->call_nocheck(Program, NumDevs, + Devs, Opts); } static ur_program_handle_t loadDeviceLibFallback(const ContextImplPtr Context, @@ -1563,13 +1558,9 @@ ProgramManager::ProgramPtr ProgramManager::build( const std::string &Options = LinkOptions.empty() ? CompileOptions : (CompileOptions + " " + LinkOptions); - ur_result_t Error = Adapter->call_nocheck( + ur_result_t Error = Adapter->call_nocheck( Program.get(), /*num devices =*/1, &Device, Options.c_str()); - if (Error == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - Error = Adapter->call_nocheck( - Context->getHandleRef(), Program.get(), Options.c_str()); - } if (Error != UR_RESULT_SUCCESS) throw detail::set_ur_error( @@ -1599,16 +1590,10 @@ ProgramManager::ProgramPtr ProgramManager::build( ur_program_handle_t LinkedProg = nullptr; auto doLink = [&] { - auto Res = Adapter->call_nocheck( + return Adapter->call_nocheck( Context->getHandleRef(), /*num devices =*/1, &Device, LinkPrograms.size(), LinkPrograms.data(), LinkOptions.c_str(), &LinkedProg); - if (Res == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - Res = Adapter->call_nocheck( - Context->getHandleRef(), LinkPrograms.size(), LinkPrograms.data(), - LinkOptions.c_str(), &LinkedProg); - } - return Res; }; ur_result_t Error = doLink(); if (Error == UR_RESULT_ERROR_OUT_OF_RESOURCES || @@ -2422,16 +2407,10 @@ ProgramManager::link(const device_image_plain &DeviceImage, ur_program_handle_t LinkedProg = nullptr; auto doLink = [&] { - auto Res = Adapter->call_nocheck( + return Adapter->call_nocheck( ContextImpl->getHandleRef(), URDevices.size(), URDevices.data(), URPrograms.size(), URPrograms.data(), LinkOptionsStr.c_str(), &LinkedProg); - if (Res == UR_RESULT_ERROR_UNSUPPORTED_FEATURE) { - Res = Adapter->call_nocheck( - ContextImpl->getHandleRef(), URPrograms.size(), URPrograms.data(), - LinkOptionsStr.c_str(), &LinkedProg); - } - return Res; }; ur_result_t Error = doLink(); if (Error == UR_RESULT_ERROR_OUT_OF_RESOURCES || diff --git a/sycl/test-e2e/ESIMD/esimd_check_vc_codegen.cpp b/sycl/test-e2e/ESIMD/esimd_check_vc_codegen.cpp index 9576916b0e8bc..0be1f0b78db25 100644 --- a/sycl/test-e2e/ESIMD/esimd_check_vc_codegen.cpp +++ b/sycl/test-e2e/ESIMD/esimd_check_vc_codegen.cpp @@ -91,7 +91,6 @@ int main(void) { return err_cnt > 0 ? 1 : 0; } -// Don't use -NEXT here to split the line because we need to allow for the -// possbility of a BuildExp( that fails with UNSUPPORTED followed by a Build( -// that results in SUCCESS -// CHECK: <--- urProgramBuild{{(Exp)?}}({{.*}}-vc-codegen{{.*}} -> UR_RESULT_SUCCESS +// CHECK: <--- urProgramBuild( +// CHECK-SAME: .pOptions = {{.*}}-vc-codegen +// CHECK-SAME: -> UR_RESULT_SUCCESS diff --git a/sycl/test-e2e/ESIMD/spec_const/spec_const_redefine.cpp b/sycl/test-e2e/ESIMD/spec_const/spec_const_redefine.cpp index ade156e340ec7..a6489ff1cf4e6 100644 --- a/sycl/test-e2e/ESIMD/spec_const/spec_const_redefine.cpp +++ b/sycl/test-e2e/ESIMD/spec_const/spec_const_redefine.cpp @@ -91,7 +91,7 @@ int main(int argc, char **argv) { } // --- Check that only two JIT compilation happened: -// CHECK-COUNT-2: <--- urProgramBuildExp -// CHECK-NOT: <--- urProgramBuildExp +// CHECK-COUNT-2: <--- urProgramBuild +// CHECK-NOT: <--- urProgramBuild // --- Check that the test completed with expected results: // CHECK: passed diff --git a/sycl/test-e2e/ESIMD/sycl_esimd_mix.cpp b/sycl/test-e2e/ESIMD/sycl_esimd_mix.cpp index f22896fa3ea39..09dc9fd53bb99 100644 --- a/sycl/test-e2e/ESIMD/sycl_esimd_mix.cpp +++ b/sycl/test-e2e/ESIMD/sycl_esimd_mix.cpp @@ -119,10 +119,7 @@ int main(void) { // Regular SYCL kernel is compiled without -vc-codegen option -// Some backends will call urProgramBuild and some will call -// urProgramBuildExp depending on urProgramBuildExp support. - -// CHECK-LABEL: <--- urProgramBuild{{(Exp)?}} +// CHECK-LABEL: <--- urProgramBuild // CHECK-NOT: -vc-codegen // CHECK-WITH-VAR: -g // CHECK-NOT: -vc-codegen @@ -134,7 +131,7 @@ int main(void) { // For ESIMD kernels, -vc-codegen option is always preserved, // regardless of SYCL_PROGRAM_COMPILE_OPTIONS value. -// CHECK-LABEL: <--- urProgramBuild{{(Exp)?}} +// CHECK-LABEL: <--- urProgramBuild // CHECK-NO-VAR: -vc-codegen // CHECK-WITH-VAR: -g -vc-codegen // CHECK: {{.*}}-> UR_RESULT_SUCCESS diff --git a/sycl/test-e2e/Graph/Explicit/kernel_bundle.cpp b/sycl/test-e2e/Graph/Explicit/kernel_bundle.cpp index 174a4e5d2dce5..248a1ec147f2a 100644 --- a/sycl/test-e2e/Graph/Explicit/kernel_bundle.cpp +++ b/sycl/test-e2e/Graph/Explicit/kernel_bundle.cpp @@ -9,7 +9,7 @@ // CHECK-SAME: .phProgram = {{.*}} ([[PROGRAM_HANDLE1:[0-9a-fA-Fx]+]]) // -// CHECK:<--- urProgramBuildExp( +// CHECK:<--- urProgramBuild( // CHECK-SAME: .hProgram = [[PROGRAM_HANDLE1]] // // CHECK:<--- urProgramRetain(.hProgram = [[PROGRAM_HANDLE1]]) -> UR_RESULT_SUCCESS diff --git a/sycl/test-e2e/Graph/RecordReplay/kernel_bundle.cpp b/sycl/test-e2e/Graph/RecordReplay/kernel_bundle.cpp index 6da7fd36d4c2f..0ec85536957c0 100644 --- a/sycl/test-e2e/Graph/RecordReplay/kernel_bundle.cpp +++ b/sycl/test-e2e/Graph/RecordReplay/kernel_bundle.cpp @@ -9,7 +9,7 @@ // CHECK-SAME: .phProgram = {{.*}} ([[PROGRAM_HANDLE1:[0-9a-fA-Fx]+]]) // CHECK-SAME: -> UR_RESULT_SUCCESS; // -// CHECK:<--- urProgramBuildExp( +// CHECK:<--- urProgramBuild( // CHECK-SAME: .hProgram = [[PROGRAM_HANDLE1]] // // CHECK:<--- urProgramRetain( diff --git a/sycl/test-e2e/KernelAndProgram/cache_env_vars.cpp b/sycl/test-e2e/KernelAndProgram/cache_env_vars.cpp index 4f5654988f0e8..e076fe291a838 100644 --- a/sycl/test-e2e/KernelAndProgram/cache_env_vars.cpp +++ b/sycl/test-e2e/KernelAndProgram/cache_env_vars.cpp @@ -22,15 +22,12 @@ // CPU OCL JIT 0.12 0.12 0.16 1.1 16 // CPU OCL Cache 0.01 0.01 0.01 0.02 0.08 -// Some backends will call urProgramBuild and some will call -// urProgramBuildExp depending on urProgramBuildExp support. - // CHECK-BUILD-NOT: <--- urProgramCreateWithBinary( // CHECK-BUILD: <--- urProgramCreateWithIL( -// CHECK-BUILD: <--- urProgramBuild{{(Exp)?}}( +// CHECK-BUILD: <--- urProgramBuild( // CHECK-CACHE-NOT: <--- urProgramCreateWithIL( // CHECK-CACHE: <--- urProgramCreateWithBinary( -// CHECK-CACHE: <--- urProgramBuild{{(Exp)?}}( +// CHECK-CACHE: <--- urProgramBuild( #include "cache_env_vars.hpp" diff --git a/sycl/test-e2e/KernelAndProgram/cache_env_vars_lin.cpp b/sycl/test-e2e/KernelAndProgram/cache_env_vars_lin.cpp index 3752545e74fa1..f45f56223205f 100644 --- a/sycl/test-e2e/KernelAndProgram/cache_env_vars_lin.cpp +++ b/sycl/test-e2e/KernelAndProgram/cache_env_vars_lin.cpp @@ -22,14 +22,12 @@ // RUN: env SYCL_CACHE_PERSISTENT=1 HOME=%t/cache_dir SYCL_UR_TRACE=2 env -u XDG_CACHE_HOME env -u SYCL_CACHE_DIR %{run} %t.out | FileCheck %s --check-prefixes=CHECK-BUILD // RUN: env SYCL_CACHE_PERSISTENT=1 HOME=%t/cache_dir SYCL_UR_TRACE=2 env -u XDG_CACHE_HOME env -u SYCL_CACHE_DIR %{run} %t.out | FileCheck %s --check-prefixes=CHECK-CACHE -// Some backends will call urProgramBuild and some will call urProgramBuildExp depending on urProgramBuildExp support. - // CHECK-BUILD-NOT: <--- urProgramCreateWithBinary( // CHECK-BUILD: <--- urProgramCreateWithIL( -// CHECK-BUILD: <--- urProgramBuild{{(Exp)?}}( +// CHECK-BUILD: <--- urProgramBuild( // CHECK-CACHE-NOT: <--- urProgramCreateWithIL( // CHECK-CACHE: <--- urProgramCreateWithBinary( -// CHECK-CACHE: <--- urProgramBuild{{(Exp)?}}( +// CHECK-CACHE: <--- urProgramBuild( #include "cache_env_vars.hpp" diff --git a/sycl/test-e2e/KernelAndProgram/cache_env_vars_win.cpp b/sycl/test-e2e/KernelAndProgram/cache_env_vars_win.cpp index eda1b034f5003..7515d246c12b9 100644 --- a/sycl/test-e2e/KernelAndProgram/cache_env_vars_win.cpp +++ b/sycl/test-e2e/KernelAndProgram/cache_env_vars_win.cpp @@ -21,10 +21,10 @@ // CHECK-BUILD-NOT: <--- urProgramCreateWithBinary( // CHECK-BUILD: <--- urProgramCreateWithIL( -// CHECK-BUILD: <--- urProgramBuild{{(Exp)?}}( +// CHECK-BUILD: <--- urProgramBuild( // CHECK-CACHE-NOT: <--- urProgramCreateWithIL( // CHECK-CACHE: <--- urProgramCreateWithBinary( -// CHECK-CACHE: <--- urProgramBuild{{(Exp)?}}( +// CHECK-CACHE: <--- urProgramBuild( #include "cache_env_vars.hpp" diff --git a/sycl/test-e2e/Regression/implicit_kernel_bundle_image_filtering.cpp b/sycl/test-e2e/Regression/implicit_kernel_bundle_image_filtering.cpp index 96ec68ddd4401..6fd745e309a7c 100644 --- a/sycl/test-e2e/Regression/implicit_kernel_bundle_image_filtering.cpp +++ b/sycl/test-e2e/Regression/implicit_kernel_bundle_image_filtering.cpp @@ -43,7 +43,7 @@ int main() { } // --- Check that only a single program is built: -// CHECK: <--- urProgramBuildExp -// CHECK-NOT: <--- urProgramBuildExp +// CHECK: <--- urProgramBuild +// CHECK-NOT: <--- urProgramBuild // --- Check that the test completed with expected results: // CHECK: passed diff --git a/sycl/unittests/helpers/RuntimeLinkingCommon.hpp b/sycl/unittests/helpers/RuntimeLinkingCommon.hpp index 87f0f980119f0..775484bc45441 100644 --- a/sycl/unittests/helpers/RuntimeLinkingCommon.hpp +++ b/sycl/unittests/helpers/RuntimeLinkingCommon.hpp @@ -48,8 +48,8 @@ static ur_result_t redefined_urProgramCreateWithBinary(void *pParams) { return UR_RESULT_SUCCESS; } -static ur_result_t redefined_urProgramLinkExp(void *pParams) { - auto Params = *static_cast(pParams); +static ur_result_t redefined_urProgramLink(void *pParams) { + auto Params = *static_cast(pParams); unsigned ResProgram = 1; auto Programs = *Params.pphPrograms; for (uint32_t I = 0; I < *Params.pcount; ++I) { @@ -82,8 +82,8 @@ static void setupRuntimeLinkingMock() { redefined_urProgramCreateWithIL); mock::getCallbacks().set_replace_callback( "urProgramCreateWithBinary", redefined_urProgramCreateWithBinary); - mock::getCallbacks().set_replace_callback("urProgramLinkExp", - redefined_urProgramLinkExp); + mock::getCallbacks().set_replace_callback("urProgramLink", + redefined_urProgramLink); mock::getCallbacks().set_replace_callback("urKernelCreate", redefined_urKernelCreate); } diff --git a/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp b/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp index f994c62578c69..40faa01fbdf9c 100644 --- a/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp +++ b/sycl/unittests/kernel-and-program/KernelBuildOptions.cpp @@ -35,7 +35,7 @@ struct KernelInfo : public unittest::MockKernelInfoBase { } // namespace sycl static ur_result_t redefinedProgramBuild(void *pParams) { - auto params = *static_cast(pParams); + auto params = *static_cast(pParams); if (*params.ppOptions) BuildOpts = *params.ppOptions; else @@ -44,7 +44,7 @@ static ur_result_t redefinedProgramBuild(void *pParams) { } static ur_result_t redefinedProgramCompile(void *pParams) { - auto params = *static_cast(pParams); + auto params = *static_cast(pParams); if (*params.ppOptions) BuildOpts = *params.ppOptions; else @@ -53,7 +53,7 @@ static ur_result_t redefinedProgramCompile(void *pParams) { } static ur_result_t redefinedProgramLink(void *pParams) { - auto params = *static_cast(pParams); + auto params = *static_cast(pParams); if (*params.ppOptions) BuildOpts = *params.ppOptions; else @@ -63,11 +63,11 @@ static ur_result_t redefinedProgramLink(void *pParams) { static void setupCommonMockAPIs(sycl::unittest::UrMock<> &Mock) { using namespace sycl::detail; - mock::getCallbacks().set_before_callback("urProgramCompileExp", + mock::getCallbacks().set_before_callback("urProgramCompile", &redefinedProgramCompile); - mock::getCallbacks().set_before_callback("urProgramLinkExp", + mock::getCallbacks().set_before_callback("urProgramLink", &redefinedProgramLink); - mock::getCallbacks().set_before_callback("urProgramBuildExp", + mock::getCallbacks().set_before_callback("urProgramBuild", &redefinedProgramBuild); } diff --git a/sycl/unittests/kernel-and-program/OutOfResources.cpp b/sycl/unittests/kernel-and-program/OutOfResources.cpp index b0b6e877ebe77..5cd19bdcb9807 100644 --- a/sycl/unittests/kernel-and-program/OutOfResources.cpp +++ b/sycl/unittests/kernel-and-program/OutOfResources.cpp @@ -127,7 +127,7 @@ TEST_P(OutOfResourcesTestSuite, urProgramLink) { nProgramLink = 0; sycl::unittest::UrMock<> Mock; ErrorCode = GetParam(); - mock::getCallbacks().set_before_callback("urProgramLinkExp", + mock::getCallbacks().set_before_callback("urProgramLink", &redefinedProgramLink); sycl::platform Plt{sycl::platform()}; diff --git a/sycl/unittests/program_manager/DynamicLinking.cpp b/sycl/unittests/program_manager/DynamicLinking.cpp index d6f39f81008a8..0bbae8e135e04 100644 --- a/sycl/unittests/program_manager/DynamicLinking.cpp +++ b/sycl/unittests/program_manager/DynamicLinking.cpp @@ -218,30 +218,4 @@ TEST(DynamicLinking, AheadOfTimeUnsupported) { } } -static ur_result_t redefined_urProgramCompileExp(void *pParams) { - return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; -} - -TEST(DynamicLinking, UnsupportedCompileExp) { - sycl::unittest::UrMock<> Mock; - setupRuntimeLinkingMock(); - mock::getCallbacks().set_replace_callback("urProgramCompileExp", - redefined_urProgramCompileExp); - - sycl::platform Plt = sycl::platform(); - sycl::queue Q(Plt.get_devices()[0]); - - CapturedLinkingData.clear(); - - Q.single_task([=]() {}); - ASSERT_EQ(CapturedLinkingData.NumOfUrProgramCreateCalls, 3u); - // Both programs should be linked together. - ASSERT_EQ(CapturedLinkingData.NumOfUrProgramLinkCalls, 1u); - ASSERT_TRUE(CapturedLinkingData.LinkedProgramsContains( - {BASIC_CASE_PRG, BASIC_CASE_PRG_DEP, BASIC_CASE_PRG_DEP_DEP})); - // And the linked program should be used to create a kernel. - ASSERT_EQ(CapturedLinkingData.ProgramUsedToCreateKernel, - BASIC_CASE_PRG * BASIC_CASE_PRG_DEP * BASIC_CASE_PRG_DEP_DEP); -} - } // anonymous namespace diff --git a/sycl/unittests/program_manager/passing_link_and_compile_options.cpp b/sycl/unittests/program_manager/passing_link_and_compile_options.cpp index 88de522c1f2dd..46d1be9b789a6 100644 --- a/sycl/unittests/program_manager/passing_link_and_compile_options.cpp +++ b/sycl/unittests/program_manager/passing_link_and_compile_options.cpp @@ -85,7 +85,7 @@ generateEAMTestKernelImage(std::string _cmplOptions, std::string _lnkOptions) { } inline ur_result_t redefinedProgramLink(void *pParams) { - auto params = *static_cast(pParams); + auto params = *static_cast(pParams); assert(*params.ppOptions != nullptr); auto add_link_opts = std::string(*params.ppOptions); if (!add_link_opts.empty()) { @@ -97,7 +97,7 @@ inline ur_result_t redefinedProgramLink(void *pParams) { } inline ur_result_t redefinedProgramCompile(void *pParams) { - auto params = *static_cast(pParams); + auto params = *static_cast(pParams); assert(*params.ppOptions != nullptr); auto add_compile_opts = std::string(*params.ppOptions); if (!add_compile_opts.empty()) { @@ -109,7 +109,7 @@ inline ur_result_t redefinedProgramCompile(void *pParams) { } inline ur_result_t redefinedProgramBuild(void *pParams) { - auto params = *static_cast(pParams); + auto params = *static_cast(pParams); assert(*params.ppOptions != nullptr); current_build_opts = std::string(*params.ppOptions); return UR_RESULT_SUCCESS; @@ -118,9 +118,9 @@ inline ur_result_t redefinedProgramBuild(void *pParams) { TEST(Link_Compile_Options, compile_link_Options_Test_empty_options) { sycl::unittest::UrMock<> Mock; sycl::platform Plt = sycl::platform(); - mock::getCallbacks().set_before_callback("urProgramCompileExp", + mock::getCallbacks().set_before_callback("urProgramCompile", &redefinedProgramCompile); - mock::getCallbacks().set_before_callback("urProgramLinkExp", + mock::getCallbacks().set_before_callback("urProgramLink", &redefinedProgramLink); const sycl::device Dev = Plt.get_devices()[0]; current_link_options.clear(); @@ -145,9 +145,9 @@ TEST(Link_Compile_Options, compile_link_Options_Test_empty_options) { TEST(Link_Compile_Options, compile_link_Options_Test_filled_options) { sycl::unittest::UrMock<> Mock; sycl::platform Plt = sycl::platform(); - mock::getCallbacks().set_before_callback("urProgramCompileExp", + mock::getCallbacks().set_before_callback("urProgramCompile", &redefinedProgramCompile); - mock::getCallbacks().set_before_callback("urProgramLinkExp", + mock::getCallbacks().set_before_callback("urProgramLink", &redefinedProgramLink); const sycl::device Dev = Plt.get_devices()[0]; current_link_options.clear(); @@ -180,11 +180,11 @@ TEST(Link_Compile_Options, compile_link_Options_Test_filled_options) { TEST(Link_Compile_Options, check_sycl_build) { sycl::unittest::UrMock<> Mock; sycl::platform Plt = sycl::platform(); - mock::getCallbacks().set_before_callback("urProgramCompileExp", + mock::getCallbacks().set_before_callback("urProgramCompile", &redefinedProgramCompile); - mock::getCallbacks().set_before_callback("urProgramLinkExp", + mock::getCallbacks().set_before_callback("urProgramLink", &redefinedProgramLink); - mock::getCallbacks().set_before_callback("urProgramBuildExp", + mock::getCallbacks().set_before_callback("urProgramBuild", &redefinedProgramBuild); const sycl::device Dev = Plt.get_devices()[0]; current_link_options.clear();