An End-User Has Made It Easier To Build ROCm & AMD GPU Machine Learning Software

Written by Michael Larabel in Radeon on 27 May 2024 at 06:26 AM EDT. 48 Comments
RADEON
An end-user and Phoronix reader has taken up creating his own AMD ROCm SDK build system to make it easier to setup a machine learning software stack from scratch on AMD Radeon GPUs under Linux. This open-source build system pulls in the AMD ROCm source code as well as AMD GPU-accelerated tools like PyTorch and ONNX and makes it easier to deploy and without having to rely on Docker or other solutions.

The "rocm_sdk_builder" pulls in around 80 projects and makes it easy to compile them all and target for the selected GPU(s) on the system. This is just a hobby project by independent open-source developer Mika Laitio when he took to making it easier to experiment with machine learning software on his Radeon graphics cards.

In an email to Phoronix, Mika went on to explain more of his motivation and plans with this rocm_sdk_builder project:
"My original motivation has really been to check how to get some of the code offloaded from CPU to GPU on consumer level GPU's and because AMD's open source stack starting from the Linux kernel drivers to ROCm, their stack motivated me because it would give opportunities for really improving the system.

I first started downloading, patching and building the repositories one by one and once I had a basic stack of around 15 projects working together, it came clear to me that I need some kind of systematic build system to manage patches. project and version specific configuration options, etc. Story short: Projects now have a simple patch style build system where each project has its own configuration file, it has support for git commands for checking out correct software version and managing patches. All the project files are always installed under a single directory which makes it easy to manage them. I also build separate python under it so that its python module dependencies do not collide with the Linux distributions own python dependencies. I first tried to use a virtual python environment but that had some problems which were resolved by building and installing the real python.

I hope people would find and have time to try this rocm_sdk build system if they have an AMD GPU on their machine and then give feedback and patches to improve the system. There are patches in rocm github repository for example to add fallback support for older GPU's on rocBLAS for example and I think this build system provides an easy and consistent environment to test them on full ML stack.
Then it would be nice to get more distro specific dependencies added to install_deps.sh file. Now there is support for Mageia 9, Ubuntu 23 and Fedora 37 which I have tested for building the system. In addition I have myself only access to 2400g, RX 5700 XT and rx 6800 GPUs and M680i mobile GPUs, so it would be nice if people could test whether the system works on their GPUs as well.

In future plans, there could be its own build branch for mode bleeding edge code, which fetches the source code from other projects development branches instead of using released stable repository code versions. Other things that are needed is to add much more extensive testing to verify that things work as expected on different GPUs. Also some little more advanced examples and tutorials would be nice to have in addition to those one I now have. And more tools need to be added of course, one candidate in my mind is for example the tensorboard. So patches are wished:-)"

The rocm_sdk_builder builds out all of the software within a given directory and doesn't rely on Docker like many of the AMD/GPU projects tend to recommend utilizing. Those wanting to try out the rocm_sdk_builder or to learn more can do so via the GitHub project site.
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