Skip to content

Conversation

@npmiller
Copy link
Contributor

This header needs a sepcific macro to be defined when it is included which is why the generic test gives out warnings. Add a specific test for it so we can define the macro.

This header needs a sepcific macro to be defined when it is included
which is why the generic test gives out warnings. Add a specific test
for it so we can define the macro.
@npmiller npmiller requested a review from AlexeySachkov March 26, 2025 11:16
@npmiller npmiller requested a review from a team as a code owner March 26, 2025 11:16
@aelovikov-intel
Copy link
Contributor

Is that because of

#ifndef SYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL
template <>
__SYCL_DEPRECATED(
"Context interop is deprecated for CUDA. If a native context is required,"
" use cuDevicePrimaryCtxRetain with a native device")
inline backend_return_t<backend::ext_oneapi_cuda, context> get_native<
backend::ext_oneapi_cuda, context>(const context &Obj) {
if (Obj.get_backend() != backend::ext_oneapi_cuda) {
throw sycl::exception(make_error_code(errc::backend_mismatch),
"Backends mismatch");
}
return reinterpret_cast<backend_return_t<backend::ext_oneapi_cuda, context>>(
Obj.getNative());
}
? I don't see why it matters...

https://github.com/search?q=repo%3Aintel%2Fllvm%20SYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL&type=code doesn't show any other uses of the macro in the code...

@npmiller
Copy link
Contributor Author

This is the more consequential use:

#if SYCL_EXT_ONEAPI_BACKEND_CUDA
#ifdef SYCL_EXT_ONEAPI_BACKEND_CUDA_EXPERIMENTAL
#include <sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp>
#else
#include <sycl/detail/backend_traits_cuda.hpp>
#endif
#endif

There's different backend traits depending on which version of the interop is used. The experimental header doesn't work with the legacy traits, and it can't all be contained to the header because the SYCL headers need to know about the type traits as well. This is extremely clunky and needs to be cleared up eventually so we only have one set of interop traits, but that's how it works at the moment.

@npmiller
Copy link
Contributor Author

@intel/llvm-gatekeepers this looks good to merge.

The PVC failure looks like there's an issue with the machine (can't find GPU), and this patch only changes a compiler only test, so it shouldn't affect the PVC E2E results.

@sarnex
Copy link
Contributor

sarnex commented Mar 26, 2025

I'm fixing the PVC machine now, yeah it's unrelated

@sarnex sarnex merged commit cf86a44 into intel:sycl Mar 26, 2025
42 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants