Skip to content

Commit

Permalink
SWDEV-352540, SWDEV-352480, SWDEV-351985 - updating gfx11 check (#164)
Browse files Browse the repository at this point in the history
Change-Id: Ibb0b80463d1316019599cf83462d41196490ea3d
  • Loading branch information
rocm-ci authored Feb 13, 2023
1 parent 66ad409 commit df911a7
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions catch/include/hip_test_common.hh
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,13 @@ static inline bool IsGfx11() {
hipDeviceProp_t props{};
HIP_CHECK(hipGetDevice(&device));
HIP_CHECK(hipGetDeviceProperties(&props, device));

// Get GCN Arch Name and compare to check if it is gfx11
std::string arch = std::string(props.gcnArchName);
auto pos = arch.find(":");
auto pos = arch.find("gfx11");
if (pos != std::string::npos)
arch = arch.substr(0, pos);

if(arch.size() >= 5)
arch = arch.substr(0,5);

return (arch == std::string("gfx11")) ? true : false;
return true;
else
return false;
#else
std::cout<<"Have to be either Nvidia or AMD platform, asserting"<<std::endl;
assert(false);
Expand Down

0 comments on commit df911a7

Please sign in to comment.