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
{{ message }}
Repository navigation
ucx: enableCuda in an overlay causes infinite recursion #239182
It’s also worth noting that it’s new to 11.8, maybe to help support older CUDA code on the ARM-based Grace Hopper chip? That’s why we didn’t see this failure before.
Built without errors: /nix/store/spklzl860idj6awrsfdzznk3490afrbr-python3.10-jax-0.4.5
python3Packages.jaxlib
Built without errors: /nix/store/ym0sk71xlkhi0l3c7yqwj49ykwz5v7fc-python3.10-jaxlib-0.4.4
python3Packages.tensorflowWithCuda
Built without errors: /nix/store/zm00wmzzwazi5hvqhd357fpr9vi5f3jr-python3.10-tensorflow-gpu-2.11.1
python3Packages.torch
Perhaps it was built without using the static version of magma?
I do see the dynamic version is too large (+2GB) to be linked with the default code model (which should be small).
I'm trying a separate build of dynamic Magma with "-DCMAKE_C_FLAGS=-mcmodel=medium" "-DCMAKE_CXX_FLAGS=-mcmodel=medium" to see if that allows it to build.
python3Packages.torchvision
tts
Built without errors: /nix/store/29jmgl1rgmfcxmcfwgpfpzdq8kx0f38c-tts-0.14.0
Flake reproducer (to be used with nix flake check):
{inputs.nixpkgs.url="github:NixOS/nixpkgs/e5e5c5e2035f07dd73d0da1afe16a3ee22e35d6e";nixConfig={extra-substituters=["https://cantcache.me""https://cuda-maintainers.cachix.org"];extra-trusted-substituters=["https://cantcache.me""https://cuda-maintainers.cachix.org"];extra-trusted-public-keys=["cantcache.me:Y+FHAKfx7S0pBkBMKpNMQtGKpILAfhmqUSnr5oNwNMs=""cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="];};outputs=inputs: letsystem="x86_64-linux";config={allowUnfree=true;cudaSupport=true;};pkgs=importinputs.nixpkgs{inheritsystemconfig;};in{checks.${system}=inputs.self.packages.${system};packages.${system}={inherit(pkgs)blendercolmapWithCudatts;# Both cuda_compat and libcudla are only available on `aarch64-linux`.inherit(pkgs.cudaPackages)cutensor;inherit(pkgs.python3Packages)jaxjaxlibtensorflowWithCudatorchtorchvision;};formatter.${system}=pkgs.alejandra;};}
@SomeoneSerge I think I figured out the PyTorch failure. Not sure about the others/unable to reproduce.
I suspect that your CI managed to grab a commit in-between when CUDA 11.8 was made the default (which broke dynamically linked Magma due to the binary size increase) and when I made Magma default to static builds for CUDA.
Ok, it seems that the original issue does not belong in nixpkgs, but I don't know how to move issues between repos.
What is a nixpkgs issue, is that (import <nixpkgs> { overlays = [ (final: prev: { ucx = prev.ucx.cudaSupport = true; }) ]; }).ucx is an infinite recursion, because of:
changed the title [-]blender, colmapWithCuda, cudaPackages: evaluation error, infinite recursion[/-][+]ucx: enableCuda in an overlay causes infinite recursion[/+]on Jun 26, 2023
Mid-term, we can update ucx to use the redist packages.
The longer-term solution is to deprecate cudaPackages.cudatoolkit since it's a bootstrap nightmare
Activity
ConnorBaker commentedon Jun 22, 2023
Will take a look shortly -- that's odd!
I was able to build blender just now, will try the others soon.
ConnorBaker commentedon Jun 22, 2023
Looks like
cuda_compatis an ARM only library:nixpkgs/pkgs/development/compilers/cudatoolkit/redist/manifests/redistrib_11.8.0.json
Lines 38 to 48 in 437d2a8
It’s also worth noting that it’s new to 11.8, maybe to help support older CUDA code on the ARM-based Grace Hopper chip? That’s why we didn’t see this failure before.
ConnorBaker commentedon Jun 22, 2023
Will be updated as I continue to build them.
For packages which aren't available on
x86_64-linux, should they be accessible throughcudaPackageson that system?blender/nix/store/klxbl8jk0b2wabn8q52qxqaljaf2s45c-blender-3.5.1colmapWithCuda/nix/store/xdy04l10k6y4qyz025iz039x6s5w9mpd-colmap-3.7cudaPackages.cuda_compatOnly available on
aarch64-linuxnixpkgs/pkgs/development/compilers/cudatoolkit/redist/manifests/redistrib_11.8.0.json
Lines 38 to 48 in 437d2a8
cudaPackages.cutensor/nix/store/616xl2ldszxnlampg2jc8vxv0lm7ba6q-cudatoolkit-11.8-cutensor-1.5.0.3cudaPackages.libcudlaOnly available on
aarch64-linuxnixpkgs/pkgs/development/compilers/cudatoolkit/redist/manifests/redistrib_11.8.0.json
Lines 688 to 698 in 437d2a8
python3Packages.jax/nix/store/spklzl860idj6awrsfdzznk3490afrbr-python3.10-jax-0.4.5python3Packages.jaxlib/nix/store/ym0sk71xlkhi0l3c7yqwj49ykwz5v7fc-python3.10-jaxlib-0.4.4python3Packages.tensorflowWithCuda/nix/store/zm00wmzzwazi5hvqhd357fpr9vi5f3jr-python3.10-tensorflow-gpu-2.11.1python3Packages.torch"-DCMAKE_C_FLAGS=-mcmodel=medium" "-DCMAKE_CXX_FLAGS=-mcmodel=medium"to see if that allows it to build.python3Packages.torchvisiontts/nix/store/29jmgl1rgmfcxmcfwgpfpzdq8kx0f38c-tts-0.14.0Flake reproducer (to be used with
nix flake check):ConnorBaker commentedon Jun 22, 2023
@SomeoneSerge I think I figured out the PyTorch failure. Not sure about the others/unable to reproduce.
I suspect that your CI managed to grab a commit in-between when CUDA 11.8 was made the default (which broke dynamically linked Magma due to the binary size increase) and when I made Magma default to static builds for CUDA.
SomeoneSerge commentedon Jun 26, 2023
Ok, it seems that the original issue does not belong in nixpkgs, but I don't know how to move issues between repos.
What is a nixpkgs issue, is that
(import <nixpkgs> { overlays = [ (final: prev: { ucx = prev.ucx.cudaSupport = true; }) ]; }).ucxis an infinite recursion, because of:nixpkgs/pkgs/development/compilers/cudatoolkit/common.nix
Lines 127 to 131 in d409d42
This is exactly what happens at
https://github.com/SomeoneSerge/nixpkgs-cuda-ci/blob/8b461ff67bae99323d1b8913f89f387aa92bc020/nix/overlays.nix#L32-L34
[-]blender, colmapWithCuda, cudaPackages: evaluation error, infinite recursion[/-][+]ucx: enableCuda in an overlay causes infinite recursion[/+]SomeoneSerge commentedon Jun 26, 2023
Temporary work-around is to update the overlays like so:
Mid-term, we can update
ucxto use the redist packages.The longer-term solution is to deprecate
cudaPackages.cudatoolkitsince it's a bootstrap nightmareSomeoneSerge commentedon Jun 26, 2023
@ConnorBaker thank you a lot for all the tests you've run!
SomeoneSerge commentedon Dec 10, 2023
This must've been addressed by #271078 or #272063