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>
Bu işleme şunda yer alıyor:
Philip Yang
2022-04-27 11:10:01 -04:00
ebeveyn 4b041a8ad9
işleme c05c66e756
+22 -4
Dosyayı Görüntüle
@@ -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;
}