kfdtest: Update KFDSVMEvictTest.QueueTest for CPX mode

Current test has 4 processes, each process allocate and access 512
buffers, this requires 2048 waves to access 2048 buffers at same time to
finish the test. For CPX compute partition mode, each compute node has
less waves and cause random test failure. Change test to 2 processes to
use 1024 waves to access 1024 buffers with the increased buffer size.

Add waves_num check to avoid the test failure on new ASICs or simulator,
skip test if the available waves is less than 1024.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Change-Id: I64b5f9172b62cf38f62fbb0b48a801b8a11401c0


[ROCm/ROCR-Runtime commit: e6d4a32c42]
Tá an tiomantas seo le fáil i:
Philip Yang
2024-10-23 23:08:28 -04:00
tuismitheoir 6525bb1a5d
tiomantas b0558f264c
@@ -31,7 +31,7 @@
#include "SDMAQueue.hpp"
#include "Dispatch.hpp"
#define N_PROCESSES (4) /* number of processes running in parallel, at least 2 */
#define N_PROCESSES (2) /* number of processes running in parallel, at least 2 */
#define ALLOCATE_BUF_SIZE_MB (64)
#define ALLOCATE_RETRY_TIMES (3)
#define MAX_WAVEFRONTS (512)
@@ -320,6 +320,14 @@ TEST_P(KFDSVMEvictTest, QueueTest) {
return;
}
uint32_t cu_num = pNodeProperties->NumFComputeCores / pNodeProperties->NumSIMDPerCU;
uint32_t wave_num = MIN(cu_num * 40,
(pNodeProperties->NumShaderBanks / pNodeProperties->NumArrays) * 512);
if (wave_num < count * N_PROCESSES) {
LOG() << std::hex << "Test is skipped, wave_num " << wave_num << " not enough" << std::endl;
return;
}
HSAuint32 i;
HSAuint64 vramSize = GetVramSize(defaultGPUNode);