Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HIP][MI100] Virtual Memory Management API on MI100? #3151

Open
crozhon opened this issue Feb 1, 2023 · 8 comments
Open

[HIP][MI100] Virtual Memory Management API on MI100? #3151

crozhon opened this issue Feb 1, 2023 · 8 comments

Comments

@crozhon
Copy link

crozhon commented Feb 1, 2023

Does MI100 support the virtual memory management API? (functions hipMemAddressReserve, hipMemMap). I've been following this test case (https://github.com/ROCm-Developer-Tools/hip-tests/blob/094b9af382585a079d13c735fd170e69bea735b6/catch/unit/memory/hipMemVmm.cc), and virtual memory is always unsupported on all of our devices.

I've attached a small test program that queries for support and it always returns 0/false on rocm-5.4.2.

hipDeviceAttributeVirtualMemoryManagementSupported : 0

Is there something wrong with my setup or are these APIs just not supported on these devices?

#include <cstdio>

#include <hip/hip_runtime_api.h>

int main() {
    int vmm = 0;
    hipError_t result = hipDeviceGetAttribute(&vmm, hipDeviceAttributeVirtualMemoryManagementSupported, 0);
    if (result != hipSuccess) {
        return -1;
    }

    std::printf("hipDeviceAttributeVirtualMemoryManagementSupported : %d\n", vmm);
    return 0;
}
@b-sumner
Copy link
Contributor

b-sumner commented Feb 1, 2023

Which OS are you running? For Ubuntu 20.04, you need the HWE stack. I'm not sure about other distros.

@crozhon
Copy link
Author

crozhon commented Feb 2, 2023

Yup Ubuntu 20.04. Thanks, that makes sense - I'll try switching the kernel.

@crozhon
Copy link
Author

crozhon commented Feb 2, 2023

Switched to the HWE stack and reinstalled, but it's still coming back as not supported. Here's my kernel and package versions:

$dkms status
amdgpu, 5.18.13-1528701.20.04, 5.15.0-58-generic, x86_64: installed
hip-dev/focal,now 5.4.22803.50402-104~20.04 amd64 [installed,automatic]
rocm-dev/focal,now 5.4.2.50402-104~20.04 amd64 [installed]

@emankov emankov changed the title Virtual Memory Management API on MI100? [HIP][MI100] Virtual Memory Management API on MI100? Feb 2, 2023
@emankov
Copy link
Contributor

emankov commented Feb 2, 2023

I do not see here something HIP RT-related:

  case hipDeviceAttributeVirtualMemoryManagementSupported:
    *pi = static_cast<int>(g_devices[device]->devices()[0]->info().virtualMemoryManagement_);
    break;

Looks like HW or HSA RT specifics.

@gargrahul, could you please have a look too?

@jowens
Copy link

jowens commented Feb 20, 2023

Hey @gargrahul and @emankov, can we check back on this? Possible for us to get more info on your roadmap here / when it might be available? Email is fine, thanks. cc: @crozhon

@emankov
Copy link
Contributor

emankov commented Mar 1, 2023

@gargrahul, @mangupta could you please let us know to whom we should address this ticket? We suspect HSA RT/HW.

Thank you in advance!

@mangupta
Copy link
Contributor

@crozhon : The ROCm driver does not support Virtual Memory Management and hence HIP runtime reports hipDeviceAttributeVirtualMemoryManagementSupported as 0. The support is being added in a future ROCm release. Please keep an eye out on the ROCm release notes to track this.

@ppanchad-amd
Copy link

@crozhon We have an internal ticket to add support in future ROCm release. Will provide ROCm release info when available. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants