-
Notifications
You must be signed in to change notification settings - Fork 214
Set explicit GPU defaults in ResourcesSpec and improve default GPU vendor selection#3573
Open
peterschmidt85 wants to merge 2 commits intomaster from
Open
Set explicit GPU defaults in ResourcesSpec and improve default GPU vendor selection #3573peterschmidt85 wants to merge 2 commits intomaster from
peterschmidt85 wants to merge 2 commits intomaster from
Conversation
...ments in resource pretty-printing
- Default to NVIDIA only if user has no image - Keep backward compatibility with old/new server/CLI - Make `dstack offer` consistent with `dstack apply` Co-authored-by: Cursor <cursoragent@cursor.com>
@peterschmidt85
peterschmidt85
changed the title
(削除) Set explicit GPU default (
(追記) Set explicit GPU defaults in ResourcesSpec and improve default GPU vendor selection (追記ここまで)
Feb 13, 2026
0..) in ResourcesSpec and minor improvements in resource pretty-printing (削除ここまで)
Contributor
Author
peterschmidt85
commented
Feb 13, 2026
TODOs
Docs updates:
- Update
gpuproperty description in concepts pages (dev-environments.md,tasks.md,services.md) andprotips.mdto reflect:- No
gpuspecified → defaults to0..(any vendor) - No count specified → defaults to
1.. - Vendor defaults to
nvidiaonly when no customimageis set; with custom image, any vendor is allowed
- No
- Update reference schema docs accordingly
Future scope (outside this PR):
- Consider making TPU an explicit opt-in for GCP backend, since TPU requires specific setup and silently offering TPU instances may lead to unexpected behavior
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.
Motivation
Previously,
ResourcesSpec.gpudefaulted toNone, making GPU the only resource without an explicit default (CPU defaults to2.., memory to8GB.., disk to100GB..). This caused the GPU field to be hidden in the CLI plan output. Additionally, the NVIDIA vendor default was silently applied deep in the validation code regardless of whether the user set a custom image.Changes
ResourcesSpec.gpudefault toGPUSpec(count=0..)instead ofNone, aligning GPU with other resource defaultsnvidiaonly when using the default CUDA image (no customimageordocker). With a custom image, any vendor is allowedset_gpu_vendor_default()with full backward compatibility across old/new CLI and server combinationsBefore / After
Backward compatibility
Tested across all CLI/server combinations (new CLI 0.21-dev, old CLI 0.20.9, new server, old server on sky.dstack.ai). GCP backend used for tests (has both NVIDIA and TPU offers).
dstack apply
dstack offer
Key observations