lainchan / Ω
OpenCL is completely busted on AMD
Mitnick · 2024-01-12 08:37
I hate to make another complaining thread, but people really need to stop recommending the dumpster fire that is AMD, especially on Linux. This fuarrrking piece of soykaf company can't even package a working OpenCL instance for their Navi series cards on Ubuntu. For reference, I have an RX 5500 "Navi 14", which is a card from fuarrrking 2019, so, not long ago at all.
You can install their drivers from their site, i.e. amdgpu-install, but then look what happens when you try to install the opencl usecase - clinfo | grep error :
<span class="heading">= CL_PROGRAM_BUILD_LOG =</span>
fatal error: cannot open file '/usr/lib/clc/gfx1012-amdgcn-mesa-mesa3d.bc': No such file or directory
Preferred work group size multiple (kernel) <getWGsizes:1504: create kernel : error -46>
<span class="heading">= CL_PROGRAM_BUILD_LOG =</span>
fatal error: cannot open file '/usr/lib/clc/gfx909-amdgcn-mesa-mesa3d.bc': No such file or directory
Preferred work group size multiple (kernel) <getWGsizes:1504: create kernel : error -46>
So this incompetent company supplies you with broken OpenCL drivers, which is already enough to swear them off. I don't care if it's the llvm, mesa, or whoever's fault. I can't use DaVinci Resolve, hashcat, john, certain aspects of Blender or Darktable because of this soykaf.
Now supposedly you can install libclc-amdgcn to get that missing library, but I'll never know, because it breaks other libclc packages that will also break OpenCL if they're removed. I tried forcing different versions, installing old libraries, and just doing everything I could but there's no way, I can't get amdgcn to play nice with my other libraries. Supposedly the AUR has a package that fixes this, opencl-amd , but I'm not sure if I want to switch to an entire new OS over this.
I heard that Nvidia's CUDA works better on Linux now, so maybe I should throw this card into the dumpster where it belongs (Or pass it through to a Windows VM). And forget Rusticl, it's broken AF and they now require Ubuntu 24.04 or later to run it.
SOURCES:
Issue on Mesa's Gitlab detailing the problem with Navi14 cards:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/4189
A (now deprecated) post in the Linux Mint forums that alerted me about libclc-amdgcn having the missing file:
https://forums.linuxmint.com/viewtopic.php?f=42&t=362544
"No plan to support" gfx1012 and similar cards from the ROCm team (This one I'm not sure about, because if I run rocminfo I don't see any errors, so does that mean ROCm works for me?):
https://github.com/ROCm/ROCm/issues/1735
Hong, Guil Dong · 2024-01-12 12:31
unless you buy "enterprise class" cards, you're basically not going to get working OpenCL on linux.
Hououin Kyouma · 2024-01-12 19:12
What is OpenCL even used in?
This message was too short.
Hitomi · 2024-01-13 03:37
>>75206
As I said in the OP: DaVinci Resolve, hashcat and john the ripper - for these three it's completely mandatory; without it the software will not work. Also crypto miners like xmrig need it if you want to use the MSR mod for greater hashrates
Blender and Darktable can use it for rendering, but it's not mandatory to work, just makes certain processes a lot faster. These are just the ones that personally affected me, I'm sure there's more
Linda Lee · 2024-01-13 06:02
>>75206
opencl/cuda are for running code massive parallelized on gpu's. GPU's were always build trying to have a processing unit per pixel on screen and people noticed wait we can use that for any math and it completely overshadows cpu multicore as long as we have no branching code. Its not used as much as it should however because its plain garbage in usability.
>>75201
you can blame nvidia for opencl being soykaf. They want Cuda to be dominant and have been a negative influence on opencl since inception. The way they support opencl? Block new features and implement them in Cuda. They get the sticker for supporting opencl standard while parading Cuda exclusive features.
Personally i simply went back to opengl manually writing code that translates into a render to texture format. Its dirty but it works on any machine and saves a lot of time. I think its much better than dealing with opencl/cuda. Although its of course easier to write opencl/cuda and make it the users problem to get it to run...
Masami Eiri · 2024-02-01 13:14
>>75201
AMD's compute is a joke. NVIDIA supports their ancient GPUs with CUDA while AMD ends support of Polaris.
>This one I'm not sure about, because if I run rocminfo
I don't get any error with rocminfo as well. Try running something like koboldcpp with ROCm.
Vasya Pupkin · 2024-02-02 05:59
I complained enough in the right places and it seems they merged a pull request to llvm that might fix this:
https://github.com/llvm/llvm-project/pull/78884
As I said, I'm just a layman, I only wanted to use DaVinci Resolve, hashcat, and a few other programs, but this may mean support for the Clover platform is coming back while they work on rusticl.
Now does this mean it will ever come to Ubuntu? Or do we need to rely on PPA maintainers like kisak or oibaf to make it happen? I don't know
Chan Siu Ming · 2024-03-14 11:07
Just to complain some more and revive this thread, opencl is now completely broken for me after some updates - the latest official amdgpu drivers and kisak's updated mesa ppa. Now, my clinfo outputs this:
clinfo: symbol lookup error: /usr/lib/x86_64-linux-gnu/gallium-pipe/pipe_radeonsi.so: undefined symbol: amdgpu_va_get_start_addr
Where does a normal person even begin to address this problem? I don't get what I'm supposed to do, I like to think I'm pretty smart, I know my way around the terminal, but it seems like unless you're a Mesa dev you're SOL
It really is just hilariously bad, how unstable AMD is on Linux. I would be embarrassed if I worked for AMD.
Nanashi No Gombe · 2024-03-14 12:16
>>76268
FOSS is dead. HOPE is vain. Submit to SLAVERY. Do not ever COMPLAIN.
Chan Siu Ming · 2024-03-14 16:12
>>76270
Don't you ever sage me again.
Tequila · 2024-03-14 17:40
>>75201
>>76268
I've had 0 issues with OpenCL (ROCm drivers) on Arch and Gentoo. I know you said you don't want to switch distros, but please reconsider...
Tyrell Wellick · 2024-03-15 10:24
>>76275
Or else you will FIND and RAPE me for telling you the TRUTH?
Hiro Protagonist · 2024-03-16 15:27
>>76276
Well I think my rocm works fine, it's just that some applications seem to prefer opencl.
I also have other graphical glitches I wasn't going to mention, because I'm not technically inclined enough to accurately describe them. Epiphany browser opens to a blank screen, unless I disable compositing - so that's a webkit issue. I just had an electron-based app stop working unless I disabled gpu acceleration, so that's another framework that's busted.
I also have this new, super annoying graphical glitch that affects applications going into fullscreen only. About 50% of the time (sometimes more, depending on the program), when I go into fullscreen the display flickers left and right rapidly until I leave fullscreen mode. It's like the entire display is off-center, so you have about 20% of the left side of the screen cut off, and it's appears on the 20% of the right side of the screen that would have been blank. There also may be some graphical artifacts like so. Feels like a Wayland issue.
Here, I've tried to recreate the fullscreen glitch in GIMP - it basically looks like this when it happens. I used Lain on Jellyfin as an example, and I also used an unrelated mpv screenshot I had with a very similar looking graphical glitch for the bottom left corner - I've seen that green soykaf before. The app seems to try to correct itself, so the picture will go back to normal for 1/10th of a second before switching back and forth repeatedly.
I don't know if these are AMD issues, Ubuntu repo issues or Wayland. But it really is a clown show over here lately.
Sipho Nkosi · 2024-03-16 15:35
>>75201
Intel and AMD both just work for 99% of users. That's why nobody recommend getting a GPU from Nvidia because you must install the proprietary drivers (but it's easy on Arch Linux and Gentoo). Another downside to Nvidia is that they can potentially end support for your card and stop providing updates for your GPU.
Nobody important · 2024-03-16 17:16
>>76312
AMD just werks for very basic things like gaming and watching videos, but anything beyond that is a nightmare. At least that's been my experience
Lady Jessica · 2024-03-16 23:06
I'm using AMD CPU and GPU on Devuan linux and john works fine for me.
Nobody special · 2024-03-17 16:18
I still think AMD is busted on Ubuntu but I'm going to try purging the kisak mesa ppa and uninstalling/reinstalling the amdgpu drivers. Maybe it was the "fresh" mesa packages causing my system's instability
Marly Krushkhova · 2024-03-17 17:14
UPDATE
Alright, well I'm somewhat happy. Turns out it was the "mesa fresh" ppa from kisak causing a lot of problems. After purging everything the epiphany web browser and my electron apps are back to normal. I also removed mesa-opencl-icd altogether in favor of adding the libclc-amdgcn to see if that would do anything, but so far it hasn't. I then went and only installed rocm from AMD, and it works but I get a confusing message from my clinfo now:
dlerror: libMesaOpenCL.so.1: cannot open shared object file: No such file or directory
dlerror: libRusticlOpenCL.so.1: cannot open shared object file: No such file or directory
Why does it want these at all? It's annoying that it throws me an error in the first place, I don't see what mesa and rusticl have to do with rocm.
Well, for now I don't care. I'm just going to use rocm for opencl stuff when I can. Hopefully that screen shaking issue is gone now too, but I'll find out shortly
Sipho Nkosi · 2024-03-23 10:44
>>76310
Nice glitch art, brah. Mind if I use it as my desktop bg?
Boris Grishenko · 2024-03-23 13:54
>>75201
Off-topic but
None of this would be a problem if companies did not keep their fuarrrking hardware specifications closed source. People would write open source drivers for everything.
Haruyoshi · 2024-03-23 21:04
I was actually able to remove the previous errors about mesa's cl platform by simply purging the package. Now I have some more problems, because HIP isn't working for me but it seems like it works for other people for some reason. Also hashcat just hangs on the -I flag, or information mode.
Wondering if I have to run amdgpu-uninstall again, reinstall rocm/hip and see if it works this time.
Was doing some XMR mining with opencl enabled. I think even with my hardware I was only getting 1 Kh/s, but then I read that opencl isn't even really useful for mining, it just increases your chances of getting good blocks. But I'm also not sure how well it was working now that I see these hip errors, I want to be sure. Does a Ryzen 3 5300G CPU with an RX 5500 GPU make sense for 1kh/s hashrate? That's like $1 USD per month...
>>76392
It's perfectly on topic, because proprietary software is partly the reason for this
The Fin · 2024-03-23 21:57
alright, fuarrrk it, im uninstalling/reinstalling amdgpu-install to see if that fixes the problem, only this time I'm running it with --opencl=rocr --no-dkms --no-32 , as apparently it works for some of the people on this github page:
https://github.com/hashcat/hashcat/issues/3918
...and no, it did nothing. This seems to be the issue with HIP:
error: unknown argument: '-flegacy-pass-manager'
Each hash type outputs this full error when using HIP
hiprtcCompileProgram(): HIPRTC_ERROR_COMPILATION
error: unknown argument: '-flegacy-pass-manager'
1 error generated when compiling for gfx1012.
* Device #1: Kernel /usr/share/hashcat/OpenCL/shared.cl build failed.
* Device #1: Kernel /usr/share/hashcat/OpenCL/shared.cl build failed.
Nemissa · 2024-03-23 22:12
oh crap, i also have this toward the top of my benchmark output, i wonder what it means?
/sys/bus/pci/devices/0000:0f:00.0/hwmon/hwmon4/pwm1: No such file or directory