File size: 424 Bytes
0da5bf5
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
#include "cutlass_extensions/common.hpp"

int32_t get_sm_version_num() {
  int32_t major_capability, minor_capability;
  cudaDeviceGetAttribute(&major_capability, cudaDevAttrComputeCapabilityMajor,
                         0);
  cudaDeviceGetAttribute(&minor_capability, cudaDevAttrComputeCapabilityMinor,
                         0);
  int32_t version_num = major_capability * 10 + minor_capability;
  return version_num;
}