SWDEV-425830 - Add pcie atomic query in atomic tests
Add code to query pcie-atomics in atomic tests. If pcie-atomics is not supported, skip the tests. Enable the tests for Nvidia GPUs as well. Change-Id: I7bfc8600511d78d8c73ab526f9846cd268651278
This commit is contained in:
@@ -74,6 +74,13 @@ __global__ void sum_neighbor_locations(char* a, unsigned int num_devices,
|
||||
* - HIP_VERSION >= 5.7
|
||||
*/
|
||||
TEST_CASE("test_svm_byte_granularity") {
|
||||
int pcieAtomic = 0;
|
||||
HIP_CHECK(hipDeviceGetAttribute(&pcieAtomic, hipDeviceAttributeHostNativeAtomicSupported, 0));
|
||||
if (!pcieAtomic) {
|
||||
fprintf(stderr, "Device doesn't support pcie atomic, Skipped\n");
|
||||
REQUIRE(true);
|
||||
return;
|
||||
}
|
||||
const int num_elements = 2048;
|
||||
int num_devices = 0;
|
||||
HIP_CHECK(hipGetDeviceCount(&num_devices));
|
||||
|
||||
Reference in New Issue
Block a user