Skip to content

Commit

Permalink
[SYCL] Implement multiple tracing levels for SYCL_UR_TRACE (#14983)
Browse files Browse the repository at this point in the history
This undoes some changes to tracing that were made when porting from PI
to UR, and means that `SYCL_UR_TRACE` now has the same behavior as the
`SYCL_PI_TRACE` option that it replaced.

Also only enable the UR tracing layer when `SYCL_UR_TRACE` is set to the
appropriate level, rather than always enabling it when `UR_LOG_TRACING`
is set - fixes #14926
  • Loading branch information
callumfare authored Aug 15, 2024
1 parent c8f6928 commit 390a472
Show file tree
Hide file tree
Showing 81 changed files with 231 additions and 178 deletions.
12 changes: 6 additions & 6 deletions sycl/cmake/modules/FetchUnifiedRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ if(SYCL_UR_USE_FETCH_CONTENT)
endfunction()

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit f8336050f43a6529636fd6b2075dfe09961564f5
# Merge: 6c98e0e8 b75f2bc2
# commit d8f1c98e48e98ea2f6a227af82366734fcde977e
# Merge: 6e8efa3d 9e824480
# Author: Omar Ahmed <omar.ahmed@codeplay.com>
# Date: Tue Aug 13 13:07:23 2024 +0100
# Merge pull request #1955 from nrspruit/fix_l0_coverity
# [L0] fix Coverity issues for L0 Adapter
set(UNIFIED_RUNTIME_TAG f8336050f43a6529636fd6b2075dfe09961564f5)
# Date: Wed Aug 14 11:46:59 2024 +0100
# Merge pull request #1946 from callumfare/callum/update_ur_trace_env_var
# Update expected values of SYCL_UR_TRACE environment variable
set(UNIFIED_RUNTIME_TAG d8f1c98e48e98ea2f6a227af82366734fcde977e)

set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES")
# Due to the use of dependentloadflag and no installer for UMF and hwloc we need
Expand Down
17 changes: 16 additions & 1 deletion sycl/doc/EnvironmentVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ variables in production code.</span>
| Environment variable | Values | Description |
| -------------------- | ------ | ----------- |
| `SYCL_PREFER_UR` | Integer | If non-0 then run through Unified Runtime if desired backend is supported there. Default is 0. |
| `SYCL_UR_TRACE` | Integer | If non-0 then enable Unified Runtime tracing. Default is 0. |
| `SYCL_UR_TRACE` | Integer | Described [below](#sycl_ur_trace-options) | Enable specified level of tracing for UR. |
| `SYCL_QUEUE_THREAD_POOL_SIZE` | Positive integer | Number of threads in thread pool of queue. |
| `SYCL_DEVICELIB_NO_FALLBACK` | Any(\*) | Disable loading and linking of device library images |
| `SYCL_PRINT_EXECUTION_GRAPH` | Described [below](#sycl_print_execution_graph-options) | Print execution graph to DOT text file. |
Expand Down Expand Up @@ -231,6 +231,21 @@ variables in production code.</span>
| after_addHostAcc | print graph after addHostAccessor method |
| always | print graph before and after each of the above methods |


### `SYCL_UR_TRACE` Options

`SYCL_UR_TRACE` accepts a bit-mask, so individual tracing types can be enabled.
Setting a value of `-1` will enable all tracing types.

Supported tracing levels are in the table below

| Option | Description |
| ------ | ----------- |
| 1 | Enable basic tracing, which is tracing of UR adapters/devices discovery |
| 2 | Enable tracing of the UR calls |
| -1 | Enable all levels of tracing |


## Debugging variables for Level Zero Plugin

:warning: **Warning:** <span style="color:red">the environment variables
Expand Down
6 changes: 5 additions & 1 deletion sycl/include/sycl/detail/ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ initializeUr(ur_loader_config_handle_t LoaderConfig = nullptr);
// Get the plugin serving given backend.
template <backend BE> const PluginPtr &getPlugin();

// The SYCL_UR_TRACE sets what we will trace.
// This is a bit-mask of various things we'd want to trace.
enum TraceLevel { TRACE_BASIC = 0x1, TRACE_CALLS = 0x2, TRACE_ALL = -1 };

// Return true if we want to trace UR related activities.
bool trace();
bool trace(TraceLevel level);

// Want all the needed casts be explicit, do not define conversion operators.
template <class To, class From> To cast(From value);
Expand Down
3 changes: 1 addition & 2 deletions sycl/source/detail/config.def
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ CONFIG(SYCL_PRINT_EXECUTION_GRAPH, 32, __SYCL_PRINT_EXECUTION_GRAPH)
CONFIG(SYCL_DISABLE_EXECUTION_GRAPH_CLEANUP, 1, __SYCL_DISABLE_EXECUTION_GRAPH_CLEANUP)
CONFIG(SYCL_DISABLE_POST_ENQUEUE_CLEANUP, 1, __SYCL_DISABLE_POST_ENQUEUE_CLEANUP)
CONFIG(SYCL_DEVICE_ALLOWLIST, 1024, __SYCL_DEVICE_ALLOWLIST)
CONFIG(SYCL_PI_TRACE, 16, __SYCL_PI_TRACE)
CONFIG(SYCL_UR_TRACE, 1, __SYCL_UR_TRACE)
CONFIG(SYCL_UR_TRACE, 16, __SYCL_UR_TRACE)
CONFIG(SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE, 16, __SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE)
CONFIG(SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING, 16, __SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING)
CONFIG(SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS, 64, __SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS)
Expand Down
22 changes: 22 additions & 0 deletions sycl/source/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,28 @@ template <ConfigID Config> class SYCLConfig {
}
};

template <> class SYCLConfig<SYCL_UR_TRACE> {
using BaseT = SYCLConfigBase<SYCL_UR_TRACE>;

public:
static int get() {
static bool Initialized = false;
// We don't use TraceLevel enum here because user can provide any bitmask
// which can correspond to several enum values.
static int Level = 0; // No tracing by default

// Configuration parameters are processed only once, like reading a string
// from environment and converting it into a typed object.
if (Initialized)
return Level;

const char *ValStr = BaseT::getRawValue();
Level = (ValStr ? std::atoi(ValStr) : 0);
Initialized = true;
return Level;
}
};

template <> class SYCLConfig<SYCL_RT_WARNING_LEVEL> {
using BaseT = SYCLConfigBase<SYCL_RT_WARNING_LEVEL>;

Expand Down
4 changes: 3 additions & 1 deletion sycl/source/detail/global_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ extern "C" __SYCL_EXPORT BOOL WINAPI DllMain(HINSTANCE hinstDLL,
std::exit(1);
}

bool PrintUrTrace = sycl::detail::ur::trace();
bool PrintUrTrace =
sycl::detail::ur::trace(sycl::detail::ur::TraceLevel::TRACE_CALLS);

// Perform actions based on the reason for calling.
switch (fdwReason) {
case DLL_PROCESS_DETACH:
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/platform_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static bool IsBannedPlatform(platform Platform) {
name) != std::string::npos;
const auto Backend = detail::getSyclObjImpl(Platform)->getBackend();
const bool IsMatchingOCL = (HasNameMatch && Backend == backend::opencl);
if (detail::ur::trace() && IsMatchingOCL) {
if (detail::ur::trace(detail::ur::TraceLevel::TRACE_ALL) && IsMatchingOCL) {
std::cout << "SYCL_UR_TRACE: " << name
<< " OpenCL platform found but is not compatible." << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/posix_ur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void *loadOsLibrary(const std::string &LibraryPath) {
// TODO: Check if the option RTLD_NOW is correct. Explore using
// RTLD_DEEPBIND option when there are multiple plugins.
void *so = dlopen(LibraryPath.c_str(), RTLD_NOW);
if (!so && detail::ur::trace()) {
if (!so && trace(TraceLevel::TRACE_ALL)) {
char *Error = dlerror();
std::cerr << "SYCL_UR_TRACE: dlopen(" << LibraryPath << ") failed with <"
<< (Error ? Error : "unknown error") << ">" << std::endl;
Expand Down
22 changes: 14 additions & 8 deletions sycl/source/detail/ur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ void *getPluginOpaqueData([[maybe_unused]] void *OpaqueDataParam) {
}

namespace ur {
bool trace() { return SYCLConfig<SYCL_UR_TRACE>::get(); }
bool trace(TraceLevel Level) {
auto TraceLevelMask = SYCLConfig<SYCL_UR_TRACE>::get();
return (TraceLevelMask & Level) == Level;
}

static void initializePlugins(std::vector<PluginPtr> &Plugins,
ur_loader_config_handle_t LoaderConfig);
Expand Down Expand Up @@ -108,20 +111,23 @@ static void initializePlugins(std::vector<PluginPtr> &Plugins,
OwnLoaderConfig = true;
}

auto SyclURTrace = SYCLConfig<SYCL_UR_TRACE>::get();
if (SyclURTrace && (std::atoi(SyclURTrace) != 0)) {
const char *LogOptions = "level:info;output:stdout;flush:info";
const char *LogOptions = "level:info;output:stdout;flush:info";
if (trace(TraceLevel::TRACE_CALLS)) {
#ifdef _WIN32
_putenv_s("UR_LOG_TRACING", LogOptions);
_putenv_s("UR_LOG_LOADER", LogOptions);
#else
setenv("UR_LOG_TRACING", LogOptions, 1);
setenv("UR_LOG_LOADER", LogOptions, 1);
#endif
CHECK_UR_SUCCESS(
urLoaderConfigEnableLayer(LoaderConfig, "UR_LAYER_TRACING"));
}

if (std::getenv("UR_LOG_TRACING")) {
CHECK_UR_SUCCESS(urLoaderConfigEnableLayer(LoaderConfig, "UR_LAYER_TRACING"));
if (trace(TraceLevel::TRACE_BASIC)) {
#ifdef _WIN32
_putenv_s("UR_LOG_LOADER", LogOptions);
#else
setenv("UR_LOG_LOADER", LogOptions, 1);
#endif
}

CHECK_UR_SUCCESS(urLoaderConfigSetCodeLocationCallback(
Expand Down
10 changes: 8 additions & 2 deletions sycl/source/device_selector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ static int getDevicePreference(const device &Device) {
}

static void traceDeviceSelection(const device &Device, int Score, bool Chosen) {
bool shouldTrace = detail::ur::trace();
bool shouldTrace = false;
if (Chosen) {
shouldTrace = detail::ur::trace(detail::ur::TraceLevel::TRACE_BASIC);
} else {
shouldTrace = detail::ur::trace(detail::ur::TraceLevel::TRACE_ALL);
}

if (shouldTrace) {
std::string PlatformName = Device.get_info<info::device::platform>()
.get_info<info::platform::name>();
Expand Down Expand Up @@ -162,7 +168,7 @@ select_device(const DSelectorInvocableType &DeviceSelectorInvocable,
/// 4. Accelerator

static void traceDeviceSelector(const std::string &DeviceType) {
bool ShouldTrace = detail::ur::trace();
bool ShouldTrace = detail::ur::trace(detail::ur::TraceLevel::TRACE_BASIC);
if (ShouldTrace) {
std::cout << "SYCL_UR_TRACE: Requested device_type: " << DeviceType
<< std::endl;
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ event handler::finalize() {
MCodeLoc));
break;
case detail::CGType::None:
if (detail::ur::trace()) {
if (detail::ur::trace(detail::ur::TraceLevel::TRACE_ALL)) {
std::cout << "WARNING: An empty command group is submitted." << std::endl;
}

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/alloc_pinned_host_memory.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// REQUIRES: level_zero || cuda

// RUN: %{build} -o %t2.out
// RUN: env SYCL_UR_TRACE=1 UR_L0_DEBUG=1 %{run} %t2.out %if level_zero %{ 2>&1 | FileCheck %s %}
// RUN: env SYCL_UR_TRACE=2 UR_L0_DEBUG=1 %{run} %t2.out %if level_zero %{ 2>&1 | FileCheck %s %}
// RUN: %{run} %t2.out

#include <sycl/detail/core.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: cpu
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s

#include <sycl/detail/core.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/buffer/subbuffer_overlap.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s

#include <sycl/detail/core.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/enqueue_barrier.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s

// The test is failing sporadically on Windows OpenCL RTs
// Disabling on windows until fixed
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/event_release.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: cpu
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s
#include <cassert>
#include <iostream>
#include <sycl/detail/core.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/fill_accessor_ur.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s

// This test merely checks the use of the correct UR call. Its sister test
// fill_accessor.cpp thoroughly checks the workings of the .fill() call.
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/host-task-dependency.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{build} -o %t.out %threads_lib
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s
//
// TODO: Behaviour is unstable for level zero on Windows. Enable when fixed.
// TODO: The test is sporadically fails on CUDA. Enable when fixed.
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/kernel_bundle/kernel_bundle_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// device image is statically linked against fallback libdevice.
// RUN: %{build} %if cpu %{ -DSYCL_DISABLE_FALLBACK_ASSERT=1 %} -fsycl-device-code-split=per_kernel -o %t.out
// RUN: %if cuda %{ %{run} %t.out %}
// RUN: %if cpu %{ env SYCL_UR_TRACE=1 %{run} %t.out | FileCheck %s %}
// RUN: %if cpu %{ env SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s %}

#include <iostream>
#include <sycl/detail/core.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/queue/release.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s
//
// TODO: Reenable on Windows, see https://github.com/intel/llvm/issues/14768
// XFAIL: hip_nvidia, windows
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/stream/release_resources_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// to fail there. See comments in GlobalHandler::releaseDefaultContexts
// UNSUPPORTED: windows
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s

// Check that buffer used by a stream object is released.

Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/Basic/subdevice_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// REQUIRES: cpu
//
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out separate equally | FileCheck %s --check-prefix CHECK-SEPARATE
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out shared equally | FileCheck %s --check-prefix CHECK-SHARED --implicit-check-not piContextCreate --implicit-check-not piMemBufferCreate
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out fused equally | FileCheck %s --check-prefix CHECK-FUSED --implicit-check-not piContextCreate --implicit-check-not piMemBufferCreate
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out separate equally | FileCheck %s --check-prefix CHECK-SEPARATE
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out shared equally | FileCheck %s --check-prefix CHECK-SHARED --implicit-check-not piContextCreate --implicit-check-not piMemBufferCreate
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out fused equally | FileCheck %s --check-prefix CHECK-FUSED --implicit-check-not piContextCreate --implicit-check-not piMemBufferCreate

#include <iostream>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Basic/use_pinned_host_memory.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// REQUIRES: cpu
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s

#include <sycl/detail/core.hpp>

Expand Down
16 changes: 8 additions & 8 deletions sycl/test-e2e/DeviceCodeSplit/grf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@

// REQUIRES: arch-intel_gpu_pvc
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-WITH-VAR
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-WITH-VAR
// RUN: %{build} -DUSE_NEW_API=1 -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-WITH-VAR
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-WITH-VAR
// RUN: %{build} -DUSE_AUTO_GRF=1 -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-WITH-VAR
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-WITH-VAR
// RUN: %{build} -DUSE_NEW_API=1 -DUSE_AUTO_GRF=1 -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-WITH-VAR
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-NO-VAR
// RUN: env SYCL_PROGRAM_COMPILE_OPTIONS="-g" SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-AUTO-WITH-VAR
#include "../helpers.hpp"
#include <iostream>
#include <sycl/detail/core.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeviceLib/assert-windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// explicitly. Since the test is going to crash, we'll have to follow a similar
// approach as on Linux - call the test in a subprocess.
//
// RUN: env SYCL_UR_TRACE=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %{run} %t.out | FileCheck %s --check-prefix=CHECK-FALLBACK
// RUN: env SYCL_UR_TRACE=2 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %{run} %t.out | FileCheck %s --check-prefix=CHECK-FALLBACK
// RUN: env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=1 CL_CONFIG_USE_VECTORIZER=False %{run} %t.out | FileCheck %s --check-prefix=CHECK-MESSAGE
//
// CHECK-MESSAGE: {{.*}}assert-windows.cpp:{{[0-9]+}}: (null): global id:
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeviceLib/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
// extension is a new feature and may not be supported by the runtime used with
// SYCL.
//
// RUN: %if cpu %{ env SYCL_UR_TRACE=1 SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGABRT %{run} %t.out 2> %t.stderr.native %}
// RUN: %if cpu %{ env SYCL_UR_TRACE=2 SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGABRT %{run} %t.out 2> %t.stderr.native %}
// RUN: %if cpu %{ FileCheck %s --input-file %t.stderr.native --check-prefixes=CHECK-MESSAGE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED %}
// RUN: %if gpu %{ env SHOULD_CRASH=1 EXPECTED_SIGNAL=SIGIOT %{run} %t.out 2> %t.stderr.native %}
// RUN: %if gpu %{ FileCheck %s --input-file %t.stderr.native --check-prefixes=CHECK-MESSAGE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED %}
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DiscardEvents/discard_events_accessors.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %{build} -Wno-error=deprecated-declarations -o %t.out
//
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
//
// The test checks that the last parameter is `nullptr` for
// urEnqueueKernelLaunch for USM kernel using local accessor, but
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// UNSUPPORTED: ze_debug
// RUN: %{build} -o %t.out
//
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
//
// The test checks that the last parameter is not `nullptr` for
// urEnqueueKernelLaunch.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %{build} -DNDEBUG -o %t.out
//
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
//
// The test checks that the last parameter is `nullptr` for
// urEnqueueKernelLaunch.
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/ESIMD/esimd_check_vc_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
// RUN: %{build} -o %t.out
// RUN: env SYCL_UR_TRACE=1 %{run} %t.out 2>&1 | FileCheck %s
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out 2>&1 | FileCheck %s

#include "esimd_test_utils.hpp"

Expand Down
Loading

0 comments on commit 390a472

Please sign in to comment.