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

Change-Id: Ib8afef16ac90489c08c761b2a2ce34c1ba671e6b
Bu işleme şunda yer alıyor:
ROCm CI Service Account authored and GitHub committed 2023-06-29 08:58:35 +05:30
1 ebeveyn b14648cc31
işleme 0498738189
1 file changed
+11
+11
Dosyayı Görüntüle
@@ -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 >>>();