kfdtest: Implement an infracture to support kfdtest run on multi gpu

Update class KFDBaseComponentTest to have kfdtest run on multi gpu under google test framework.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: If139c4fc6cf062fb800ff171c69cbf9604f98278


[ROCm/ROCR-Runtime commit: b4943d718b]
This commit is contained in:
Xiaogang Chen authored and Xiaogang Chen committed 2024-12-16 12:46:32 -05:00
1 parent 7ca6b20d3f
commit 58e0937fb4
4 files changed
+254 -9

No files matched your search

@@ -626,6 +626,18 @@ const HsaNodeProperties* HsaNodeInfo::GetNodeProperties(int NodeNum) const {
return m_HsaNodeProps.at(NodeNum);
}
const int HsaNodeInfo::HsaGPUindexFromGpuNode(int gpuNodeId) const {
if (m_NodesWithGPU.size() == 0)
return -1;
for (unsigned int i = 0; i < m_NodesWithGPU.size(); i++) {
if (gpuNodeId == m_NodesWithGPU.at(i))
return i;
}
return -1;
}
const HsaNodeProperties* HsaNodeInfo::HsaDefaultGPUNodeProperties() const {
int NodeNum = HsaDefaultGPUNode();
if (NodeNum < 0)