diff --git a/.github/workflows/sycl-clang-tidy.yml b/.github/workflows/sycl-clang-tidy.yml index 17055c983ad7b..0d8d3c08eabae 100644 --- a/.github/workflows/sycl-clang-tidy.yml +++ b/.github/workflows/sycl-clang-tidy.yml @@ -9,6 +9,10 @@ on: - "**/*.h" - "**/*.hpp" + paths-ignore: + # TEMPORARY (PR #23305): disable Linux clang-tidy on this branch. Do not merge upstream. + - '**' + concurrency: # Cancel a currently running workflow from the same PR, branch or tag. diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 68a6ce9f939ee..083e89d52e33a 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -37,6 +37,9 @@ on: - 'devops/scripts/benchmarks/**' - 'devops/actions/run-tests/benchmark/**' - '.github/workflows/sycl-ur-perf-benchmarking.yml' + # TEMPORARY (PR #23305): disable all Linux precommit jobs on this branch. + # Windows-only validation. Do not merge this paths-ignore entry upstream. + - '**' concurrency: # Cancel a currently running workflow from the same PR, branch or tag. diff --git a/sycl/test-e2e/Adapters/level_zero/event-leak.cpp b/sycl/test-e2e/Adapters/level_zero/event-leak.cpp index 2e20e3ad8eff1..eea116bdcda77 100644 --- a/sycl/test-e2e/Adapters/level_zero/event-leak.cpp +++ b/sycl/test-e2e/Adapters/level_zero/event-leak.cpp @@ -1,17 +1,14 @@ // REQUIRES: level_zero, level_zero_dev_kit // -// TODO: The L0 loader on Windows CI does not count zeEventCounterBasedCreate, -// so the matching zeEventDestroy calls are reported as a negative leak there. -// Ignore negative leaks on Windows until the loader is updated. -// DEFINE: %{leak_check_not} = %if windows %{"LEAK = {{[^-]}}"%} %else %{LEAK%} -// // RUN: %{build} %level_zero_options -o %t.out -// RUN: %{l0_leak_check} %{run} %t.out wait 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} -// RUN: %{l0_leak_check} %{run} %t.out nowait 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} +// RUN: %{l0_leak_check} %{run} %t.out wait 2>&1 | FileCheck %s +// RUN: %{l0_leak_check} %{run} %t.out nowait 2>&1 | FileCheck %s // // RUN: %{build} %level_zero_options -DCHECK_INORDER -o %t.inorder.out -// RUN: %{l0_leak_check} %{run} %t.inorder.out wait 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} -// RUN: %{l0_leak_check} %{run} %t.inorder.out nowait 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} +// RUN: %{l0_leak_check} %{run} %t.inorder.out wait 2>&1 | FileCheck %s +// RUN: %{l0_leak_check} %{run} %t.inorder.out nowait 2>&1 | FileCheck %s +// +// CHECK-NOT: LEAK // The test is to check that there are no leaks reported with the embedded // UR_L0_LEAKS_DEBUG=1 testing capability. Example of a leak reported is this: diff --git a/sycl/test-e2e/DeprecatedFeatures/DiscardEvents/discard_events_l0_leak.cpp b/sycl/test-e2e/DeprecatedFeatures/DiscardEvents/discard_events_l0_leak.cpp index 53a20813cd5f4..78af2f7f18044 100644 --- a/sycl/test-e2e/DeprecatedFeatures/DiscardEvents/discard_events_l0_leak.cpp +++ b/sycl/test-e2e/DeprecatedFeatures/DiscardEvents/discard_events_l0_leak.cpp @@ -1,14 +1,11 @@ // REQUIRES: level_zero // -// TODO: The L0 loader on Windows CI does not count zeEventCounterBasedCreate, -// so the matching zeEventDestroy calls are reported as a negative leak there. -// Ignore negative leaks on Windows until the loader is updated. -// DEFINE: %{leak_check_not} = %if windows %{"LEAK = {{[^-]}}"%} %else %{LEAK%} -// // RUN: %{build} -o %t.out // -// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' %{l0_leak_check} %{run} %t.out wait 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} -// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' %{l0_leak_check} %{run} %t.out nowait 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} +// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' %{l0_leak_check} %{run} %t.out wait 2>&1 | FileCheck %s +// RUN: env SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 SYCL_PI_LEVEL_ZERO_BATCH_SIZE=4 ONEAPI_DEVICE_SELECTOR='level_zero:*' %{l0_leak_check} %{run} %t.out nowait 2>&1 | FileCheck %s +// +// CHECK-NOT: LEAK // // The test is to check that there are no leaks reported with the embedded // UR_L0_LEAKS_DEBUG=1 ( %{l0_leak_check} ) testing capability. diff --git a/sycl/test-e2e/ProfilingTag/profile_tag_leak.cpp b/sycl/test-e2e/ProfilingTag/profile_tag_leak.cpp index ae5862d33601a..735f301e28a56 100644 --- a/sycl/test-e2e/ProfilingTag/profile_tag_leak.cpp +++ b/sycl/test-e2e/ProfilingTag/profile_tag_leak.cpp @@ -1,12 +1,7 @@ // REQUIRES: level_zero // -// TODO: The L0 loader on Windows CI does not count zeEventCounterBasedCreate, -// so the matching zeEventDestroy calls are reported as a negative leak there. -// Ignore negative leaks on Windows until the loader is updated. -// DEFINE: %{leak_check_not} = %if windows %{"LEAK = {{[^-]}}"%} %else %{LEAK%} -// // RUN: %{build} -o %t.out -// RUN: %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} +// RUN: %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=LEAK // Regression test to avoid the reintroduction of a leak in L0 in the profiling // tags when using barriers to ensure ordering on out-of-order queues. diff --git a/sycl/test-e2e/Reduction/reduction_resource_leak_dw.cpp b/sycl/test-e2e/Reduction/reduction_resource_leak_dw.cpp index 19774aa37f371..59624dd66a1d3 100644 --- a/sycl/test-e2e/Reduction/reduction_resource_leak_dw.cpp +++ b/sycl/test-e2e/Reduction/reduction_resource_leak_dw.cpp @@ -1,12 +1,9 @@ // REQUIRES: level_zero // -// TODO: The L0 loader on Windows CI does not count zeEventCounterBasedCreate, -// so the matching zeEventDestroy calls are reported as a negative leak there. -// Ignore negative leaks on Windows until the loader is updated. -// DEFINE: %{leak_check_not} = %if windows %{"LEAK = {{[^-]}}"%} %else %{LEAK%} -// // RUN: %{build} -o %t.out -// RUN: %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} +// RUN: %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s +// +// CHECK-NOT: LEAK // Tests that additional resources required by discard_write reductions do not // leak. diff --git a/sycl/test-e2e/Reduction/reduction_resource_leak_usm.cpp b/sycl/test-e2e/Reduction/reduction_resource_leak_usm.cpp index 5ad094fc6fd84..c50d529fd4995 100644 --- a/sycl/test-e2e/Reduction/reduction_resource_leak_usm.cpp +++ b/sycl/test-e2e/Reduction/reduction_resource_leak_usm.cpp @@ -1,12 +1,9 @@ // REQUIRES: level_zero -// TODO: The L0 loader on Windows CI does not count zeEventCounterBasedCreate, -// so the matching zeEventDestroy calls are reported as a negative leak there. -// Ignore negative leaks on Windows until the loader is updated. -// DEFINE: %{leak_check_not} = %if windows %{"LEAK = {{[^-]}}"%} %else %{LEAK%} - // RUN: %{build} -o %t.out -// RUN: env ONEAPI_DEVICE_SELECTOR="level_zero:*" %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} +// RUN: env ONEAPI_DEVICE_SELECTOR="level_zero:*" %{l0_leak_check} %{run} %t.out 2>&1 | FileCheck %s +// +// CHECK-NOT: LEAK // Tests that additional resources required by USM reductions do not leak. diff --git a/sycl/test-e2e/USM/usm_leak_check.cpp b/sycl/test-e2e/USM/usm_leak_check.cpp index a859ea6347e05..4152ed163e99f 100644 --- a/sycl/test-e2e/USM/usm_leak_check.cpp +++ b/sycl/test-e2e/USM/usm_leak_check.cpp @@ -1,15 +1,10 @@ // REQUIRES: level_zero -// TODO: The L0 loader on Windows CI does not count zeEventCounterBasedCreate, -// so the matching zeEventDestroy calls are reported as a negative leak there. -// Ignore negative leaks on Windows until the loader is updated. -// DEFINE: %{leak_check_not} = %if windows %{"LEAK = {{[^-]}}"%} %else %{LEAK%} - // RUN: %{build} -Wno-error=deprecated-declarations -o %t.out -// RUN: %{l0_leak_check} %{run} %t.out u 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} -// RUN: %{l0_leak_check} %{run} %t.out s 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} -// RUN: %{l0_leak_check} %{run} %t.out l 2>&1 | FileCheck %s --implicit-check-not=%{leak_check_not} +// RUN: %{l0_leak_check} %{run} %t.out u 2>&1 | FileCheck %s --implicit-check-not=LEAK +// RUN: %{l0_leak_check} %{run} %t.out s 2>&1 | FileCheck %s --implicit-check-not=LEAK +// RUN: %{l0_leak_check} %{run} %t.out l 2>&1 | FileCheck %s --implicit-check-not=LEAK #include #include diff --git a/sycl/test-e2e/USM/zzz_print_L0_loader_version.cpp b/sycl/test-e2e/USM/zzz_print_L0_loader_version.cpp new file mode 100644 index 0000000000000..713bde713dfa6 --- /dev/null +++ b/sycl/test-e2e/USM/zzz_print_L0_loader_version.cpp @@ -0,0 +1,66 @@ +// REQUIRES: windows, level_zero, level_zero_dev_kit +// REQUIRES: arch-intel_gpu_bmg_g21 || arch-intel_gpu_bmg_g31 + +// RUN: %{build} %level_zero_options -o %t.out +// RUN: %{run} %t.out + +// Prints the version of the Level Zero loader used by the SYCL runtime. +// The test always fails, so that its output is printed in the lit log. + +#include +#include +#include +#include + +#include +#include + +#ifdef _WIN32 +#include +#endif + +int main() { + sycl::queue Q; + std::cout << "Device: " << Q.get_device().get_info() + << std::endl; + +#ifdef _WIN32 + if (HMODULE Loader = GetModuleHandleA("ze_loader.dll")) { + char Path[MAX_PATH] = {0}; + if (GetModuleFileNameA(Loader, Path, MAX_PATH)) + std::cout << "L0 loader path: " << Path << std::endl; + } +#endif + + ze_result_t Res = zeInit(0); + if (Res != ZE_RESULT_SUCCESS) { + std::cout << "zeInit failed with error code: " << Res << std::endl; + return 1; + } + + size_t NumComponents = 0; + Res = zelLoaderGetVersions(&NumComponents, nullptr); + if (Res != ZE_RESULT_SUCCESS) { + std::cout << "zelLoaderGetVersions failed with error code: " << Res + << std::endl; + return 1; + } + + std::vector Versions(NumComponents); + Res = zelLoaderGetVersions(&NumComponents, Versions.data()); + if (Res != ZE_RESULT_SUCCESS) { + std::cout << "zelLoaderGetVersions failed with error code: " << Res + << std::endl; + return 1; + } + + for (const auto &V : Versions) + std::cout << "L0 component: " << V.component_name + << ", version: " << V.component_lib_version.major << "." + << V.component_lib_version.minor << "." + << V.component_lib_version.patch + << ", spec version: " << ZE_MAJOR_VERSION(V.spec_version) << "." + << ZE_MINOR_VERSION(V.spec_version) << std::endl; + + return 1; +}