Update Kokkos library to v2.03.13
This commit is contained in:
24
lib/kokkos/config/query_cuda_arch.cpp
Normal file
24
lib/kokkos/config/query_cuda_arch.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include <cstdio>
|
||||
#include <cuda_runtime_api.h>
|
||||
int main()
|
||||
{
|
||||
cudaDeviceProp prop;
|
||||
const cudaError_t err_code = cudaGetDeviceProperties(&prop, 0);
|
||||
if (cudaSuccess != err_code) {
|
||||
fprintf(stderr,"cudaGetDeviceProperties failed: %s\n", cudaGetErrorString(err_code));
|
||||
return -1;
|
||||
}
|
||||
switch (prop.major) {
|
||||
case 3:
|
||||
printf("Kepler"); break;
|
||||
case 5:
|
||||
printf("Maxwell"); break;
|
||||
case 6:
|
||||
printf("Pascal"); break;
|
||||
default:
|
||||
fprintf(stderr, "Unspported Device %d%d\n", (int)prop.major, (int)prop.minor);
|
||||
return -1;
|
||||
}
|
||||
printf("%d%d\n", (int)prop.major, (int)prop.minor);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user