From bf5826ee930c4c5a90cc885e22b0dd751327ad9d Mon Sep 17 00:00:00 2001 From: Christophe Paquot Date: Wed, 29 Jun 2022 15:59:56 -0700 Subject: [PATCH] SWDEV-322620 - Virtual Memory Management Use correct granularity for VM address/size Change-Id: I001f29eabe9503396bbec623df9d5155b882be4f --- hipamd/src/hip_vm.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hipamd/src/hip_vm.cpp b/hipamd/src/hip_vm.cpp index 2c81a42f1b..17287d8b41 100644 --- a/hipamd/src/hip_vm.cpp +++ b/hipamd/src/hip_vm.cpp @@ -154,8 +154,7 @@ hipError_t hipMemGetAllocationGranularity(size_t* granularity, const hipMemAlloc const auto& dev_info = g_devices[prop->location.id]->devices()[0]->info(); - // Default to that for now. - *granularity = dev_info.memBaseAddrAlign_; + *granularity = dev_info.virtualMemAllocGranularity_; HIP_RETURN(hipSuccess); }