kfdtest: Add GetGfxVersion to KFDTestUtil

Required to derive LLVM AMDGPU target ASIC (MCPU).

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: If8f139b3858c9bf42feba23ae9210e14625dc08b
此提交包含在:
Graham Sider
2021-09-24 18:49:02 -04:00
提交者 Harish Kasiviswanathan
父節點 65b1e0c058
當前提交 2f73db8fb0
共有 2 個檔案被更改,包括 7 行新增0 行删除
+6
查看文件
@@ -231,6 +231,12 @@ bool isTonga(const HsaNodeProperties *props) {
return false;
}
const uint32_t GetGfxVersion(const HsaNodeProperties *props) {
return ((props->EngineId.ui32.Major << 16) |
(props->EngineId.ui32.Minor << 8) |
(props->EngineId.ui32.Stepping));
}
HSAuint64 GetSystemTickCountInMicroSec() {
struct timeval t;
gettimeofday(&t, 0);
+1
查看文件
@@ -52,6 +52,7 @@ bool is_dgpu();
bool isTonga(const HsaNodeProperties *props);
bool hasPciAtomicsSupport(int node);
unsigned int FamilyIdFromNode(const HsaNodeProperties *props);
const uint32_t GetGfxVersion(const HsaNodeProperties *props);
void GetHwQueueInfo(const HsaNodeProperties *props,
unsigned int *p_num_cp_queues,