From 66e3a09a420ce8250ebedd3468f38c6ca6bfbfee Mon Sep 17 00:00:00 2001 From: David Belanger Date: Fri, 16 Feb 2024 10:21:53 -0500 Subject: [PATCH] kfdtest: Update PM4EventInterrupt for emulation Reduce number of iteration for test case to run in reasonable amount of time. Signed-off-by: David Belanger Change-Id: I19a7ec0d5f03c54d6691aae3cf7432754c7481cc --- tests/kfdtest/src/KFDQMTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/kfdtest/src/KFDQMTest.cpp b/tests/kfdtest/src/KFDQMTest.cpp index ee01300e4c..3364d586cb 100644 --- a/tests/kfdtest/src/KFDQMTest.cpp +++ b/tests/kfdtest/src/KFDQMTest.cpp @@ -1663,6 +1663,9 @@ TEST_F(KFDQMTest, PM4EventInterrupt) { PM4ReleaseMemoryPacket(m_FamilyId, 0, 0, 0).SizeInBytes(); const int queueSize = RoundToPowerOf2(totalPacketSize); + /* Reduce number of iteration if running with emulator. */ + const int numIter = (g_IsEmuMode ? 32 : 1024); + /* 4 PM4 queues will be running at same time.*/ const int numPM4Queue = 4; HsaEvent *event[numPM4Queue]; @@ -1676,7 +1679,7 @@ TEST_F(KFDQMTest, PM4EventInterrupt) { } /* A simple loop here to give more pressure.*/ - for (int test_count = 0; test_count < 1024; test_count++) { + for (int test_count = 0; test_count < numIter; test_count++) { for (int i = 0; i < numPM4Queue; i++) { ASSERT_SUCCESS(queue[i].Create(defaultGPUNode, queueSize)); ASSERT_SUCCESS(CreateQueueTypeEvent(false, false, defaultGPUNode, &event[i]));