kfdtest: Make queue evict tests use constant number of wavefronts.
Previously, KFDEvictTest.QueueTest and KFDSVMEvictTest.QueueTest would create a variable number of wavefronts, one for each 64MB of memory under test. This ran into limits on the buffers used by the wavefronts, and may at some point have exceeded the wavefront limit. Restrict the number of wavefronts to 512, and adjust the shader to accomodate a variable buffer size Signed-off-by: David Francis <David.Francis@amd.com> Change-Id: I2ec292e2900e2efa62a08313bca3d2f4bdabca8b
Tento commit je obsažen v:
@@ -33,6 +33,7 @@
|
||||
#define N_PROCESSES (2) /* Number of processes running in parallel, must be at least 2 */
|
||||
#define ALLOCATE_BUF_SIZE_MB (64)
|
||||
#define ALLOCATE_RETRY_TIMES (3)
|
||||
#define MAX_WAVEFRONTS (512)
|
||||
|
||||
#define SDMA_NOP 0x0
|
||||
|
||||
@@ -382,7 +383,7 @@ TEST_F(KFDEvictTest, QueueTest) {
|
||||
|
||||
HSAuint32 defaultGPUNode = m_NodeInfo.HsaDefaultGPUNode();
|
||||
ASSERT_GE(defaultGPUNode, 0) << "failed to get default GPU Node";
|
||||
HSAuint64 vramBufSize = ALLOCATE_BUF_SIZE_MB * 1024 * 1024;
|
||||
unsigned int count = MAX_WAVEFRONTS;
|
||||
|
||||
const HsaNodeProperties *pNodeProperties = m_NodeInfo.HsaDefaultGPUNodeProperties();
|
||||
|
||||
@@ -406,9 +407,10 @@ TEST_F(KFDEvictTest, QueueTest) {
|
||||
|
||||
// Use 7/8 of VRAM between all processes
|
||||
HSAuint64 testSize = vramSize * 7 / 8;
|
||||
HSAuint32 count = testSize / (vramBufSize * N_PROCESSES);
|
||||
HSAuint32 vramBufSize = testSize / (count * N_PROCESSES);
|
||||
vramBufSize = (vramBufSize / (1024 * 1024)) * (1024 * 1024);
|
||||
|
||||
if (count == 0) {
|
||||
if (vramBufSize == 0) {
|
||||
LOG() << "Skipping test: Not enough system memory available." << std::endl;
|
||||
return;
|
||||
}
|
||||
@@ -455,6 +457,9 @@ TEST_F(KFDEvictTest, QueueTest) {
|
||||
for (i = 0; i < wavefront_num; i++)
|
||||
*(localBufAddr + i) = pBuffers[i];
|
||||
|
||||
for (i = 0; i < wavefront_num; i++)
|
||||
*(result + i) = vramBufSize;
|
||||
|
||||
dispatch0.SetArgs(localBufAddr, result);
|
||||
dispatch0.SetDim(wavefront_num, 1, 1);
|
||||
/* Submit the packet and start shader */
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele