diff --git a/catch/unit/module/hipManagedKeyword.cc b/catch/unit/module/hipManagedKeyword.cc index dc4fd53d22..6971ad5f63 100644 --- a/catch/unit/module/hipManagedKeyword.cc +++ b/catch/unit/module/hipManagedKeyword.cc @@ -50,6 +50,16 @@ TEST_CASE("Unit_hipModuleGetGlobal_Functional") { size_t xSize; int data; 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)); hipDevice_t device;