Skip to content

[BUG] CUDA detection does not work on Clang #55

@lahwaacz

Description

@lahwaacz

spy uses this code:

#if defined(__CUDACC__)
#  define SPY_ACCELERATOR_SUPPORTS_CUDA
  constexpr inline auto  cuda  = cuda_t<__CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, 0>{};
#elif defined(SPY_DOXYGEN_INVOKED)
  constexpr inline auto  cuda  = **implementation-defined**;
#else
  constexpr inline auto  cuda  = cuda_t<-1,-1,-1>{};
#endif

However, when clang compiles CUDA, it defines __CUDACC__ but not __CUDACC_VER_MAJOR__ and __CUDACC_VER_MINOR__.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions