GPUVM Discrete GPU Code For AMDKFD, Radeon Compute Could Be Ready For Linux 4.17

Written by Michael Larabel in Radeon on 27 January 2018 at 11:04 AM EST. 23 Comments
RADEON
Sent out Friday night were the latest patches for getting the discrete GPU support within the AMDKFD HSA kernel driver up to scratch for allowing the ROCm compute stack working off a mainline kernel.

Earlier this month AMD sent out a large dGPU patch-set for AMDKFD, short for the AMD Kernel Fusion Driver. AMD's Felix Kuehling confirmed that a prerequisite PCI-E atomics patch is currently queued up for landing into Linux 4.16, which is fine since this AMDKFD material is already too late for hitting the 4.16 tree.

Felix then sent out 25 patches adding GPUVM support for dGPUs with the AMDKFD driver. With this GPUVM support, some tests are now being able to run on what will be the mainline kernel code, "Most testing was done on Fiji with KFDTest (Yong started working on open-sourcing it). I was also able to run the OpenCL version of SHOC, though most sub-tests still fail. KFDTest can manage VRAM and system memory, submit shader dispatches, receive events. I haven't tested multi-GPU yet, but in theory that should also work, with system memory buffers shared between multiple GPUs."


Felix noted the last "big missing piece" is userptr memory support for user-allocated memory mapped for GPU access. He's planning on sending that out next and should allow for more real-world applications to run with this kernel driver code being upstreamed.

Long story short, it's looking like all the pieces are falling into place where with the Linux 4.17 kernel cycle in a few months, the ROCm/OpenCL user-space could finally be playing nicely on the mainline kernel! That is with the discrete GPUs where as up until recently they were more focused on getting all the APU bits upstreamed first. It's been a long time coming and I can't wait for this milestone so the open-source ROCm code can be more widely deployed and easier to use with no longer needing out-of-tree kernel modules. Upstream AMDKFD maintainer Oded Gabbay has also confirmed he's hoping to get all this code upstream for 4.17.
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