SWDEV-396615 - check for managed memory support (#323)

Change-Id: Ib8afef16ac90489c08c761b2a2ce34c1ba671e6b

[ROCm/hip-tests commit: 0498738189]
Cette révision appartient à :
ROCm CI Service Account
2023-06-29 08:58:35 +05:30
révisé par GitHub
Parent 06275b085d
révision 2b68ab02ca
+11
Voir le fichier
@@ -67,6 +67,17 @@ TEST_CASE("Unit_hipManagedKeyword_MultiGpu") {
int numDevices = 0;
HIP_CHECK(hipGetDeviceCount(&numDevices));
for (int i = 0; i < numDevices; i++){
int managed_memory = 0;
HIPCHECK(hipDeviceGetAttribute(&managed_memory,
hipDeviceAttributeManagedMemory,
i));
if (!managed_memory) {
HipTest::HIP_SKIP_TEST("managed memory access not supported on device");
return;
}
}
for (int i = 0; i < numDevices; i++) {
HIP_CHECK(hipSetDevice(i));
GPU_func<<< 1, 1 >>>();