This repository was archived by the owner on Apr 6, 2026. It is now read-only.
Select default shells from available variants#247
Merged
Conversation
Before this change, `nix develop` and `nix develop .#test` would use
the `torch28-metal-aarch64-darwin` or `torch28-cxx11-cu126-${system}`
build variants on macOS or Linux respectively. This had two downsides:
(1) it resulted in an error for ROCm/XPU-only kernels, requiring to
manually specify the variant; (2) we had to maintain the variants
(e.g. bump up the Torch version when 2.8 is not supported anymore).
This change chooses the shell depending on the variants that are
available for a given kernel on a given system. We use the following
ordering to sort the available variants:
- Bundle variants before non-bundle variants.
- CUDA variants before other frameworks.
- Newer Torch versions before older versions.
- Older frameworks before newer (best system compatibility).
Then we choose the first variant in this ordering. This should select
the best variant in most cases.
danieldk
commented
Oct 8, 2025
| bundleOnly = false; | ||
| rev = revUnderscored; | ||
| }; | ||
| buildTree = |
Member
Author
There was a problem hiding this comment.
This output has been broken for a while, so I don't think anyone uses it. IIRC it precedes shell support, it's more convenient to nix develop now and build2cmake there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change,
nix developandnix develop .#testwould use thetorch28-metal-aarch64-darwinortorch28-cxx11-cu126-${system}build variants on macOS or Linux respectively. This had two downsides: (1) it resulted in an error for ROCm/XPU-only kernels, requiring to manually specify the variant; (2) we had to maintain the variants (e.g. bump up the Torch version when 2.8 is not supported anymore).This change chooses the shell depending on the variants that are available for a given kernel on a given system. We use the following ordering to sort the available variants:
Then we choose the first variant in this ordering. This should select the best variant in most cases.