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

c++ windows cuda nvcc

2535 просмотра

1 ответ

72 Репутация автора

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 without Visual Studio's compiler which doesn't support things I need. I tried building using nvcc with clang but It just asks me to use Visual Studio's compiler. I've also tried using clang directly since it now supports CUDA but I receive this error:

clang++.exe: error: Unsupported CUDA gpu architecture: compute_52

This makes no sense to me because I have the CUDA toolkit version 7.5 and my graphics card is a GTX 970 (two of them). I have googled this extensively and everywhere I come across the error the person always has is their CUDA toolkit is < 7.5. I'm on the brink of tears right now trying to get something as simple as VLA to work on this CUDA application and I just can't achieve it...

Автор: user3441843 Источник Размещён: 18.07.2016 08:44

Ответы (1)

9 плюса

61470 Репутация автора

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.

Автор: talonmies Размещён: 18.07.2016 09:00
Вопросы из категории :