SWDEV-292904 - Extend HIP coherency tests to gfx940
Change-Id: I54d57572d55c302ebaed29c7e11570e3d1b44a8e
[ROCm/hip commit: 9fbd19a675]
This commit is contained in:
committed by
Aaron En Ye Shi
parent
d33b577c95
commit
26cf8d399e
@@ -118,7 +118,7 @@ cpu_thread(int *A, int *B, int *X, int *Y, size_t N,
|
||||
}
|
||||
}
|
||||
|
||||
// This test runs on gfx90a where XGMI enables fine-grained communication
|
||||
// This test runs on devices where XGMI enables fine-grained communication
|
||||
// between GPUs. This performs a message passing test.
|
||||
// Array A is allocated on Device 0, and remotely on host.
|
||||
// Device 0 also increments atomic ints AA1 and AA2.
|
||||
@@ -142,12 +142,13 @@ bool cpu_to_gpu_coherency() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Skip this test if device is not gfx90a.
|
||||
// Skip this test if feature is not supported.
|
||||
static int device0 = 0;
|
||||
hipDeviceProp_t props;
|
||||
HIPCHECK(hipGetDeviceProperties(&props, device0));
|
||||
if (strncmp(props.gcnArchName, "gfx90a", 6) != 0) {
|
||||
printf("info: skipping test on non-gfx90a devices.\n");
|
||||
if (strncmp(props.gcnArchName, "gfx90a", 6) != 0 &&
|
||||
strncmp(props.gcnArchName, "gfx940", 6) != 0) {
|
||||
printf("info: skipping test on devices other than gfx90a and gfx940.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ gpu_cache1(int *A,int *B, int *X, int *Y, size_t N,
|
||||
}
|
||||
}
|
||||
|
||||
// This test runs on gfx90a where XGMI enables fine-grained communication
|
||||
// This test runs on devices where XGMI enables fine-grained communication
|
||||
// between GPUs. This performs a message passing test.
|
||||
// Array A is allocated on Device 0, and remotely on Device 1.
|
||||
// Device 0 also increments atomic ints AA1 and AA2.
|
||||
@@ -131,13 +131,15 @@ bool gpu_to_gpu_coherency() {
|
||||
}
|
||||
printf("info: performing this test only on first two GPUs.\n");
|
||||
|
||||
// Skip this test if both devices are not gfx90a.
|
||||
// Skip this test if either device does not support this feature.
|
||||
hipDeviceProp_t props0, props1;
|
||||
HIPCHECK(hipGetDeviceProperties(&props0, 0));
|
||||
HIPCHECK(hipGetDeviceProperties(&props1, 1));
|
||||
if (strncmp(props0.gcnArchName, "gfx90a", 6) != 0 ||
|
||||
strncmp(props1.gcnArchName, "gfx90a", 6) != 0) {
|
||||
printf("info: skipping test on non-gfx90a devices.\n");
|
||||
if ((strncmp(props0.gcnArchName, "gfx90a", 6) != 0 ||
|
||||
strncmp(props1.gcnArchName, "gfx90a", 6) != 0) &&
|
||||
(strncmp(props0.gcnArchName, "gfx940", 6) != 0 ||
|
||||
strncmp(props1.gcnArchName, "gfx940", 6) != 0)) {
|
||||
printf("info: skipping test on devices other than gfx90a and gfx940.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user