-
Notifications
You must be signed in to change notification settings - Fork 130
[SYCL] Rename cuda, hip, level_zero backends to conform SYCL 2020 #521
Conversation
According to SYCL spec, backend::cuda is renamed to backend::ext_oneapi_cuda, backend::hip is renamed to backend::ext_oneapi_hip, and backend::level_zero is renamed to backend::ext_oneapi_level_zero. The backend interop APIs is available through separate header files "sycl/ext/oneapi/backend/<backendname>.hpp".
As I understand, the changes in the compiler (see intel/llvm#4785) must be merged before this patch. |
Conflicts: SYCL/Basic/interop/traits.cpp - removed
Signed-off-by: Pavel Samolysov <[email protected]>
Signed-off-by: Pavel Samolysov <[email protected]>
The changes in the compiler has been merged, the PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sub_groups_sycl2020.cpp
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why CUDA backend has the relation to "oneapi": ext_oneapi_cuda
?
@smaslov-intel Chupin Pavel @pvchupin has approved using |
This doesn't look right to me. Do you understand the reason for such direction? |
@smaslov-intel The idea is to have CUDA as an extension since CUDA is not a backend that is defined in the SYCL 2020 specification (only opencl is). If we define CUDA as a "standard" backend as well as the opencl one is defined and in the future CUDA will really be specified in the SYCL specification, some details in the specification can be changed and not the same as we defined them. So, we will potentially have a problem: our CUDA backend is in the standard namespace and have a standard enumeration ( |
I agree it is an "extension" just wondering why we call it a "oneapi" extension. |
@smaslov-intel Do I right understand, the concern is CUDA should be a part of the intel extension, not oneapi one because the CUDA extension is not built (by default?) with oneapi? @gmlueck @jbrodman could you explain why we have chosen "oneapi" as the vendorstring for CUDA and HIP extensions? |
The "vendorstring" identifies the vendor that creates the extension, so that's us. We use the vendor string "oneapi". Remember, this extension is only the interop API to CUDA / HIP. It is not the CUDA / HIP backend itself. We are not claiming ownership of those backends, only to the interop API we develop to those backends. |
@smaslov-intel Let me bring my consideration about chosen vendorstring. Even if "oneapi" is not built with CUDA support by default, we have an open source project |
@@ -91,8 +93,8 @@ int queryFromNativeHandle(std::vector<cl::sycl::platform> *platform_list, | |||
zeDeviceGet(l0_drivers[0], &l0_device_count, l0_devices.data()); | |||
|
|||
// Create the platform and device objects using the native handle. | |||
auto plt = cl::sycl::level_zero::make<cl::sycl::platform>(l0_drivers[0]); | |||
auto dev = cl::sycl::level_zero::make<cl::sycl::device>(plt, l0_devices[0]); | |||
auto plt = level_zero::make<cl::sycl::platform>(l0_drivers[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking comment: "cl::" here could be removed. I.e. "sycl::platform" instead of "cl::sycl::platform"
…tel/llvm-test-suite#521) * [SYCL] Rename cuda, hip, level_zero backends to conform SYCL 2020 According to SYCL spec, backend::cuda is renamed to backend::ext_oneapi_cuda, backend::hip is renamed to backend::ext_oneapi_hip, and backend::level_zero is renamed to backend::ext_oneapi_level_zero. The backend interop APIs is available through separate header files "sycl/ext/oneapi/backend/<backendname>.hpp". * [SYCL] Rename hip backend to conform SYCL 2020 Signed-off-by: Pavel Samolysov <[email protected]> * [SYCL] Remove outdated header sycl/ext/oneapi/backend/cuda.hpp Signed-off-by: Pavel Samolysov <[email protected]>
According to SYCL spec, backend::cuda is renamed to backend::ext_oneapi_cuda,
backend::hip is renamed to backend::ext_oneapi_hip, and backend::level_zero is
renamed to backend::ext_oneapi_level_zero. The backend interop APIs is available
through separate header files "sycl/ext/oneapi/backend/[backendname].hpp".