SWDEV-337452 - Changing Clock64 to WallClock64 in directed tests. (#3140)
Change-Id: I511ab4dcc61daee4fdfbd2a248b5fe74e52174b2
[ROCm/hip commit: 0ea181501c]
Этот коммит содержится в:
1 родитель
dd539e475d
Коммит
daf4de3aa4
18 files changed
+604
-58
No files matched your search
@@ -92,6 +92,32 @@ size_t getHostThreadCount(const size_t memPerThread, const size_t maxThreads) {
|
||||
return thread_count;
|
||||
}
|
||||
|
||||
// Function to determine if the device is of gfx11 architecture
|
||||
bool IsGfx11() {
|
||||
#if defined(__HIP_PLATFORM_NVIDIA__)
|
||||
return false;
|
||||
#elif defined(__HIP_PLATFORM_AMD__)
|
||||
int device = -1;
|
||||
hipDeviceProp_t props{};
|
||||
HIPCHECK(hipGetDevice(&device));
|
||||
HIPCHECK(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(":");
|
||||
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;
|
||||
#else
|
||||
std::cout<<"Have to be either Nvidia or AMD platform, asserting"<<std::endl;
|
||||
assert(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace HipTest {
|
||||
|
||||
|
||||
@@ -232,5 +258,4 @@ unsigned setNumBlocks(unsigned blocksPerCU, unsigned threadsPerBlock, size_t N)
|
||||
return blocks;
|
||||
}
|
||||
|
||||
|
||||
} // namespace HipTest
|
||||
Reference in new issue
Block a user