=== ROCm support on FreeBSD

Links: +
link:https://github.com/Yohello1/drm-kmod-rocm/tree/super-special[drm-kmod fork with partial amdkfd support] URL: link:https://github.com/Yohello1/drm-kmod-rocm/tree/super-special[] +
link:https://github.com/Yohello1/rocm-systems[rocm-systems fork with fixes for FreeBSD] URL: link:github.com/Yohello1/rocm-systems[] +


Contact: Sourojeet Adhikari <siri@racha.ca>

ROCm is the compute platform used by AMD for their GPUs.
As of now, FreeBSD does not support ROCm at all, neither at the toolchain level nor at the driver level.
I am working to change that and upstream the required changes.

To my knowledge, on FreeBSD there are a few ways to run compute loads (like AI/ML, graphics, etc) on the GPU; those ways, to my knowledge, are Vulkan and OpenGL.
Both Vulkan and OpenGL are fairly good for compute workloads, namely in graphics and sometimes machine learning loads too.
But sometimes there are tasks which are not well-suited for Vulkan and OpenGL, and are instead done in ROCm/CUDA because ROCm and CUDA give the developer a lot more control over how the task is done.
So I am trying to introduce ROCm support to FreeBSD so we can run ROCm code/programs on FreeBSD.
There are a few things we need working to get ROCm working.
The first is AMD's LLVM fork, which I have patched, gotten working, and have upstreamed the patches.
Next are the ROCm runtimes, which have been patched, and I am currently working on upstreaming the patches.
Finally is the amdkfd driver, which I am working on patching, and am upstreaming some of the LinuxKPI-related patches back to the FreeBSD kernel.

As of late, I have upstreamed changes to AMD's LLVM fork allowing the compilation of their fork on FreeBSD so you can build their ROCm toolchain.
Beyond that, I have worked on getting a series of patches into LinuxKPI to slowly bring in amdkfd support.

Sponsor: The FreeBSD Foundation
