From 5ae585430214b1acc7aa2aeede773a2438f8d4d2 Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Wed, 31 Jul 2019 14:32:45 -0400 Subject: [PATCH] kfdtest: Improve FlatScratchAccess by not hardcoding the value We should use the SE number reflected by NumShaderBanks of the node rather than hardcoding it. Change-Id: I945fb001f81ce506249cf485a7ce25aee8219bc7 Signed-off-by: Yong Zhao --- tests/kfdtest/src/KFDMemoryTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kfdtest/src/KFDMemoryTest.cpp b/tests/kfdtest/src/KFDMemoryTest.cpp index aa3b75f9b3..acaa224007 100644 --- a/tests/kfdtest/src/KFDMemoryTest.cpp +++ b/tests/kfdtest/src/KFDMemoryTest.cpp @@ -674,7 +674,7 @@ TEST_F(KFDMemoryTest, FlatScratchAccess) { for (unsigned int bank = 0; bank < pNodeProperties->NumMemoryBanks; bank++) { if (memoryProperties[bank].HeapType == HSA_HEAPTYPE_GPU_SCRATCH) { - int numWaves = 4; // WAVES must be >= # SE + int numWaves = pNodeProperties->NumShaderBanks; // WAVES must be >= # SE int waveSize = 1; // Amount of space used by each wave in units of 256 dwords PM4Queue queue;