From 08f9020343ae355c045bb5b5ed007c096aca71e9 Mon Sep 17 00:00:00 2001 From: Satyanvesh Dittakavi Date: Thu, 13 Jun 2024 09:23:54 +0000 Subject: [PATCH] SWDEV-465152 - Fix and enable the test Unit_hipMemAdvise_AccessedBy_All_Devices Change-Id: I160d67898898251e3aad7f3b58fe4f60e4186ea8 --- catch/hipTestMain/config/config_amd_linux | 1 - catch/hipTestMain/config/config_amd_windows | 1 - catch/unit/memory/hipMemAdvise.cc | 6 ++++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/catch/hipTestMain/config/config_amd_linux b/catch/hipTestMain/config/config_amd_linux index 7384208945..b5a83301df 100644 --- a/catch/hipTestMain/config/config_amd_linux +++ b/catch/hipTestMain/config/config_amd_linux @@ -47,7 +47,6 @@ "Unit_hipGraphExecMemcpyNodeSetParamsToSymbol_Positive_Basic", "Unit_hipGraphExecMemcpyNodeSetParamsFromSymbol_Positive_Basic", "Unit_hipKernelNameRef_Negative_Parameters", - "Unit_hipMemAdvise_AccessedBy_All_Devices", "Unit_hipMemAdvise_No_Flag_Interference", "NOTE: The following 2 tests are disabled due to defect - EXSWHTEC-238", "Unit_hipDrvMemcpy3D_Positive_Array", diff --git a/catch/hipTestMain/config/config_amd_windows b/catch/hipTestMain/config/config_amd_windows index 28d52fee64..d29ae0b663 100644 --- a/catch/hipTestMain/config/config_amd_windows +++ b/catch/hipTestMain/config/config_amd_windows @@ -128,7 +128,6 @@ "Unit_hipGraphExecMemcpyNodeSetParamsFromSymbol_Positive_Basic", "Unit_hipKernelNameRef_Negative_Parameters", "Unit_hipKernelNameRef_Positive_Basic", - "Unit_hipMemAdvise_AccessedBy_All_Devices", "Unit_hipMemAdvise_No_Flag_Interference", "Unit_hipGraphAddEventRecordNode_Functional_WithoutFlags", "Unit_hipGraphDestroyNode_Complx_ChkNumOfNodesNDep", diff --git a/catch/unit/memory/hipMemAdvise.cc b/catch/unit/memory/hipMemAdvise.cc index ed4d74445a..2af94787d6 100644 --- a/catch/unit/memory/hipMemAdvise.cc +++ b/catch/unit/memory/hipMemAdvise.cc @@ -261,14 +261,16 @@ TEST_CASE("Unit_hipMemAdvise_AccessedBy_All_Devices") { HipTest::HIP_SKIP_TEST("Test needs at least 1 device that supports managed memory"); return; } - supported_devices.push_back(hipCpuDeviceId); + // Disabling this hipCpuDeviceId scenario as it fails due to ROCr issue + // Enable it once SWDEV-36994, SWDEV-392002 are fixed + // supported_devices.push_back(hipCpuDeviceId); LinearAllocGuard alloc(LinearAllocs::hipMallocManaged, kPageSize); for (const auto device : supported_devices) { HIP_CHECK(hipMemAdvise(alloc.ptr(), kPageSize, hipMemAdviseSetAccessedBy, device)); } std::vector accessed_by(supported_devices.size(), hipInvalidDeviceId); - HIP_CHECK(hipMemRangeGetAttribute(accessed_by.data(), sizeof(accessed_by.data()), + HIP_CHECK(hipMemRangeGetAttribute(accessed_by.data(), sizeof(int) * accessed_by.size(), hipMemRangeAttributeAccessedBy, alloc.ptr(), kPageSize)); REQUIRE_THAT(accessed_by, Catch::Matchers::Equals(supported_devices)); }