kfdtest: Ensure devices are peer-accessible for peer mapping

If the devices aren't peer-accessible, we shouldn't try to run a test
that requires that the devices be peer-accessible. Thus, add a check in
MapVramToGPUNodesTest to check for peer accessibility before executing
the peer mappings.

Signed-off-by: Kent Russell <kent.russell@amd.com>
Change-Id: Ib79b141f8c1ac6d85f5ab49d62af62ec10b988b7
This commit is contained in:
Kent Russell
2021-07-08 15:19:27 -04:00
parent 92076f6f1b
commit bdfe3a12a8
+5
View File
@@ -516,6 +516,11 @@ TEST_F(KFDLocalMemoryTest, MapVramToGPUNodesTest) {
}
}
if (!m_NodeInfo.IsPeerAccessibleByNode(dst_node, src_node)) {
LOG() << "Skipping test: GPUs are not peer-accessible" << std::endl;
return;
}
LOG() << "Testing from GPU " << src_node << " to GPU " << dst_node << std::endl;
void *shared_addr;