From dcc3dd702966b35b16f808eada8232a39f3d3fab Mon Sep 17 00:00:00 2001 From: Rahul Manocha Date: Thu, 17 Oct 2024 16:32:45 -0700 Subject: [PATCH] SWDEV-486443 - Skip managed memory test for windows Change-Id: Id2d99c80e73979173ff7558bedafa723a1eec813 --- catch/unit/module/hipManagedKeyword.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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;