From a90f28cd5ccb2e65b8347ea7596c0d278c094c92 Mon Sep 17 00:00:00 2001 From: marandje Date: Wed, 24 Sep 2025 15:51:22 +0200 Subject: [PATCH] SWDEV-555178 - Fix and enable Unit_hipMemVmm_Uncached (#1090) --- .../hip-tests/catch/hipTestMain/config/config_amd_windows | 1 - projects/hip-tests/catch/unit/memory/hipMemVmm.cc | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows index f7ace5831f..847d48ac7f 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows @@ -989,7 +989,6 @@ "Unit_hipGraphAddMemAllocNode_Negative_Free_Alloc_Memory_Again", "====================================================", "==================SWDEV-555665==================================", - "Unit_hipMemVmm_Uncached", "Unit_TexObjectCreate_TypePitch2D", "Unit_hipTexRefSetGetMipmappedArray", "Unit_test_generic_target_only_in_regular_fatbin", diff --git a/projects/hip-tests/catch/unit/memory/hipMemVmm.cc b/projects/hip-tests/catch/unit/memory/hipMemVmm.cc index 5872b6a65e..92041ddb05 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemVmm.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemVmm.cc @@ -118,9 +118,9 @@ TEST_CASE("Unit_hipMemVmm_Uncached") { HIP_CHECK(hipMemGetAllocationGranularity(&granularity, &memAllocationProp, hipMemAllocationGranularityRecommended)); - size_t size = 4 * 1024; + size_t size = granularity * 4; void* reservedAddress{nullptr}; - HIP_CHECK(hipMemAddressReserve(&reservedAddress, size, granularity, nullptr, 0)); + HIP_CHECK(hipMemAddressReserve(&reservedAddress, size, 0, nullptr, 0)); hipMemGenericAllocationHandle_t gaHandle{nullptr}; HIP_CHECK(hipMemCreate(&gaHandle, size, &memAllocationProp, 0)); @@ -149,4 +149,4 @@ TEST_CASE("Unit_hipMemVmm_Uncached") { HIP_CHECK(hipMemRelease(gaHandle)); HIP_CHECK(hipMemAddressFree(reservedAddress, size)); } -#endif \ No newline at end of file +#endif