Author Topic: AMD OpenCL / ROCm  (Read 20011 times)

Corvidae

  • Newbie
  • *
  • Posts: 25
  • Karma: +11/-0
    • View Profile
Re: AMD OpenCL / ROCm
« Reply #15 on: March 26, 2023, 01:53:58 pm »
To potentially save someone from sinking tons of time into this when it might be doomed to fail: if you are planning on using a Polaris GPU, ROCm will not work on POWER currently due to the lack of PCIE atomics. According to this issue, Vega+ might be fine without them. I double checked if the lack of PCIE atomics was still an issue in 2023, and I would sadly say so:
Code: [Select]
[   14.145631] amdgpu 0000:01:00.0: amdgpu: PCIE atomic ops is not supported
[   14.811332] kfd kfd: amdgpu: skipped device 1002:67c4, PCI rejects atomics 730<0

chatcannon

  • Newbie
  • *
  • Posts: 13
  • Karma: +3/-0
    • View Profile
Re: AMD OpenCL / ROCm
« Reply #16 on: March 27, 2023, 02:00:19 pm »
By accident, I found this:
https://quickbuild.io/~raptor-engineering-public/+archive/ubuntu/rocm-power

I had a look at the packages included in the PPA. It seems that they have build the rocminfo tool but not any of the functionality to get ROCm OpenCL actually working. (Maybe I'm wrong there - I didn't look inside the deb packages, only at the package names.) So I tried it out on Gentoo and rocminfo now builds and runs with no modifications using the existing ebuild file.

rocm-opencl-runtime and rocclr still have arch-specific code for assembly and SSE intrinsics but maybe it is small enough to fix the remainder...

adaptl

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: AMD OpenCL / ROCm
« Reply #17 on: February 15, 2025, 08:58:45 pm »
I tried ROCm years ago on this platform and it didn't work at all. Then I tried it on an x86 platform and it didn't work at all. Then I tried OpenCL and it was slow as hell.

My takeaway is that if you want to do reasonably portable GPGPU stuff learn WebGPU/Vulkan compute shaders. You can do also GPGPU stuff with opengles/webgl with "transform feedbacks" but its extremely limited and a total nightmare, speaking from experience.

Hasturtium

  • Full Member
  • ***
  • Posts: 160
  • Karma: +10/-0
    • View Profile
Re: AMD OpenCL / ROCm
« Reply #18 on: February 18, 2025, 01:46:28 pm »
I tried ROCm years ago on this platform and it didn't work at all. Then I tried it on an x86 platform and it didn't work at all. Then I tried OpenCL and it was slow as hell.

My takeaway is that if you want to do reasonably portable GPGPU stuff learn WebGPU/Vulkan compute shaders. You can do also GPGPU stuff with opengles/webgl with "transform feedbacks" but its extremely limited and a total nightmare, speaking from experience.

OpenCL runs for contemporary Radeons in Fedora via RustiCL - managed to crack that nut a few months ago, but it took some doing. Clover is busted, as I think the firmware it expects to find hasn't been released for post-Navi hardware, and you have to blacklist it or it's likely to throw an error or hang your system outright.