ROCm / HIP

HIP: C++ Heterogeneous-Compute Interface for Portability
https://rocmdocs.amd.com/projects/HIP/
MIT License
3.58k stars 520 forks source link

HIP - OpenGL/Vulkan Interoperability Status and Plans #2237

Open FilipVaverka opened 3 years ago

FilipVaverka commented 3 years ago

What is the current status and future plans for interoperability between HIP (and OpenCL) and graphics APIs like OpenGL or Vulkan running on top of Mesa?

So far HIP doesn't seem to expose this functionality at all, while OpenCL (ROCm 4.0.0 distribution) does expose it, but doesn't work for me (OpenCL <-> OpenGL buffer sharing leads to GPU page faults).

Are there any plans to introduce this functionality and other APIs such as External Resource Interoperability to allow external data sharing and synchronization?

Daasin commented 2 years ago

Also curious about this, I was under the impression that OpenCL was to converge with Vulkan Interop?

masahi commented 2 years ago

There is already an example of vk interop: https://github.com/ROCm-Developer-Tools/HIP/pull/2375

FilipVaverka commented 2 years ago

So I've tried to build the example on Linux against ROCm 4.5.0 and I'm getting "Segmentation fault" in "hipImportExternalMemory" in libamdhip64.so. Which Vulkan runtimes are supported? (here I used opensource RADV) The example needed little bit of tweaking to compile on Linux as it seems to be aimed at Windows (is there even Windows support in ROCm?).

masahi commented 2 years ago

Yeah, rocm on windows is becoming a thing now https://code.blender.org/2021/11/next-level-support-for-amd-gpus/

FilipVaverka commented 2 years ago

Yes, I was bit surprised seeing that as I haven't seen any information on how to setup ROCm dev. tools on Windows yet.

ppanchad-amd commented 2 weeks ago

@FilipVaverka Can you please test with the latest ROCm 6.1.2? If resolved, please close the ticket. Thanks!