Skip to content
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

Cuda E2E test fails due to redefinition #16070

Open
dklochkov-emb opened this issue Nov 13, 2024 · 0 comments
Open

Cuda E2E test fails due to redefinition #16070

dklochkov-emb opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working cuda CUDA back-end

Comments

@dklochkov-emb
Copy link
Contributor

dklochkov-emb commented Nov 13, 2024

Describe the bug

Initial issue see here
#15819

When I tried to repair all the tests, CUDA interop_all_backend test fails with the results:

FAIL: SYCL :: Basic/interop/interop_all_backends.cpp (280 of 2270)
******************** TEST 'SYCL :: Basic/interop/interop_all_backends.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):

/__w/llvm/llvm/toolchain/bin//clang++ -Werror -fsycl -fsycl-targets=nvptx64-nvidia-cuda /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -isystem /__w/llvm/llvm/toolchain/include -DBUILD_FOR_CUDA -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-cuda.out
executed command: /__w/llvm/llvm/toolchain/bin//clang++ -Werror -fsycl -fsycl-targets=nvptx64-nvidia-cuda /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp -isystem /__w/llvm/llvm/toolchain/include -DBUILD_FOR_CUDA -o /__w/llvm/llvm/build-e2e/Basic/interop/Output/interop_all_backends.cpp.tmp-cuda.out
.---command stderr------------
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:42:20: error: redefinition of 'interop<sycl::backend::ext_oneapi_cuda, sycl::context>'
| 42 | template <> struct interop<backend::ext_oneapi_cuda, context> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:44:20: note: previous definition is here
| 44 | template <> struct interop<backend::ext_oneapi_cuda, context> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:46:20: error: redefinition of 'interop<sycl::backend::ext_oneapi_cuda, sycl::device>'
| 46 | template <> struct interop<backend::ext_oneapi_cuda, device> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:48:20: note: previous definition is here
| 48 | template <> struct interop<backend::ext_oneapi_cuda, device> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:50:20: error: redefinition of 'interop<sycl::backend::ext_oneapi_cuda, sycl::event>'
| 50 | template <> struct interop<backend::ext_oneapi_cuda, event> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:52:20: note: previous definition is here
| 52 | template <> struct interop<backend::ext_oneapi_cuda, event> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:54:20: error: redefinition of 'interop<sycl::backend::ext_oneapi_cuda, sycl::queue>'
| 54 | template <> struct interop<backend::ext_oneapi_cuda, queue> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:56:20: note: previous definition is here
| 56 | template <> struct interop<backend::ext_oneapi_cuda, queue> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:63:8: error: redefinition of 'BackendInput<backend::ext_oneapi_cuda, buffer<DataT, Dimensions, AllocatorT>>'
| 63 | struct BackendInput<backend::ext_oneapi_cuda,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 64 | buffer<DataT, Dimensions, AllocatorT>> {
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:61:8: note: previous definition is here
| 61 | struct BackendInput<backend::ext_oneapi_cuda,
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:69:8: error: redefinition of 'BackendReturn<backend::ext_oneapi_cuda, buffer<DataT, Dimensions, AllocatorT>>'
| 69 | struct BackendReturn<backend::ext_oneapi_cuda,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 70 | buffer<DataT, Dimensions, AllocatorT>> {
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:67:8: note: previous definition is here
| 67 | struct BackendReturn<backend::ext_oneapi_cuda,
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:74:20: error: redefinition of 'BackendInput<sycl::backend::ext_oneapi_cuda, sycl::context>'
| 74 | template <> struct BackendInput<backend::ext_oneapi_cuda, context> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:72:20: note: previous definition is here
| 72 | template <> struct BackendInput<backend::ext_oneapi_cuda, context> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:78:20: error: redefinition of 'BackendReturn<sycl::backend::ext_oneapi_cuda, sycl::context>'
| 78 | template <> struct BackendReturn<backend::ext_oneapi_cuda, context> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:76:20: note: previous definition is here
| 76 | template <> struct BackendReturn<backend::ext_oneapi_cuda, context> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:82:20: error: redefinition of 'BackendInput<sycl::backend::ext_oneapi_cuda, sycl::device>'
| 82 | template <> struct BackendInput<backend::ext_oneapi_cuda, device> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:80:20: note: previous definition is here
| 80 | template <> struct BackendInput<backend::ext_oneapi_cuda, device> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:86:20: error: redefinition of 'BackendReturn<sycl::backend::ext_oneapi_cuda, sycl::device>'
| 86 | template <> struct BackendReturn<backend::ext_oneapi_cuda, device> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:84:20: note: previous definition is here
| 84 | template <> struct BackendReturn<backend::ext_oneapi_cuda, device> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:90:20: error: redefinition of 'BackendInput<sycl::backend::ext_oneapi_cuda, sycl::event>'
| 90 | template <> struct BackendInput<backend::ext_oneapi_cuda, event> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:88:20: note: previous definition is here
| 88 | template <> struct BackendInput<backend::ext_oneapi_cuda, event> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:94:20: error: redefinition of 'BackendReturn<sycl::backend::ext_oneapi_cuda, sycl::event>'
| 94 | template <> struct BackendReturn<backend::ext_oneapi_cuda, event> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:92:20: note: previous definition is here
| 92 | template <> struct BackendReturn<backend::ext_oneapi_cuda, event> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:98:20: error: redefinition of 'BackendInput<sycl::backend::ext_oneapi_cuda, sycl::queue>'
| 98 | template <> struct BackendInput<backend::ext_oneapi_cuda, queue> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:96:20: note: previous definition is here
| 96 | template <> struct BackendInput<backend::ext_oneapi_cuda, queue> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| In file included from /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:15:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/backend_traits_cuda.hpp:102:20: error: redefinition of 'BackendReturn<sycl::backend::ext_oneapi_cuda, sycl::queue>'
| 102 | template <> struct BackendReturn<backend::ext_oneapi_cuda, queue> {
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:100:20: note: previous definition is here
| 100 | template <> struct BackendReturn<backend::ext_oneapi_cuda, queue> {
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:40:13: error: redefinition of 'get_native<sycl::backend::ext_oneapi_cuda, sycl::context>'
| 40 | inline auto get_native<backend::ext_oneapi_cuda, context>(const context &C)
| | ^
| /__w/llvm/llvm/toolchain/include/sycl/backend.hpp:224:60: note: previous definition is here
| 224 | inline backend_return_t<backend::ext_oneapi_cuda, context> get_native<
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:47:7: error: type 'backend_return_t<backend::ext_oneapi_cuda, context>' (aka 'CUctx_st *') cannot be used prior to '::' because it has no members
| 47 | backend_return_t<backend::ext_oneapi_cuda, context>::value_type>(
| | ^
| /__w/llvm/llvm/toolchain/include/sycl/backend.hpp:86:1: note: type alias template 'backend_return_t' declared here
| 86 | using backend_return_t =
| | ^
| In file included from /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:12:
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:49:6: error: member reference type 'backend_return_t<backend::ext_oneapi_cuda, context>' (aka 'CUctx_st *') is a pointer; did you mean to use '->'?
| 49 | ret.push_back(native);
| | ~~~^
| /__w/llvm/llvm/toolchain/include/sycl/ext/oneapi/experimental/backend/cuda.hpp:49:6: error: incomplete definition of type 'struct CUctx_st'
| 49 | ret.push_back(native);
| | ~~~^
| /__w/llvm/llvm/toolchain/include/sycl/detail/backend_traits_cuda.hpp:25:16: note: forward declaration of 'CUctx_st'
| 25 | typedef struct CUctx_st *CUcontext;
| | ^
| /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/interop/interop_all_backends.cpp:84:13: error: no matching function for call to 'get_native'
| 84 | get_native(Context);
| | ^~~~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/backend.hpp:149:6: note: candidate function template not viable: no known conversion from 'context' to 'const queue' for 1st argument
| 149 | auto get_native(const queue &Obj) -> backend_return_t<BackendName, queue> {
| | ^ ~~~~~~~~~~~~~~~~
| /__w/llvm/llvm/toolchain/include/sycl/backend.hpp:138:6: note: candidate template ignored: substitution failure [with BackendName = sycl::backend::ext_oneapi_cuda, SyclObjectT = context]
| 138 | auto get_native(const SyclObjectT &Obj)
| | ^
| /__w/llvm/llvm/toolchain/include/sycl/backend.hpp:170:6: note: candidate template ignored: could not match 'kernel_bundle' against 'context'
| 170 | auto get_native(const kernel_bundle &Obj)
| | ^
| /__w/llvm/llvm/toolchain/include/sycl/backend.hpp:181:6: note: candidate template ignored: could not match 'buffer<DataT, Dimensions, AllocatorT>' against 'context'
| 181 | auto get_native(const buffer<DataT, Dimensions, AllocatorT> &Obj)
| | ^
| /__w/llvm/llvm/toolchain/include/sycl/backend.hpp:257:6: note: candidate template ignored: could not match 'accessor<DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder>' against 'context'
| 257 | auto get_native(const accessor<DataT, Dimensions, AccessMode, AccessTarget,
| | ^
| 19 errors generated.
`-----------------------------
error: command failed with exit status: 1

All other tests from the issue were restored

To reproduce

  1. Ensure that
    // XFAIL: any-device-is-cuda is removed from sycl/test-e2e/Basic/interop/interop_all_backends.cpp
  2. Run llvm-lit -vv sycl/test-e2e/Basic/interop/interop_all_backends.cpp

Environment

  • OS: [e.g Windows/Linux]
  • Target device and vendor: [e.g. Nvidia GPU]
  • DPC++ version: [e.g. commit hash or output of clang++ --version]
  • Dependencies version: [e.g. the output of nvidia-smi and sycl-ls --verbose]

Additional context

No response

@dklochkov-emb dklochkov-emb added bug Something isn't working cuda CUDA back-end labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuda CUDA back-end
Projects
None yet
Development

No branches or pull requests

1 participant