How do I use other c++ compilers with CUDA on Windows?

后端 未结 2 510
悲&欢浪女
悲&欢浪女 2020-12-04 02:47

I\'m trying to build a simple application with CUDA and I\'ve been trying for hours on end and I just can\'t make it work on windows. nvcc absolutely refuses to compile with

相关标签:
2条回答
  • 2020-12-04 03:14

    The CUDA windows toolchain requires the Visual Studio C++ compiler. You cannot use anything else on that platform. If the VS compiler doesn't support the language features you need within CUDA host code, you have no choice but to change platforms, or your expectations.

    You can still potentially compile non-CUDA host code using another compiler and then link that code using NVCC and the VS toolchain.

    0 讨论(0)
  • 2020-12-04 03:21

    Try to use clang-cl, --cubin=clang-cl.exe

    0 讨论(0)
提交回复
热议问题