KFDTest: fix an exception bug in P2PTest

The largebar check will exit exceptionally from test
when destination node is not set.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: I8bf0fed613250cc71468208e645fc562fb1a8757


[ROCm/ROCR-Runtime commit: 18ead8815c]
Este cometimento está contido em:
Eric Huang criou e Kent Russell cometeu 2021-02-23 12:20:29 -05:00
1 ascendente cceccd6d64
cometimento fcad72b475
1 ficheiro modificado
+2 -7
+2 -7
Ver ficheiro
@@ -1671,18 +1671,13 @@ TEST_F(KFDQMTest, P2PTest) {
HsaMemFlags memFlags = {0};
HsaMemMapFlags mapFlags = {0};
memFlags.ui32.PageSize = HSA_PAGE_SIZE_4KB;
memFlags.ui32.HostAccess = 1;
memFlags.ui32.HostAccess = 0;
memFlags.ui32.NonPaged = 1;
memFlags.ui32.NoNUMABind = 1;
unsigned int end = size / sizeof(HSAuint32) - 1;
if (!m_NodeInfo.IsGPUNodeLargeBar(g_TestDstNodeId) &&
m_NodeInfo.AreGPUNodesXGMI(g_TestNodeId, g_TestDstNodeId)) {
memFlags.ui32.HostAccess = 0;
}
/* 1. Allocate a system buffer and allow the access to GPUs */
EXPECT_SUCCESS(hsaKmtAllocMemory(0, size, memFlags,
EXPECT_SUCCESS(hsaKmtAllocMemory(0, size, m_MemoryFlags,
reinterpret_cast<void **>(&sysBuf)));
EXPECT_SUCCESS(hsaKmtMapMemoryToGPUNodes(sysBuf, size, NULL,
mapFlags, nodes.size(), &nodes[0]));