Skip to content

[SYCL][UR] do not expose UR as a backend of SYCL #9013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions sycl/include/sycl/backend_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ enum class backend : char {
ext_intel_esimd_emulator,
ext_oneapi_hip = 6,
hip __SYCL2020_DEPRECATED("use 'ext_oneapi_hip' instead") = ext_oneapi_hip,
ext_oneapi_unified_runtime = 7,
};

template <backend Backend> class backend_traits;
Expand Down Expand Up @@ -64,9 +63,6 @@ inline std::ostream &operator<<(std::ostream &Out, backend be) {
case backend::ext_oneapi_hip:
Out << "ext_oneapi_hip";
break;
case backend::ext_oneapi_unified_runtime:
Out << "ext_oneapi_unified_runtime";
break;
case backend::all:
Out << "all";
}
Expand Down
4 changes: 0 additions & 4 deletions sycl/include/sycl/detail/pi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,25 @@ bool trace(TraceLevel level);
#define __SYCL_CUDA_PLUGIN_NAME "pi_cuda.dll"
#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "pi_esimd_emulator.dll"
#define __SYCL_HIP_PLUGIN_NAME "libpi_hip.dll"
#define __SYCL_UNIFIED_RUNTIME_PLUGIN_NAME "pi_unified_runtime.dll"
#else
#define __SYCL_OPENCL_PLUGIN_NAME "libpi_opencl.dll"
#define __SYCL_LEVEL_ZERO_PLUGIN_NAME "libpi_level_zero.dll"
#define __SYCL_CUDA_PLUGIN_NAME "libpi_cuda.dll"
#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "libpi_esimd_emulator.dll"
#define __SYCL_HIP_PLUGIN_NAME "libpi_hip.dll"
#define __SYCL_UNIFIED_RUNTIME_PLUGIN_NAME "libpi_unified_runtime.dll"
#endif
#elif defined(__SYCL_RT_OS_LINUX)
#define __SYCL_OPENCL_PLUGIN_NAME "libpi_opencl.so"
#define __SYCL_LEVEL_ZERO_PLUGIN_NAME "libpi_level_zero.so"
#define __SYCL_CUDA_PLUGIN_NAME "libpi_cuda.so"
#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "libpi_esimd_emulator.so"
#define __SYCL_UNIFIED_RUNTIME_PLUGIN_NAME "libpi_unified_runtime.so"
#define __SYCL_HIP_PLUGIN_NAME "libpi_hip.so"
#elif defined(__SYCL_RT_OS_DARWIN)
#define __SYCL_OPENCL_PLUGIN_NAME "libpi_opencl.dylib"
#define __SYCL_LEVEL_ZERO_PLUGIN_NAME "libpi_level_zero.dylib"
#define __SYCL_CUDA_PLUGIN_NAME "libpi_cuda.dylib"
#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "libpi_esimd_emulator.dylib"
#define __SYCL_HIP_PLUGIN_NAME "libpi_hip.dylib"
#define __SYCL_UNIFIED_RUNTIME_PLUGIN_NAME "libpi_unified_runtime.dylib"
#else
#error "Unsupported OS"
#endif
Expand Down
5 changes: 2 additions & 3 deletions sycl/source/detail/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,14 @@ getSyclDeviceTypeMap() {

// Array is used by SYCL_DEVICE_FILTER and SYCL_DEVICE_ALLOWLIST and
// ONEAPI_DEVICE_SELECTOR
const std::array<std::pair<std::string, backend>, 8> &getSyclBeMap() {
static const std::array<std::pair<std::string, backend>, 8> SyclBeMap = {
const std::array<std::pair<std::string, backend>, 7> &getSyclBeMap() {
static const std::array<std::pair<std::string, backend>, 7> SyclBeMap = {
{{"host", backend::host},
{"opencl", backend::opencl},
{"level_zero", backend::ext_oneapi_level_zero},
{"cuda", backend::ext_oneapi_cuda},
{"hip", backend::ext_oneapi_hip},
{"esimd_emulator", backend::ext_intel_esimd_emulator},
{"ext_oneapi_unified_runtime", backend::ext_oneapi_unified_runtime},
{"*", backend::all}}};
return SyclBeMap;
}
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ getSyclDeviceTypeMap();

// Array is used by SYCL_DEVICE_FILTER and SYCL_DEVICE_ALLOWLIST and
// ONEAPI_DEVICE_SELECTOR
const std::array<std::pair<std::string, backend>, 8> &getSyclBeMap();
const std::array<std::pair<std::string, backend>, 7> &getSyclBeMap();

// ---------------------------------------
// ONEAPI_DEVICE_SELECTOR support
Expand Down
6 changes: 0 additions & 6 deletions sycl/source/detail/pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ std::vector<std::pair<std::string, backend>> findPlugins() {
"conjunction with SYCL_DEVICE_FILTER");
} else if (!FilterList && !OdsTargetList) {
PluginNames.emplace_back(__SYCL_OPENCL_PLUGIN_NAME, backend::opencl);
PluginNames.emplace_back(__SYCL_UNIFIED_RUNTIME_PLUGIN_NAME,
backend::ext_oneapi_unified_runtime);
PluginNames.emplace_back(__SYCL_LEVEL_ZERO_PLUGIN_NAME,
backend::ext_oneapi_level_zero);
PluginNames.emplace_back(__SYCL_CUDA_PLUGIN_NAME, backend::ext_oneapi_cuda);
Expand Down Expand Up @@ -329,10 +327,6 @@ std::vector<std::pair<std::string, backend>> findPlugins() {
if (list.backendCompatible(backend::opencl)) {
PluginNames.emplace_back(__SYCL_OPENCL_PLUGIN_NAME, backend::opencl);
}
if (list.backendCompatible(backend::ext_oneapi_unified_runtime)) {
PluginNames.emplace_back(__SYCL_UNIFIED_RUNTIME_PLUGIN_NAME,
backend::ext_oneapi_unified_runtime);
}
if (list.backendCompatible(backend::ext_oneapi_level_zero)) {
PluginNames.emplace_back(__SYCL_LEVEL_ZERO_PLUGIN_NAME,
backend::ext_oneapi_level_zero);
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Plugin/sycl-ls-unified-runtime.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// REQUIRES: TEMPORARY_DISABLED
// Unified Runtime will soon be changing its reporting.
//
// RUN: env ONEAPI_DEVICE_SELECTOR="ext_oneapi_unified_runtime:*" sycl-ls --verbose 2>&1 %GPU_CHECK_PLACEHOLDER
// RUN: env ONEAPI_DEVICE_SELECTOR="ext_oneapi_level_zero:*" sycl-ls --verbose 2>&1 %GPU_CHECK_PLACEHOLDER

// CHECK: Platforms: 1
// CHECK-NEXT: Platform [#1]:
Expand Down
1 change: 0 additions & 1 deletion sycl/test-e2e/Regression/device_num.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const std::map<backend, std::string> BackendStringMap = {
{backend::opencl, "opencl"},
{backend::host, "host"},
{backend::ext_oneapi_level_zero, "ext_oneapi_level_zero"},
{backend::ext_oneapi_unified_runtime, "ext_oneapi_unified_runtime"},
{backend::ext_intel_esimd_emulator, "ext_intel_esimd_emulator"},
{backend::ext_oneapi_cuda, "ext_oneapi_cuda"},
{backend::ext_oneapi_hip, "ext_oneapi_hip"}};
Expand Down
10 changes: 3 additions & 7 deletions sycl/unittests/allowlist/ParseAllowList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,9 @@ TEST(ParseAllowListTests, CheckAllValidBackendNameValuesAreProcessed) {
sycl::detail::AllowListParsedT ActualValue =
sycl::detail::parseAllowList(AllowList);
sycl::detail::AllowListParsedT ExpectedValue{
{{"BackendName", "host"}},
{{"BackendName", "opencl"}},
{{"BackendName", "level_zero"}},
{{"BackendName", "cuda"}},
{{"BackendName", "hip"}},
{{"BackendName", "esimd_emulator"}},
{{"BackendName", "ext_oneapi_unified_runtime"}},
{{"BackendName", "host"}}, {{"BackendName", "opencl"}},
{{"BackendName", "level_zero"}}, {{"BackendName", "cuda"}},
{{"BackendName", "hip"}}, {{"BackendName", "esimd_emulator"}},
{{"BackendName", "*"}}};
EXPECT_EQ(ExpectedValue, ActualValue);
}
Expand Down