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]
This commit is contained in:
@@ -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]));
|
||||
|
||||
Reference in New Issue
Block a user