kfdtest: SVM mGPU tests skip GPUs prior to gfx9

Otherwise the test failed because KFD returns failure to map or prefetch
the SVM range to those GPUs which don't support SVM.

Change-Id: Ideaec2a686bfabb2fd6ae41b1a690da144121a89
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: c05c66e756]
这个提交包含在:
Philip Yang 于 2022-05-02 16:42:03 -04:00 提交
1 父节点 be5d26df01
当前提交 ebea654308
1 个文件已更改
+22 -4
@@ -997,9 +997,18 @@ TEST_F(KFDSVMRangeTest, MultiGPUMigrationTest) {
return;
}
const std::vector<int> gpuNodes = m_NodeInfo.GetNodesWithGPU();
const std::vector<int> gpuNodesAll = m_NodeInfo.GetNodesWithGPU();
std::vector<int> gpuNodes;
for (int i : gpuNodesAll) {
const HsaNodeProperties *pNodeProperties;
pNodeProperties = m_NodeInfo.GetNodeProperties(gpuNodesAll.at(i));
if (pNodeProperties->Capability.ui32.SVMAPISupported)
gpuNodes.push_back(gpuNodesAll.at(i));
}
if (gpuNodes.size() < 2) {
LOG() << "Skipping test: at least two GPUs needed." << std::endl;
LOG() << "Skipping test: at least two SVM supported GPUs needed." << std::endl;
return;
}
@@ -1072,9 +1081,18 @@ TEST_F(KFDSVMRangeTest, MultiGPUAccessInPlaceTest) {
return;
}
const std::vector<int> gpuNodes = m_NodeInfo.GetNodesWithGPU();
const std::vector<int> gpuNodesAll = m_NodeInfo.GetNodesWithGPU();
std::vector<int> gpuNodes;
for (int i : gpuNodesAll) {
const HsaNodeProperties *pNodeProperties;
pNodeProperties = m_NodeInfo.GetNodeProperties(gpuNodesAll.at(i));
if (pNodeProperties->Capability.ui32.SVMAPISupported)
gpuNodes.push_back(gpuNodesAll.at(i));
}
if (gpuNodes.size() < 2) {
LOG() << "Skipping test: at least two GPUs needed." << std::endl;
LOG() << "Skipping test: at least two SVM supported GPUs needed." << std::endl;
return;
}