8 #include <hip/hip_runtime.h>
14 hipDeviceProp_t props{};
16 auto status = hipGetDevice(&device);
17 if(status != hipSuccess)
22 status = hipGetDeviceProperties(&props, device);
23 if(status != hipSuccess)
27 const std::string raw_name(props.gcnArchName);
30 static std::map<std::string, std::string> device_name_map = {
31 {
"Ellesmere",
"gfx803"},
34 {
"Polaris10",
"gfx803"},
35 {
"Polaris11",
"gfx803"},
43 {
"10.3.0 Sienna_Cichlid 18",
"gfx1030"},
46 const auto name = raw_name.substr(0, raw_name.find(
':'));
48 auto match = device_name_map.find(name);
49 if(match != device_name_map.end())
bool is_lds_direct_load_supported()
Definition: device_prop.hpp:61
bool is_xdl_supported()
Definition: device_prop.hpp:54
std::string get_device_name()
Definition: device_prop.hpp:12
bool is_gfx12_supported()
Definition: device_prop.hpp:94
bool is_gfx103_supported()
Definition: device_prop.hpp:81
bool is_gfx101_supported()
Definition: device_prop.hpp:75
bool is_gfx11_supported()
Definition: device_prop.hpp:88
bool is_bf16_atomic_supported()
Definition: device_prop.hpp:69