From 537381a123ee35489ac5f3c32703a95a5bd6aeaf Mon Sep 17 00:00:00 2001 From: Graham Sider Date: Thu, 30 Sep 2021 18:33:06 -0400 Subject: [PATCH] kfdtest: Remove IsaGen from KFDExceptionTest Replace with LLVM-based Assembler. Signed-off-by: Graham Sider Change-Id: Ia64b8cc77382773b48de576d350bbed3c1efdb74 [ROCm/ROCR-Runtime commit: 4c7cf6e7d22f4439022e44756c6d5c0029179211] --- .../rocr-runtime/tests/kfdtest/src/KFDExceptionTest.cpp | 9 ++------- .../rocr-runtime/tests/kfdtest/src/KFDExceptionTest.hpp | 5 +---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.cpp b/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.cpp index 11df6279c9..9fa15e0969 100644 --- a/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.cpp +++ b/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.cpp @@ -33,18 +33,12 @@ void KFDExceptionTest::SetUp() { KFDBaseComponentTest::SetUp(); - m_pIsaGen = IsaGenerator::Create(m_FamilyId); - ROUTINE_END } void KFDExceptionTest::TearDown() { ROUTINE_START - if (m_pIsaGen) - delete m_pIsaGen; - m_pIsaGen = NULL; - KFDBaseComponentTest::TearDown(); // WORKAROUND: This needs to be fixed in the kernel @@ -75,7 +69,8 @@ void KFDExceptionTest::TestMemoryException(int defaultGPUNode, HSAuint64 pSrc, eventDesc.SyncVar.SyncVar.UserData = NULL; eventDesc.SyncVar.SyncVarSize = 0; - m_pIsaGen->GetCopyDwordIsa(isaBuffer); + ASSERT_SUCCESS(m_pAsm->RunAssembleBuf(CopyDwordIsa, isaBuffer.As())); + m_ChildStatus = queue.Create(defaultGPUNode); if (m_ChildStatus != HSAKMT_STATUS_SUCCESS) { WARN() << "Queue create failed" << std::endl; diff --git a/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.hpp b/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.hpp index 00b45fe5db..df57649e2c 100644 --- a/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.hpp +++ b/projects/rocr-runtime/tests/kfdtest/src/KFDExceptionTest.hpp @@ -26,12 +26,11 @@ #include -#include "IsaGenerator.hpp" #include "KFDBaseComponentTest.hpp" class KFDExceptionTest : public KFDBaseComponentTest { public: - KFDExceptionTest() :m_pIsaGen(NULL), m_ChildPid(-1) { + KFDExceptionTest() : m_ChildPid(-1) { /* Because there could be early return before m_ChildPid is set * by fork(), we should initialize m_ChildPid to a non-zero value * to avoid possible exit of the main process. @@ -59,8 +58,6 @@ class KFDExceptionTest : public KFDBaseComponentTest { protected: // Members pid_t m_ChildPid; HSAKMT_STATUS m_ChildStatus; - - IsaGenerator* m_pIsaGen; }; #endif // __KFD_EXCEPTION_TEST__H__