← Back to list

AMD TheRock— Fairy Tale on Heterogeneous Programming

I’ve been amazed by HPC since I first heard of CUDA and OpenCL back in 2014. But since then, I’ve never really had a computer with an…

Leonardo Batista · 2026-02-18 22:16 · 0 claps · 1.9 min read
#cuda #amd #rocm #gpgpu #hpc
Open on Medium ↗
Wiki topics: OPS · LLMOps & Inference 💻 · Programming

AMD TheRock— Fairy Tale on Heterogeneous Programming

I’ve been amazed by HPC since I first heard of CUDA and OpenCL back in 2014. But since then, I’ve never really had a computer with an NVIDIA GPU, except for a notebook with an MX150 that I tried to use without much success. Also, I was indeed much less a “developer” and more a “hobbyist” at that time.

Jump ahead to late 2025: I’m now a senior developer, but still without an Nvidia card in sight. My only machine is a laptop powered by an AMD Ryzen 7 7845 APU. Everything changes with the arrival of TheRock, a tool that finally makes ROCm installation a breeze for Linux users and expands support for a wider range of AMD graphics cards. At last, I get another shot at GPGPU.

I opted to use the pip’s installation as described on the GitHub releases page, and to my surprise, the Hello World from TheRock announcement worked on the very first attempt. It felt amazing to compile it for the first time, especially since it was an AMD card that, until weeks ago, was used only for some gaming and the OS itself.

However, as in a fairy tale, I faced my own struggles on the path to my happily-ever-after. As an experimental project, TheRock lacks introductory material, and the AMD HIP/ROCm documentation is quite complicated for newbies, making it take longer than it should to fully understand how it works. My lack of knowledge of CMake and C++ didn’t help much with that, either.

The first struggle I faced was to use CMake properly with the compiler, headers, and all the tools in my .venv installation. After some tinkering and prompts, I figured out a simple command that manages to “teach” CMake to use the correct tools:

HIPCXX="$(rocm-sdk path --root)/llvm/bin/clang" \
HIP_PATH="$(rocm-sdk path --root)" \
HIP_PLATFORM=amd CMAKE_PREFIX_PATH="$(rocm-sdk path --root):$CMAKE_PREFIX_PATH" \
cmake -S . -B build

Another important lesson was to set the language to HIP for .hip or .cpp files that use HIP code (at least in my case), using the set_source_files_properties clause. Also, for my particular installation of VSCodium with the clangd extension, I had to include the following in the settings.json for proper IntelliSense:

"clangd.arguments": [
  "--query-driver=**/.venv/**/clang"
]

However, TheRock still misses some relevant features, such as the ROCm Debugger, and fails to compile even basic code when mixing host and device functions, as my open issue shows. Therefore, I cannot recommend it for production use. Yet it feels like the beginning of a fairy tale, and I hope AMD will mature this build system to bring it on par with the CUDA offering.

This marks the start of a series chronicling my adventures with AMD HIP and ROCm programming, where I’ll share discoveries, lessons, and the occasional struggle. In the next chapter, I’ll dive into getting my first real-world HIP kernel up and running: facing syntax quirks, memory management gotchas, and discovering what it actually takes to launch code on the GPU.


메타데이터
post_id
59efbc057421
slug
amd-therock-fairy-tale-on-heterogeneous-programming-59efbc057421
url
https://medium.com/@Leonardobat/amd-therock-fairy-tale-on-heterogeneous-programming-59efbc057421
canonical_url
https://medium.com/@Leonardobat/amd-therock-fairy-tale-on-heterogeneous-programming-59efbc057421
author_url
https://medium.com/@Leonardobat
status
ok
fetched_at
2026-06-23 21:39:52