From 18ead8815c3eaf673a0b543ec23629254510b436 Mon Sep 17 00:00:00 2001 From: Eric Huang Date: Wed, 14 Oct 2020 11:07:15 -0400 Subject: [PATCH] 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 Change-Id: I8bf0fed613250cc71468208e645fc562fb1a8757 --- tests/kfdtest/src/KFDQMTest.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/kfdtest/src/KFDQMTest.cpp b/tests/kfdtest/src/KFDQMTest.cpp index eab1b54885..71768cc2cf 100644 --- a/tests/kfdtest/src/KFDQMTest.cpp +++ b/tests/kfdtest/src/KFDQMTest.cpp @@ -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(&sysBuf))); EXPECT_SUCCESS(hsaKmtMapMemoryToGPUNodes(sysBuf, size, NULL, mapFlags, nodes.size(), &nodes[0]));