#include<cuda.h>
int main (){
int deviceCount;
cudaError_t e = cudaGetDeviceCount(&deviceCount);
return e == cudaSuccess ? deviceCount : -1;
}
Easiest way to test for existence of cuda-capable GPU from cmake?
猜你喜欢
转载自blog.csdn.net/colddie/article/details/86710580
今日推荐
周排行