kfdtest: Add a simple test case to test local memory
Given the chance of local memory breakage is so high on emulators, we
should use this simple test to check the local memory function.
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Change-Id: Ifc48c12e11d75cc777ed7ea13e03bf54c2458e12
[ROCm/ROCR-Runtime commit: 690a148427]
Этот коммит содержится в:
коммит произвёл
Kent Russell
родитель
2e9e7996e8
Коммит
b1f7193ce6
@@ -20,6 +20,7 @@ FILTER[core_sws]=\
|
||||
"KFDQMTest.AllSdmaQueues:"\
|
||||
"KFDQMTest.AllXgmiSdmaQueues:"\
|
||||
"KFDQMTest.AllQueues:"\
|
||||
"KFDLocalMemoryTest.AccessLocalMem:"\
|
||||
"KFDEventTest.SignalEvent"
|
||||
|
||||
# HWS mode
|
||||
|
||||
@@ -50,6 +50,28 @@ void KFDLocalMemoryTest::TearDown() {
|
||||
ROUTINE_END
|
||||
}
|
||||
|
||||
TEST_F(KFDLocalMemoryTest, AccessLocalMem) {
|
||||
TEST_START(TESTPROFILE_RUNALL)
|
||||
|
||||
int defaultGPUNode = m_NodeInfo.HsaDefaultGPUNode();
|
||||
ASSERT_GE(defaultGPUNode, 0) << "failed to get default GPU Node";
|
||||
|
||||
//local memory
|
||||
HsaMemoryBuffer destBuf(PAGE_SIZE, defaultGPUNode, false, true);
|
||||
|
||||
PM4Queue queue;
|
||||
|
||||
ASSERT_SUCCESS(queue.Create(defaultGPUNode));
|
||||
|
||||
queue.PlaceAndSubmitPacket(PM4WriteDataPacket(destBuf.As<unsigned int*>(), 0, 0));
|
||||
|
||||
queue.Wait4PacketConsumption();
|
||||
|
||||
EXPECT_SUCCESS(queue.Destroy());
|
||||
|
||||
TEST_END
|
||||
}
|
||||
|
||||
TEST_F(KFDLocalMemoryTest, BasicTest) {
|
||||
TEST_REQUIRE_ENV_CAPABILITIES(ENVCAPS_64BITLINUX);
|
||||
TEST_START(TESTPROFILE_RUNALL);
|
||||
|
||||
Ссылка в новой задаче
Block a user