KFDTest: remove the usage global g_TestGPUFamilyId

Adjust the KFDTest for multi-gou support

Change-Id: Ib3491e3f645d35fdba6ab702d65fcc86f48d3958
Signed-off-by: shaoyunl <shaoyun.liu@amd.com>


[ROCm/ROCR-Runtime commit: b4e834ab61]
This commit is contained in:
shaoyunl committed 2019-07-19 13:26:49 -04:00
1 parent 6f29801c64
commit db09beaa08
16 files changed
+47 -18

No files matched your search

@@ -61,12 +61,12 @@ void KFDBaseComponentTest::SetUp() {
const HsaNodeProperties *nodeProperties = m_NodeInfo.HsaDefaultGPUNodeProperties();
ASSERT_NOTNULL(nodeProperties) << "failed to get HSA default GPU Node properties";
g_TestGPUFamilyId = FamilyIdFromNode(nodeProperties);
m_FamilyId = FamilyIdFromNode(nodeProperties);
GetSdmaInfo(nodeProperties, &m_numSdmaEngines, &m_numSdmaXgmiEngines,
&m_numSdmaQueuesPerEngine);
m_FamilyId = g_TestGPUFamilyId;
g_baseTest = this;
ROUTINE_END
}
@@ -84,6 +84,7 @@ void KFDBaseComponentTest::TearDown() {
EXPECT_SUCCESS(hsaKmtReleaseSystemProperties());
EXPECT_SUCCESS(hsaKmtCloseKFD());
g_baseTest = NULL;
ROUTINE_END
}
@@ -128,6 +129,11 @@ HSAuint64 KFDBaseComponentTest::GetVramSize(int defaultGPUNode) {
return 0;
}
unsigned int KFDBaseComponentTest::GetFamilyIdFromNodeId(unsigned int nodeId)
{
return FamilyIdFromNode(m_NodeInfo.GetNodeProperties(nodeId));
}
int KFDBaseComponentTest::FindDRMRenderNode(int gpuNode) {
HsaNodeProperties *nodeProperties;
_HSAKMT_STATUS status;