SWDEV-555178 - Calculate phys mem offset for remap range (#1879)

This commit is contained in:
marandje
2025-12-23 10:27:42 +01:00
committed by GitHub
parent 719556fbba
commit 3e49440495
5 changed files with 11 additions and 102 deletions
@@ -58,9 +58,9 @@ TEST_CASE("Unit_hipMemVmm_Basic") {
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));