SWDEV-352540, SWDEV-352480, SWDEV-351985 - updating gfx11 check (#164)

Change-Id: Ibb0b80463d1316019599cf83462d41196490ea3d
Цей коміт міститься в:
ROCm CI Service Account
2023-02-14 03:40:31 +05:30
зафіксовано GitHub
джерело 66ad40972a
коміт df911a7119
+4 -8
Переглянути файл
@@ -148,17 +148,13 @@ static inline bool IsGfx11() {
hipDeviceProp_t props{}; hipDeviceProp_t props{};
HIP_CHECK(hipGetDevice(&device)); HIP_CHECK(hipGetDevice(&device));
HIP_CHECK(hipGetDeviceProperties(&props, device)); HIP_CHECK(hipGetDeviceProperties(&props, device));
// Get GCN Arch Name and compare to check if it is gfx11 // Get GCN Arch Name and compare to check if it is gfx11
std::string arch = std::string(props.gcnArchName); std::string arch = std::string(props.gcnArchName);
auto pos = arch.find(":"); auto pos = arch.find("gfx11");
if (pos != std::string::npos) if (pos != std::string::npos)
arch = arch.substr(0, pos); return true;
else
if(arch.size() >= 5) return false;
arch = arch.substr(0,5);
return (arch == std::string("gfx11")) ? true : false;
#else #else
std::cout<<"Have to be either Nvidia or AMD platform, asserting"<<std::endl; std::cout<<"Have to be either Nvidia or AMD platform, asserting"<<std::endl;
assert(false); assert(false);