9 #include <hip/hip_runtime.h> 
   13 constexpr 
unsigned int fnv1a_hash(std::string_view str, 
unsigned int h = 2166136261u)
 
   15     return str.empty() ? h
 
   17                                     (h ^ 
static_cast<unsigned char>(str.front())) * 16777619u);
 
   21     hipDeviceProp_t props{};
 
   23     auto status = hipGetDevice(&device);
 
   24     if(status != hipSuccess)
 
   28     status = hipGetDeviceProperties(&props, device);
 
   29     if(status != hipSuccess)
 
   33     const std::string raw_name(props.gcnArchName);
 
   34     const auto name = raw_name.substr(0, raw_name.find(
':')); 
 
   50     case fnv1a_hash(
"10.3.0 Sienna_Cichlid 18"): 
return "gfx1030";
 
Definition: cluster_descriptor.hpp:13
 
constexpr unsigned int fnv1a_hash(std::string_view str, unsigned int h=2166136261u)
Definition: device_prop.hpp:13
 
std::string get_device_name()
Definition: device_prop.hpp:19