Change:
# gpus :: List Gpu gpus = builtins.import ./gpus.nix; <del> # isVersionIn :: Gpu -> Bool </del> <ins> # isSupported :: Gpu -> Bool </ins> isSupported = gpu: let inherit (gpu) minCudaVersion maxCudaVersion; lowerBoundSatisfied = strings.versionAtLeast cudaVersion minCudaVersion; <del> upperBoundSatisfied = !(strings.versionOlder maxCudaVersion cudaVersion); </del> <ins> upperBoundSatisfied = (maxCudaVersion == null) || !(strings.versionOlder maxCudaVersion cudaVersion); </ins> in lowerBoundSatisfied && upperBoundSatisfied; <ins> # isDefault :: Gpu -> Bool isDefault = gpu: let inherit (gpu) dontDefaultAfter; newGpu = dontDefaultAfter == null; recentGpu = newGpu || strings.versionAtLeast dontDefaultAfter cudaVersion; in recentGpu; </ins> # supportedGpus :: List Gpu # GPUs which are supported by the provided CUDA version. supportedGpus = builtins.filter isSupported gpus; <ins> # defaultGpus :: List Gpu # GPUs which are supported by the provided CUDA version and we want to build for by default. defaultGpus = builtins.filter isDefault supportedGpus; </ins> # supportedCapabilities :: List Capability supportedCapabilities = lists.map (gpu: gpu.computeCapability) supportedGpus; <ins> # defaultCapabilities :: List Capability # The default capabilities to target, if not overridden by the user. defaultCapabilities = lists.map (gpu: gpu.computeCapability) defaultGpus; </ins> # cudaArchNameToVersions :: AttrSet String (List String) # Maps the name of a GPU architecture to different versions of that architecture. # For example, "Ampere" maps to [ "8.0" "8.6" "8.7" ].

Discussion:
Steps to reproduce the behavior: magma From : Also may be interested.
Is this related to the race condition error you saw before?
can you tell me more about what hardware you're using, and what your looks like? For reference, runs without issue for me with using a 4090 and an i9 13900k: EDIT: Would you also try building with I made some changes there that moved the CUDA runtime stub and NVCC into . I'm curious if that helps at all.
I don't think so -- closest I can remember to this was the linking error AMD HIP had with 2.7.x (which is why its stuck on magma 2.6.x), but that was a different inscrutable error from .
CPU is a Xeon Gold 5218 with Quadro RTX 8000 GPUs. I haven't set any configuration other than and .
I don't know why this issue isn't affecting your builds but most likely the fix is to set :
Haven't tried yet either, sorry.
Any idea when this failure started occurring?
magma 2.6.2 I believe works but 2.7.1 fails. I can try to bisect at some point if needed.
What channel were you building from by the way? I'm gonna try to find a way to match your setup but I need to know exactly which version of nixpkgs you're using to build.
Okay, I was able to reproduce it. It happened while a Nixpkgs-review for that magma PR I linked earlier. I suspect it has something to do with either my disabling or restricting . Time to investigate ‍
Something for me to look at later tonight; if it is the case that the increased number of cuda capabilities being targeted is causing the binary to bloat, check that we're using , like PyTorch : IIRC Magma doesn't set that flag. Also, I remember being unable to find specifically in the NVCC docs. Since PyTorch also ships binaries targeting a bunch of different CUDA capabilities, their configs are a goldmine of flags we might need to look into. EDIT: Haven't built with it yet, but it seems like it should fix it.

Apache MXNet had the same issue: EDIT2: Reminder to self: if that is the fix, add here: and here:
I know it's still a draft but can you try building again with I think it should fix your issue. Unrelated, but if you're building anything from source and you want faster builds I highly recommend specifying the single compute capability you need to build for (like I do here ) because it results in massively faster builds. HEAD right now builds for 14 different capabilities and that PR gets it down to 8, but it's much faster to build for just one.
is building for me from that branch (without any configuring compute capabilities yet), thanks.