You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rocm works fine in blender, but when run with Ollama I get this in logs:
Jan 22 17:52:59 desktop ollama[196524]: time=2025-01-22T17:52:59.580+03:00 level=WARN source=amd_linux.go:349 msg="unable to verify rocm library: no suitable rocm found, falling back to CPU"
$ ollama --version
Warning: could not connect to a running Ollama instance
Warning: client version is 0.5.7
This might be similar to #375359, but that fix didn't solve my issue.
System metadata
system: "x86_64-linux"
host os: Linux 6.12.9, NixOS, 24.11 (Vicuna), 24.11.20250119.107d5ef
Try adding services.ollama.environmentVariables.HSA_OVERRIDE_GFX_VERSION = "10.3.0"; to your system configuration. I have a RX 6800 XT, so you may need to adjust the GFX version.
Try adding services.ollama.environmentVariables.HSA_OVERRIDE_GFX_VERSION = "10.3.0"; to your system configuration. I have a RX 6800 XT, so you may need to adjust the GFX version.
Try adding services.ollama.environmentVariables.HSA_OVERRIDE_GFX_VERSION = "10.3.0"; to your system configuration. I have a RX 6800 XT, so you may need to adjust the GFX version.
Unfortunately, due to the issue Build failure: rocmPackages.llvm.libcxx, I am currently unable to upgrade to the latest nixpkgs available and I continue using this revision.
So there seems to be something wrong with ROCm at the moment. But now I'm also stuck on Ollama v0.5.4, so I had to overwrite the package version with services.ollama.package. If your nixpkgs already contain Ollama v0.5.7, you can probably omit the services.ollama.package property.
Very interesting that your nixpkgs seem to contain the new Ollama version, but are not yet affected by #375745.
Maybe you can also tell me the revision of the nixpkgs you are currently using?
Config nixpkgs.config.rocmSupport combined with services.ollama.rocmOverrideGfx = "10.3.0"; should be enough to enable ROCm for our cards.
I kept services.ollama.acceleration from a previous system configuration, but the documentation says that it also automatically follows nixpkgs.config.rocmSupport and you can try without setting it explicitly.
Reacted by Dmitry 🌊, DaKingof, Will Bush, Dominic Chambers, Variant9 and Mira
Maybe you can also tell me the revision of the nixpkgs you are currently using?
Nixpkgs Master that I use for the ollama module: 2fc5aeb049f44ed4f9e877cda8a1c334612e1d7a
Unstable that I use for the ollama package: 9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab
Stable that I cureently use for the whole system (just in case): 107d5ef05c0b1119749e381451389eded30fb0d5
This has been working for me recently. However I noticed that setting services.ollama.pkg = pkgs.ollama-rocm; does not work. Instead I have to set services.ollama.acceleration = "rocm"; and leave the default setting for pkg and then it works.
I have a 6900 XT. I am also setting rocmOverrideGfx = "10.3.0";
However I noticed that setting services.ollama.pkg = pkgs.ollama-rocm; does not work.
@fazo96 The option is services.ollama.package, not services.ollama.pkg. That is, package not pkg. If you are using the latest stable version of NixOS (25.11), services.ollama.package = pkgs.ollama-rocm; should now use rocm as expected.
Activity
SigmaSquadron commentedon Jan 22, 2025
Try adding
services.ollama.environmentVariables.HSA_OVERRIDE_GFX_VERSION = "10.3.0";to your system configuration. I have aRX 6800 XT, so you may need to adjust the GFX version.voronind-com commentedon Jan 22, 2025
I'll try that tomorrow and report. Thank you!
fabianhjr commentedon Jan 22, 2025
https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html
6900XT isn't currently supported
Refer to ROCm/legacy-rocm-build#4276
SigmaSquadron commentedon Jan 22, 2025
Unsupportedhas never stopped anyone from trying :)But I think this can be closed as
wontfix, even if the override works.zierf commentedon Jan 23, 2025
You could also use the config services.ollama.rocmOverrideGfx instead of the environment variable.
This works for me atm with a
RX 6900 XT.My pinPackage Function Definition
pinPackage = { name, commit, sha256, }: (import (builtins.fetchTarball { inherit sha256; url = "https://github.com/NixOS/nixpkgs/archive/${commit}.tar.gz"; }) { system = pkgs.system; }).${name};Unfortunately, due to the issue Build failure: rocmPackages.llvm.libcxx, I am currently unable to upgrade to the latest
nixpkgsavailable and I continue using this revision.So there seems to be something wrong with ROCm at the moment. But now I'm also stuck on Ollama v0.5.4, so I had to overwrite the package version with services.ollama.package. If your nixpkgs already contain Ollama v0.5.7, you can probably omit the
services.ollama.packageproperty.Very interesting that your nixpkgs seem to contain the new Ollama version, but are not yet affected by #375745.
Maybe you can also tell me the revision of the nixpkgs you are currently using?
Config
nixpkgs.config.rocmSupportcombined withservices.ollama.rocmOverrideGfx = "10.3.0";should be enough to enable ROCm for our cards.I kept services.ollama.acceleration from a previous system configuration, but the documentation says that it also automatically follows
nixpkgs.config.rocmSupportand you can try without setting it explicitly.voronind-com commentedon Jan 23, 2025
Wym? Rocm works great for me in Blender. Also Ollama lists support for my GPU.
I'll try the
rocmOverrideGfx = "10.3.0";today, thank you very much everyone!voronind-com commentedon Jan 23, 2025
Nixpkgs Master that I use for the ollama module:
2fc5aeb049f44ed4f9e877cda8a1c334612e1d7aUnstable that I use for the ollama package:
9e4d5190a9482a1fb9d18adf0bdb83c6e506eaabStable that I cureently use for the whole system (just in case):
107d5ef05c0b1119749e381451389eded30fb0d5Also just in case my ollama configuration.
fazo96 commentedon Jan 23, 2025
I have the same issue with the same GPU. This used to work and has broken at some point with a nixpkgs update.
I am using
services.ollama.package = pkgs.ollama-rocm. If I setacceleration = "rocm"instead, it tries to compile, but it fails due to #375745I am going to try that again once #375745 is fixed.
voronind-com commentedon Jan 24, 2025
rocmOverrideGfx = "10.3.0";didn't work. Usingollama-rocmalso did nothing. I think fazo96 is right and I just need to wait for 375745 to get fixed.Dakoteus commentedon Jan 25, 2025
I agree, @voronind-com, a possible solution has been merged at #375850
https://nixpk.gs/pr-tracker.html?pr=375850
waiting for it to hit unstable, hopefully can close soon
edit: something is still the matter, follow
#376930
and
#375745
zierf commentedon Feb 10, 2025
Hardware acceleration for both
ollamaandwhisper-cppworks on myAMD RX 6900 XTGPU.I no longer need to pin the package version (as described in my comment above).
I've seen comments removing the
nixpkgs.config.rocmSupport = true;, that is not necessary anymore.fazo96 commentedon Feb 11, 2025
This has been working for me recently. However I noticed that setting
services.ollama.pkg = pkgs.ollama-rocm;does not work. Instead I have to setservices.ollama.acceleration = "rocm";and leave the default setting forpkgand then it works.I have a 6900 XT. I am also setting
rocmOverrideGfx = "10.3.0";voronind-com commentedon Dec 28, 2025
All is working now, thanks!
abysssol commentedon Dec 29, 2025
@fazo96 The option is
services.ollama.package, notservices.ollama.pkg. That is,packagenotpkg. If you are using the latest stable version of NixOS (25.11),services.ollama.package = pkgs.ollama-rocm;should now use rocm as expected.