Linux 6.10 Improves AMD ROCm Compute Support For "Small" Ryzen APUs

Written by Michael Larabel in Radeon on 25 May 2024 at 09:45 AM EDT. 12 Comments
RADEON
Sneaking in as a "fix" for the Linux 6.10 kernel is an enhancement to the AMDKFD kernel compute driver used by the ROCm compute stack for better supporting small Ryzen APUs like client and embedded SoCs.

The ROCm compute support for AMD consumer hardware has long been a sore spot and subject to much complaint by Linux enthusiasts and those accustomed to NVIDIA's pervasive CUDA support across all of their products. While the albeit unofficial desktop GPU support has continued to improve for the ROCm compute stack, one of the areas that sadly hasn't received much attention at all has been for the integrated Radeon graphics on their APUs/SoCs. It's rare to see any code activity or mentioned improvements around ROCm / GPU compute on the AMD desktop/laptop APUs even though their popularity has increased greatly with the competitiveness of recent generations of Ryzen SoCs.

Making its way into Linux 6.10 Git is an improvement to the AMDKFD "AMD Kernel Fusion Driver" for GPU compute around these small APUs. The AMDKFD change is for better handling the memory limitations of small APUs and the default memory limits typically set as allocated for the graphics. AMD engineer Lang Yu summed up the change as:
"Small APUs(i.e., consumer, embedded products) usually have a small carveout device memory which can't satisfy most compute workloads memory allocation requirements.

We can't even run a Basic MNIST Example with a default 512MB carveout. https://github.com/pytorch/examples/tree/main/mnist.

Though we can change BIOS settings to enlarge carveout size, which is inflexible and may bring complaint. On the other hand, the memory resource can't be effectively used between host and device.

The solution is MI300A approach, i.e., let VRAM allocations go to GTT."

Thus acknowledging the existing issue of even basic PyTorch examples not being able to run with the compute stack on "small" Ryzen SoCs with Radeon graphics. But this change to let vRAM allocations go to the GTT domain now for small APUs should be a big help.

AMD Ryzen laptops


Great seeing this improvement being made albeit long overdue. Let's hope this is part of a larger effort for enhancing AMDKFD/ROCm on "small" APUs.

This change was merged to Linux 6.10 Git as part of the DRM fixes submitted on Friday.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week