diff --git a/sycl/include/CL/sycl/detail/pi.hpp b/sycl/include/CL/sycl/detail/pi.hpp index a374288d703b6..3c9417628a01e 100644 --- a/sycl/include/CL/sycl/detail/pi.hpp +++ b/sycl/include/CL/sycl/detail/pi.hpp @@ -43,6 +43,17 @@ enum class PiApiKind { class plugin; namespace pi { +// The SYCL_PI_TRACE sets what we will trace. +// This is a bit-mask of various things we'd want to trace. +enum TraceLevel { + PI_TRACE_BASIC = 0x1, + PI_TRACE_CALLS = 0x2, + PI_TRACE_ALL = -1 +}; + +// Return true if we want to trace PI related activities. +bool trace(TraceLevel level); + #ifdef SYCL_RT_OS_WINDOWS #define OPENCL_PLUGIN_NAME "pi_opencl.dll" #define CUDA_PLUGIN_NAME "pi_cuda.dll" @@ -115,8 +126,8 @@ void *getOsLibraryFuncAddress(void *Library, const std::string &FunctionName); // environment variable. enum Backend { SYCL_BE_PI_OPENCL, SYCL_BE_PI_CUDA, SYCL_BE_PI_OTHER }; -// Check for manually selected BE at run-time. -bool useBackend(Backend Backend); +// Get the preferred BE (selected with SYCL_BE). +Backend getPreferredBE(); // Get a string representing a _pi_platform_info enum std::string platformInfoToString(pi_platform_info info); diff --git a/sycl/source/detail/pi.cpp b/sycl/source/detail/pi.cpp index 4ec13c447a1c7..1e5a744784166 100644 --- a/sycl/source/detail/pi.cpp +++ b/sycl/source/detail/pi.cpp @@ -22,9 +22,9 @@ #include #include #include +#include #include #include -#include #ifdef XPTI_ENABLE_INSTRUMENTATION // Include the headers necessary for emitting @@ -141,39 +141,80 @@ std::string memFlagsToString(pi_mem_flags Flags) { return Sstream.str(); } -// Check for manually selected BE at run-time. -static Backend getBackend() { - static const char *GetEnv = std::getenv("SYCL_BE"); - // Current default backend as SYCL_BE_PI_OPENCL - // Valid values of GetEnv are "PI_OPENCL", "PI_CUDA" and "PI_OTHER" - std::string StringGetEnv = (GetEnv ? GetEnv : "PI_OPENCL"); - static const Backend Use = - std::map{ - { "PI_OPENCL", SYCL_BE_PI_OPENCL }, - { "PI_CUDA", SYCL_BE_PI_CUDA }, - { "PI_OTHER", SYCL_BE_PI_OTHER } - }[ GetEnv ? StringGetEnv : "PI_OPENCL"]; - return Use; +// A singleton class to aid that PI configuration parameters +// are processed only once, like reading a string from environment +// and converting it into a typed object. +// +template class Config { + static Config *m_Instance; + T m_Data; + Config(); + +public: + static T get() { + if (!m_Instance) { + m_Instance = new Config(); + } + return m_Instance->m_Data; + } +}; + +template +Config *Config::m_Instance = nullptr; + +// Lists valid configuration environment variables. +static constexpr char SYCL_BE[] = "SYCL_BE"; +static constexpr char SYCL_INTEROP_BE[] = "SYCL_INTEROP_BE"; +static constexpr char SYCL_PI_TRACE[] = "SYCL_PI_TRACE"; + +// SYCL_PI_TRACE gives the mask of enabled tracing components (0 default) +template <> Config::Config() { + const char *Env = std::getenv(SYCL_PI_TRACE); + m_Data = (Env ? std::atoi(Env) : 0); +} + +static Backend getBE(const char *EnvVar) { + const char *BE = std::getenv(EnvVar); + const std::map SyclBeMap{ + {"PI_OTHER", SYCL_BE_PI_OTHER}, + {"PI_CUDA", SYCL_BE_PI_CUDA}, + {"PI_OPENCL", SYCL_BE_PI_OPENCL}}; + if (BE) { + auto It = SyclBeMap.find(BE); + if (It == SyclBeMap.end()) + pi::die("Invalid backend. " + "Valid values are PI_OPENCL/PI_CUDA"); + return It->second; + } + // Default backend + return SYCL_BE_PI_OPENCL; } -// Check for manually selected BE at run-time. -bool useBackend(Backend TheBackend) { - return TheBackend == getBackend(); +template <> Config::Config() { m_Data = getBE(SYCL_BE); } + +// SYCL_INTEROP_BE is a way to specify the interoperability plugin. +template <> Config::Config() { + m_Data = getBE(SYCL_INTEROP_BE); } +// Helper interface to not expose "pi::Config" outside of pi.cpp +Backend getPreferredBE() { return Config::get(); } + // GlobalPlugin is a global Plugin used with Interoperability constructors that // use OpenCL objects to construct SYCL class objects. std::shared_ptr GlobalPlugin; // Find the plugin at the appropriate location and return the location. -// TODO: Change the function appropriately when there are multiple plugins. -bool findPlugins(vector_class &PluginNames) { +bool findPlugins(vector_class> &PluginNames) { // TODO: Based on final design discussions, change the location where the // plugin must be searched; how to identify the plugins etc. Currently the // search is done for libpi_opencl.so/pi_opencl.dll file in LD_LIBRARY_PATH // env only. - PluginNames.push_back(OPENCL_PLUGIN_NAME); - PluginNames.push_back(CUDA_PLUGIN_NAME); + // + PluginNames.push_back(std::make_pair( + OPENCL_PLUGIN_NAME, SYCL_BE_PI_OPENCL)); + PluginNames.push_back( + std::make_pair(CUDA_PLUGIN_NAME, SYCL_BE_PI_CUDA)); return true; } @@ -207,52 +248,51 @@ bool bindPlugin(void *Library, PiPlugin *PluginInformation) { return true; } -// Load the plugin based on SYCL_BE. -// TODO: Currently only accepting OpenCL and CUDA plugins. Edit it to identify -// and load other kinds of plugins, do the required changes in the -// findPlugins, loadPlugin and bindPlugin functions. +bool trace(TraceLevel Level) { + auto TraceLevelMask = Config::get(); + return (TraceLevelMask & Level) == Level; +} + +// Initializes all available Plugins. vector_class initialize() { vector_class Plugins; - - if (!useBackend(SYCL_BE_PI_OPENCL) && !useBackend(SYCL_BE_PI_CUDA)) { - die("Unknown SYCL_BE"); - } - - bool EnableTrace = (std::getenv("SYCL_PI_TRACE") != nullptr); - - vector_class PluginNames; + vector_class> PluginNames; findPlugins(PluginNames); - if (PluginNames.empty() && EnableTrace) - std::cerr << "No Plugins Found." << std::endl; + if (PluginNames.empty() && trace(PI_TRACE_ALL)) + std::cerr << "SYCL_PI_TRACE[-1]: No Plugins Found." << std::endl; - PiPlugin PluginInformation; // TODO: include. + PiPlugin PluginInformation; for (unsigned int I = 0; I < PluginNames.size(); I++) { - void *Library = loadPlugin(PluginNames[I]); + void *Library = loadPlugin(PluginNames[I].first); if (!Library) { - if (EnableTrace) { - std::cerr << "Check if plugin is present. Failed to load plugin: " - << PluginNames[I] << std::endl; + if (trace(PI_TRACE_ALL)) { + std::cerr << "SYCL_PI_TRACE[-1]: Check if plugin is present. " + << "Failed to load plugin: " << PluginNames[I].first + << std::endl; } continue; } - if (!bindPlugin(Library, &PluginInformation) && EnableTrace) { - std::cerr << "Failed to bind PI APIs to the plugin: " << PluginNames[I] - << std::endl; - } - if (useBackend(SYCL_BE_PI_OPENCL) && - PluginNames[I].find("opencl") != std::string::npos) { - // Use the OpenCL plugin as the GlobalPlugin - GlobalPlugin = std::make_shared(PluginInformation); + if (!bindPlugin(Library, &PluginInformation)) { + if (trace(PI_TRACE_ALL)) { + std::cerr << "SYCL_PI_TRACE[-1]: Failed to bind PI APIs to the plugin: " + << PluginNames[I].first << std::endl; + } + continue; } - if (useBackend(SYCL_BE_PI_CUDA) && - PluginNames[I].find("cuda") != std::string::npos) { - // Use the CUDA plugin as the GlobalPlugin - GlobalPlugin = std::make_shared(PluginInformation); + // Set the Global Plugin based on SYCL_INTEROP_BE. + // Rework this when it will be explicit in the code which BE is used in the + // interoperability methods. + if (Config::get() == PluginNames[I].second) { + GlobalPlugin = + std::make_shared(PluginInformation, PluginNames[I].second); } - Plugins.push_back(plugin(PluginInformation)); + Plugins.emplace_back(plugin(PluginInformation, PluginNames[I].second)); + if (trace(TraceLevel::PI_TRACE_BASIC)) + std::cerr << "SYCL_PI_TRACE[1]: Plugin found and successfully loaded: " + << PluginNames[I].first << std::endl; } #ifdef XPTI_ENABLE_INSTRUMENTATION diff --git a/sycl/source/detail/plugin.hpp b/sycl/source/detail/plugin.hpp index 14ddf8f9560e2..b62739891cf68 100644 --- a/sycl/source/detail/plugin.hpp +++ b/sycl/source/detail/plugin.hpp @@ -23,9 +23,8 @@ class plugin { public: plugin() = delete; - plugin(RT::PiPlugin Plugin) : MPlugin(Plugin) { - MPiEnableTrace = (std::getenv("SYCL_PI_TRACE") != nullptr); - } + plugin(RT::PiPlugin Plugin, RT::Backend UseBackend) + : MPlugin(Plugin), MBackend(UseBackend) {} ~plugin() = default; @@ -52,13 +51,13 @@ class plugin { template RT::PiResult call_nocheck(ArgsT... Args) const { RT::PiFuncInfo PiCallInfo; - if (MPiEnableTrace) { + if (pi::trace(pi::TraceLevel::PI_TRACE_CALLS)) { std::string FnName = PiCallInfo.getFuncName(); std::cout << "---> " << FnName << "(" << std::endl; RT::printArgs(Args...); } RT::PiResult R = PiCallInfo.getFuncPtr(MPlugin)(Args...); - if (MPiEnableTrace) { + if (pi::trace(pi::TraceLevel::PI_TRACE_CALLS)) { std::cout << ") ---> "; RT::printArgs(R); } @@ -74,10 +73,11 @@ class plugin { checkPiResult(Err); } + RT::Backend getBackend(void) const { return MBackend; } + private: RT::PiPlugin MPlugin; - bool MPiEnableTrace; - + const RT::Backend MBackend; }; // class plugin } // namespace detail } // namespace sycl diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 064638eb8696f..61822938b6ab2 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -270,7 +270,8 @@ static bool isDeviceBinaryTypeSupported(const context &C, } // OpenCL 2.1 and greater require clCreateProgramWithIL - if (pi::useBackend(pi::SYCL_BE_PI_OPENCL) && + pi::Backend CBackend = (detail::getSyclObjImpl(C)->getPlugin()).getBackend(); + if ((CBackend == pi::SYCL_BE_PI_OPENCL) && C.get_platform().get_info() >= "2.1") return true; diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index bb783468ad604..16dcdb806f15f 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -1673,7 +1673,7 @@ cl_int ExecCGCommand::enqueueImp() { Requirement *Req = (Requirement *)(Arg.MPtr); AllocaCommandBase *AllocaCmd = getAllocaForReq(Req); RT::PiMem MemArg = (RT::PiMem)AllocaCmd->getMemAllocation(); - if (RT::useBackend(pi::Backend::SYCL_BE_PI_OPENCL)) { + if (Plugin.getBackend() == (pi::Backend::SYCL_BE_PI_OPENCL)) { Plugin.call(Kernel, Arg.MIndex, sizeof(RT::PiMem), &MemArg); } else { diff --git a/sycl/source/device.cpp b/sycl/source/device.cpp index 8d28be7ac855b..d901b8c106152 100644 --- a/sycl/source/device.cpp +++ b/sycl/source/device.cpp @@ -60,6 +60,51 @@ vector_class device::get_devices(info::device_type deviceType) { } } } + + // If SYCL_BE is set and there are multiple devices of the same type + // supported by different BE, and one of the devices is from SYCL_BE + // then only add that (and remove all others). This allows to force + // selection of a specific BE for a target, while running on other + // targets, unsupported by the SYCL_BE, with other BEs. + // + if (std::getenv("SYCL_BE")) { + vector_class filtered_devices; + auto SyclBE = detail::pi::getPreferredBE(); + + // On the first pass see which device types are supported with SYCL_BE + pi_uint64 TypesSupportedBySyclBE = 0; // bit-set of info::device_type + for (const auto &dev : devices) { + if (dev.is_host()) + continue; + auto BE = detail::getSyclObjImpl(dev)->getPlugin().getBackend(); + if (BE == SyclBE) { + TypesSupportedBySyclBE |= + (pi_uint64)dev.get_info(); + } + } + // On the second pass only add devices that are from SYCL_BE or not + // supported there. + // + for (const auto &dev : devices) { + if (dev.is_host()) { + // TODO: decide if we really want to add the host here. + // The cons of doing so is that if SYCL_BE is set but that BE + // is unavailable for whatever reason, the execution would silently + // proceed to the host while people may think it is running + // with the SYCL_BE as they wanted. + // + filtered_devices.push_back(dev); + continue; + } + + auto BE = detail::getSyclObjImpl(dev)->getPlugin().getBackend(); + auto Type = (pi_uint64)dev.get_info(); + if (BE == SyclBE || (TypesSupportedBySyclBE & Type) == 0) { + filtered_devices.push_back(dev); + } + } + return filtered_devices; + } return devices; } diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index 6eb1a32d13471..5840b2fb94bfe 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -10,23 +10,65 @@ #include #include #include +#include #include // 4.6.1 Device selection class __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { + +// Utility function to check if device is of the preferred SYCL_BE. +static bool isDeviceOfPreferredSyclBe(const device &Device) { + if (Device.is_host()) + return false; + + detail::pi::Backend PreferredBE = detail::pi::getPreferredBE(); + detail::pi::Backend DeviceBE = + detail::getSyclObjImpl(Device)->getPlugin().getBackend(); + return PreferredBE == DeviceBE ? true : false; +} + device device_selector::select_device() const { vector_class devices = device::get_devices(); int score = -1; const device *res = nullptr; - for (const auto &dev : devices) - if (score < operator()(dev)) { + for (const auto &dev : devices) { + int dev_score = (*this)(dev); + if (detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_ALL)) { + string_class PlatformVersion = dev.get_info() + .get_info(); + string_class DeviceName = dev.get_info(); + std::cout << "SYCL_PI_TRACE[1]: select_device(): -> score = " << score + << std::endl + << "SYCL_PI_TRACE[1]: platform: " << PlatformVersion + << std::endl + << "SYCL_PI_TRACE[1]: device: " << DeviceName << std::endl; + } + + // SYCL spec says: "If more than one device receives the high score then + // one of those tied devices will be returned, but which of the devices + // from the tied set is to be returned is not defined". Here we give a + // preference to the device of the preferred BE. + // + if (score < dev_score || + (score == dev_score && isDeviceOfPreferredSyclBe(dev))) { res = &dev; - score = operator()(dev); + score = dev_score; } + } - if (res != nullptr) + if (res != nullptr) { + if (detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_BASIC)) { + string_class PlatformVersion = res->get_info() + .get_info(); + string_class DeviceName = res->get_info(); + std::cout << "SYCL_PI_TRACE[1]: Selected device ->" << std::endl + << "SYCL_PI_TRACE[1]: platform: " << PlatformVersion + << std::endl + << "SYCL_PI_TRACE[1]: device: " << DeviceName << std::endl; + } return *res; + } throw cl::sycl::runtime_error("No device of requested type available.", PI_DEVICE_NOT_FOUND); @@ -34,57 +76,70 @@ device device_selector::select_device() const { int default_selector::operator()(const device &dev) const { - // Take note of the SYCL_BE environment variable when doing default selection - const char *SYCL_BE = std::getenv("SYCL_BE"); - if (SYCL_BE) { - std::string backend = (SYCL_BE ? SYCL_BE : ""); - // Taking the version information from the platform gives us more useful - // information than the driver_version of the device. - const platform platform = dev.get_info(); - const std::string platformVersion = - platform.get_info();; - // If using PI_CUDA, don't accept a non-CUDA device - if (platformVersion.find("CUDA") == std::string::npos && - backend == "PI_CUDA") { - return -1; - } - // If using PI_OPENCL, don't accept a non-OpenCL device - if (platformVersion.find("OpenCL") == std::string::npos && - backend == "PI_OPENCL") { - return -1; - } - } + int Score = -1; + + // Give preference to device of SYCL BE. + if (isDeviceOfPreferredSyclBe(dev)) + Score = 50; // override always wins if (dev.get_info() == detail::get_forced_type()) - return 1000; + Score += 1000; if (dev.is_gpu()) - return 500; + Score += 500; if (dev.is_cpu()) - return 300; + Score += 300; if (dev.is_host()) - return 100; + Score += 100; - return -1; + return Score; } int gpu_selector::operator()(const device &dev) const { - return dev.is_gpu() ? 1000 : -1; + int Score = -1; + if (dev.is_gpu()) { + Score = 1000; + // Give preference to device of SYCL BE. + if (isDeviceOfPreferredSyclBe(dev)) + Score += 50; + } + return Score; } int cpu_selector::operator()(const device &dev) const { - return dev.is_cpu() ? 1000 : -1; + int Score = -1; + if (dev.is_cpu()) { + Score = 1000; + // Give preference to device of SYCL BE. + if (isDeviceOfPreferredSyclBe(dev)) + Score += 50; + } + return Score; } int accelerator_selector::operator()(const device &dev) const { - return dev.is_accelerator() ? 1000 : -1; + int Score = -1; + if (dev.is_accelerator()) { + Score = 1000; + // Give preference to device of SYCL BE. + if (isDeviceOfPreferredSyclBe(dev)) + Score += 50; + } + return Score; } int host_selector::operator()(const device &dev) const { - return dev.is_host() ? 1000 : -1; + int Score = -1; + if (dev.is_host()) { + Score = 1000; + // Give preference to device of SYCL BE. + if (isDeviceOfPreferredSyclBe(dev)) + Score += 50; + } + return Score; } } // namespace sycl diff --git a/sycl/test/devicelib/assert.cpp b/sycl/test/devicelib/assert.cpp index 9170d2557e283..3106f7ac4d1e9 100644 --- a/sycl/test/devicelib/assert.cpp +++ b/sycl/test/devicelib/assert.cpp @@ -75,11 +75,11 @@ // // Overall this sounds stable enough. What could possibly go wrong? // -// RUN: env SYCL_PI_TRACE=1 SHOULD_CRASH=1 CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGABRT SKIP_IF_NO_EXT=1 %t.out 2>%t.stderr.native >%t.stdout.native +// RUN: env SYCL_PI_TRACE=2 SHOULD_CRASH=1 CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGABRT SKIP_IF_NO_EXT=1 %t.out 2>%t.stderr.native >%t.stdout.native // RUN: FileCheck %s --input-file %t.stdout.native --check-prefixes=CHECK-NATIVE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED // RUN: FileCheck %s --input-file %t.stderr.native --check-prefixes=CHECK-MESSAGE || FileCheck %s --input-file %t.stderr.native --check-prefix CHECK-NOTSUPPORTED // -// RUN: env SYCL_PI_TRACE=1 SYCL_DEVICELIB_INHIBIT_NATIVE=cl_intel_devicelib_assert CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGSEGV %t.out >%t.stdout.pi.fallback +// RUN: env SYCL_PI_TRACE=2 SYCL_DEVICELIB_INHIBIT_NATIVE=cl_intel_devicelib_assert CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGSEGV %t.out >%t.stdout.pi.fallback // RUN: env SHOULD_CRASH=1 SYCL_DEVICELIB_INHIBIT_NATIVE=cl_intel_devicelib_assert CL_CONFIG_USE_VECTORIZER=False SYCL_DEVICE_TYPE=CPU EXPECTED_SIGNAL=SIGSEGV %t.out >%t.stdout.msg.fallback // RUN: FileCheck %s --input-file %t.stdout.pi.fallback --check-prefixes=CHECK-FALLBACK // RUN: FileCheck %s --input-file %t.stdout.msg.fallback --check-prefixes=CHECK-MESSAGE diff --git a/sycl/test/regression/image_access.cpp b/sycl/test/regression/image_access.cpp index aa9303559c422..ee9af31c630be 100644 --- a/sycl/test/regression/image_access.cpp +++ b/sycl/test/regression/image_access.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out -// RUN: env SYCL_PI_TRACE=1 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER +// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER +// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER // TODO: For now PI checks are skipped for ACC device. To decide if it's good. // RUN: env %ACC_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/scheduler/HostAccDestruction.cpp b/sycl/test/scheduler/HostAccDestruction.cpp index e812816ead5ac..fda1c29298c0c 100644 --- a/sycl/test/scheduler/HostAccDestruction.cpp +++ b/sycl/test/scheduler/HostAccDestruction.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -I %sycl_source_dir %s -o %t.out -// RUN: env SYCL_PI_TRACE=1 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER +// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER //==---------------------- HostAccDestruction.cpp --------------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/scheduler/MemObjRemapping.cpp b/sycl/test/scheduler/MemObjRemapping.cpp index e0b49f6b94b62..04061f2a77e4c 100644 --- a/sycl/test/scheduler/MemObjRemapping.cpp +++ b/sycl/test/scheduler/MemObjRemapping.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl %s -o %t.out -// RUN: env SYCL_PI_TRACE=1 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER +// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER #include #include #include diff --git a/sycl/test/scheduler/ReleaseResourcesTest.cpp b/sycl/test/scheduler/ReleaseResourcesTest.cpp index 9fb6525efe982..b7ced5c5e59b8 100644 --- a/sycl/test/scheduler/ReleaseResourcesTest.cpp +++ b/sycl/test/scheduler/ReleaseResourcesTest.cpp @@ -1,8 +1,8 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out -// RUN: env SYCL_PI_TRACE=1 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER -// RUN: env SYCL_PI_TRACE=1 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER +// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER +// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER +// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER // TODO: error: expected string not found in input // TODO: PI ---> pi::piProgramCreate(Context, Data, DataLen, &Program)