From fed84df49fa2cfa687479bc284812596ef1fd7bf Mon Sep 17 00:00:00 2001 From: Philip Yang Date: Mon, 27 Mar 2023 11:28:22 -0400 Subject: [PATCH] kfdtest: AppAPU Skip KFDEvictTest, KDFSVMEvictTest, HMMProfilingEvent AppAPU VRAM is part of system memory managed by Linux kernel, no VRAM eviction and restore is needed between VRAM and system memory. Those Evict test failed on AppAPU now, skip those tests on AppAPU. No page migration between VRAM and system on AppAPU, HMMProfilingEvent depends on migration event, skip it on AppAPU. Change-Id: I4c809b97c947e809d136c1f88db2278cf74f5b47 Signed-off-by: Philip Yang [ROCm/ROCR-Runtime commit: 21abaef3f864b542ad127153aaefe915fb1710b7] --- .../tests/kfdtest/src/KFDEvictTest.cpp | 15 +++++++++++++++ .../tests/kfdtest/src/KFDSVMEvictTest.cpp | 10 ++++++++++ .../tests/kfdtest/src/KFDSVMRangeTest.cpp | 5 +++++ 3 files changed, 30 insertions(+) diff --git a/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp b/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp index 417123af37..e6cb080589 100644 --- a/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp +++ b/projects/rocr-runtime/tests/kfdtest/src/KFDEvictTest.cpp @@ -319,6 +319,11 @@ TEST_F(KFDEvictTest, BasicTest) { return; } + if (m_NodeInfo.IsAppAPU(defaultGPUNode)) { + LOG() << "Skipping test on AppAPU." << std::endl; + return; + } + LOG() << "Found VRAM of " << std::dec << (vramSize >> 20) << "MB" << std::endl; LOG() << "Found System RAM of " << std::dec << (sysMemSize >> 20) << "MB" << std::endl; @@ -393,6 +398,11 @@ TEST_F(KFDEvictTest, QueueTest) { return; } + if (m_NodeInfo.IsAppAPU(defaultGPUNode)) { + LOG() << "Skipping test on AppAPU." << std::endl; + return; + } + HSAuint32 i; HSAuint64 vramSize = GetVramSize(defaultGPUNode); HSAuint64 sysMemSize = GetSysMemSize(); @@ -509,6 +519,11 @@ TEST_F(KFDEvictTest, BurstyTest) { ASSERT_GE(defaultGPUNode, 0) << "failed to get default GPU Node"; HSAuint64 vramBufSize = ALLOCATE_BUF_SIZE_MB * 1024 * 1024; + if (m_NodeInfo.IsAppAPU(defaultGPUNode)) { + LOG() << "Skipping test on AppAPU." << std::endl; + return; + } + HSAuint64 vramSize = GetVramSize(defaultGPUNode); HSAuint64 sysMemSize = GetSysMemSize(); diff --git a/projects/rocr-runtime/tests/kfdtest/src/KFDSVMEvictTest.cpp b/projects/rocr-runtime/tests/kfdtest/src/KFDSVMEvictTest.cpp index b97e6c7089..75eae28f82 100644 --- a/projects/rocr-runtime/tests/kfdtest/src/KFDSVMEvictTest.cpp +++ b/projects/rocr-runtime/tests/kfdtest/src/KFDSVMEvictTest.cpp @@ -228,6 +228,11 @@ TEST_F(KFDSVMEvictTest, BasicTest) { ASSERT_GE(defaultGPUNode, 0) << "failed to get default GPU Node"; HSAuint64 vramBufSize = ALLOCATE_BUF_SIZE_MB * 1024 * 1024; + if (m_NodeInfo.IsAppAPU(defaultGPUNode)) { + LOG() << "Skipping test on AppAPU." << std::endl; + return; + } + HSAuint64 vramSize = GetVramSize(defaultGPUNode); if (!vramSize) { @@ -296,6 +301,11 @@ TEST_F(KFDSVMEvictTest, QueueTest) { return; } + if (m_NodeInfo.IsAppAPU(defaultGPUNode)) { + LOG() << "Skipping test on AppAPU." << std::endl; + return; + } + HSAuint32 i; HSAuint64 vramSize = GetVramSize(defaultGPUNode); diff --git a/projects/rocr-runtime/tests/kfdtest/src/KFDSVMRangeTest.cpp b/projects/rocr-runtime/tests/kfdtest/src/KFDSVMRangeTest.cpp index f020529441..9e86e81b12 100644 --- a/projects/rocr-runtime/tests/kfdtest/src/KFDSVMRangeTest.cpp +++ b/projects/rocr-runtime/tests/kfdtest/src/KFDSVMRangeTest.cpp @@ -1466,6 +1466,11 @@ TEST_F(KFDSVMRangeTest, HMMProfilingEvent) { return; } + if (m_NodeInfo.IsAppAPU(defaultGPUNode)) { + LOG() << "Skipping test on AppAPU." << std::endl; + return; + } + pthread_barrier_t barrier; ASSERT_SUCCESS(pthread_barrier_init(&barrier, NULL, 2));