You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
320 B

#include <iostream>
#include <cuda.h>
int main(int argc, char** argv)
{
int nDevices = 0;
cuInit(0);
auto err = cuDeviceGetCount(&nDevices);
if (err != CUDA_SUCCESS) {
std::cerr << "Failed to retrieve the number of CUDA enabled devices "
<< err << std::endl;
return 1;
}
return 0;
}