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

Change-Id: Ib8afef16ac90489c08c761b2a2ce34c1ba671e6b
Этот коммит содержится в:
ROCm CI Service Account
2023-06-29 08:58:35 +05:30
коммит произвёл GitHub
родитель b14648cc31
Коммит 0498738189
+11
Просмотреть файл
@@ -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 >>>();