-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMD GPU on Linux doesn't work with Mesa's OpenCL drivers #239
Comments
The GPU is not supported with out OpenCL. What happens if you run |
I will have to get home to send it, but I've checked and everything seems to be correct. Geekbench's OpenCL benchmark also completes with no issues. |
If the client says it has now OpenCL support for the GPU it means that it was either not able to access OpenCL at all or it was not able to match the GPU it found in the system to a device in OpenCL. The later can occur if the driver does not supply PCI bus information. You may need to install AMD's drivers to get the GPU to work with F@H. |
Yeah, I'm using AMD's rocm driver to fold currently, and it works fine (as long as I delete the libraries bundled with the core to make it use the system libraries, I'll make a separate issue for that later). I just made this issue to try to find out why Mesa's implementation doesn't work. |
Someone else had mesa drivers and their GPU was disabled. clinfo indicated that FP64 was not supported by mesa opencl. |
OK, I'll make sure to send my |
Forgot to send it, sorry. This is using Mesa's Still greyed out in folding@home though, with the same message in the log as previously. Could it be because
|
Yes. OpenCL 1.2 or later is required. |
There is a flag to tenable FP64 with Rusticl since Mesa 23.2-devel, but I don't have the hardware to test it : https://www.phoronix.com/news/Rusticl-OpenCL-FP64-Doubles |
Lack of OpenCL v1.2 and FP64 support are both problems that would prevent the GPU from getting an assignment on F@H. However, I believe the real reason the client marks the GPU as unsupported is because the driver does not support either the |
Will test this when I'm back home, and send the Edit: Tested it on the integrated graphics in my laptop, and FP64 support does show up. If you look at the
|
New
|
Did you restart |
Yeah, I did. I’m not at home right now (will be back in 2 days), and I’ll post it then. |
|
Is this still not supported? I see |
I wonder if that is really sorted now. I saw similar issues with other distributed computing projects, where Mesa drivers are highly problematic. |
I believe the Mesa drivers still have emulated FP64 |
Ok, i think i made it work. First i add this to the
but then i add to compile the client myself, because i had to comment some part of the code, i don't why (maybe this could help investigate), i'm not a c++ developer neither an opencl developer. |
Any chance of performance comparison numbers between AMD opencl and mesa? If there is no difference, then this would be great. Though currently AMD opencl on Linux is quite broken as is performance wise :( |
Sadly, rusticl doesn't seem to be stable enough, my computer rebooted after 20 minutes (around 2.5~3.0%). I didn't had this problem when i was using the amdgpu opencl |
is there a specific reason this line doesn't mention fp32? |
There not fp32 feature_flag in the list So i changed |
Heat would have been an issue even with AMD drivers. |
I think |
Weird, even with my systemd service edited for
(and confirmed in
despite both of those clearly being listed in |
gpus.json is just a list of GPUs which FAH will support if appropriate drivers and API packages are installed |
@imyxh I had to compiled the code myself to remove some part otherwise the GPU wasn't reconized. The code look for platform, but rusticl doesn't return the "data" that FAH is expected, but the device seem to say that is support the required extension, but like i said i'm not expert in OpenCL (like in openCL you have the concept of platform and device, and apparently FAH is looking into the platform and if the platform doesn't return the expected extension it's stop there, but the device indicate that they support the extension, so that weird... someone else with more knowledge of GPU and OpenCL would be in better position to help) |
actually I'm a little confused because amdocl64 doesn't show cl_khr_device_uuid or cl_khr_pci_bus_info as platform extensions in clinfo either, despite working with fah-client |
yeah, even with a patch that causes rusticl to report both cl_khr_device_uuid and cl_khr_pci_bus_info as platform extensions, I'm still getting |
@imyxh Did you restart the daemon of fah ? |
Hmm... that weird... in previous attempt when i went to the GPU 3D protein viewer the protein was like super small, like if i was unzoom at 500%, even after i tried to zoom i never got the same view/zoom/scale that i could get when see the 3D protein viewer of the CPU, but today the GPU 3D protein viewer seem to be at the correct scale...? Maybe i got some update of mesa (i will let it run and see if it's still fail) |
Success ! I have completed one Work Unit with GPU using Rusticl. Sadly i still had to use my compiled version of fah to be able to get the video card mark as supported. |
@jcoffland I compiled a new version of fah-client with the new version of cbang and my GPU is correctly recognized with rusticl now (thanks @imyxh for creating a ticket on the cbang repo) could we have a new version of the official fah-client ? In the mean time if you want the fah-client to work with rusticl and amd you will need to compile the fah-client yourself and copy the builded fah-client to the appropriate location. Once the build is completed
sudo mv ~/fah-client /usr/bin/fah-client && \
sudo chown root:root /usr/bin/fah-client && \
sudo chmod u=rwx,g=rx,o=rx /usr/bin/fah-client
Note: Ensure that the owner of the file is root with this permissions
It should look like this |
I tried to replicate the setup using docker and found out that you need to use the Here the resulting dockerfile FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y scons
WORKDIR /src
RUN git clone https://github.com/cauldrondevelopmentllc/cbang \
&& git clone https://github.com/foldingathome/fah-client-bastet
RUN export CBANG_HOME=$PWD/cbang \
&& scons -C cbang \
&& scons -C fah-client-bastet
FROM ubuntu:24.04 AS final
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:kisak/kisak-mesa \
&& apt-get install -y mesa-opencl-icd ocl-icd-opencl-dev
WORKDIR /app
COPY --from=build /src/fah-client-bastet/fah-client .
ENV RUSTICL_ENABLE=radeonsi RUSTICL_FEATURES=fp64 OCL_ICD_VENDORS=/etc/OpenCL/vendors/rusticl.icd
ENTRYPOINT [ "/app/fah-client" ] build the docker image |
When trying to use Mesa's implementation of OpenCL, the gpu is greyed out in the devices list like so:

I can also see
being printed out in the log. There is a similar line in
gpus.json
:Could this simply be a case of something setting the type field incorrectly (and FAH thus thinking the GPU is unsupported)?
The text was updated successfully, but these errors were encountered: