AMD Working On A New Backend For Improving ROCm Compute In QEMU/VMs
AMD engineers are working on enhancing the open-source ROCm compute stack for better handling GPU virtualized compute under QEMU. They are looking at a new implementation for providing better support in virtualized environments.
Intelligence analysis by Llama
AMD is working on a new backend for ROCm GPU compute under QEMU to improve virtualized compute. The existing implementation has roadblocks, such as contention and display stuttering, and the ROCm stack not fitting nicely with the render model.
Imagine you have a computer that can run many virtual machines at the same time. AMD is working on making it easier for these virtual machines to use the computer's graphics card, which is called ROCm. This will make it faster and more efficient for these virtual machines to use the graphics card.
Analysis
Background
AMD engineers are working on enhancing the open-source ROCm compute stack for better handling GPU virtualized compute under QEMU. This is a continuation of their previous work on adding ROCm native context support for Virglrenderer, which has yet to be merged into Virglrenderer.
What Changed
The existing implementation using the VirtIO GPU context type and sharing the display path has encountered some roadblocks. Besides many accelerators lacking a display engine, leveraging the VirtIO GPU context type shared with the display path is causing contention and display stuttering. Compute contexts also typically need more memory access than what's allowed, and the ROCm stack not fitting nicely with the render model.
What's Next
AMD is looking at implementing a dedicated headless VirtIO GPU instance solely for compute. They are also developing an open-source ROCm back-end library loaded in-process by QEMU that would be distributed in the future as part of their ROCm stack.
Key points
- AMD engineers are working on enhancing the open-source ROCm compute stack for better handling GPU virtualized compute under QEMU.
- The existing implementation using the VirtIO GPU context type and sharing the display path has encountered some roadblocks.
- AMD is looking at implementing a dedicated headless VirtIO GPU instance solely for compute.
- They are also developing an open-source ROCm back-end library loaded in-process by QEMU that would be distributed in the future as part of their ROCm stack.
If this development plays out positively, it could lead to improved virtualized compute performance and efficiency, making it easier for developers to use ROCm in their applications.
However, there are also potential downsides to this development, such as increased complexity and potential security risks if the new backend is not properly implemented.

