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
Add GPU fallback support via unified compute field (#65)
## Summary
`compute` now accepts either a single value or an array in
`cerebrium.toml`:
```toml
compute = "HOPPER_H100" # single
compute = ["HOPPER_H100", "HOPPER_H200", "AMPERE_A100_80GB"] # multiple
```
It's just a list of acceptable compute types. The CLI keeps a single
polymorphic field internally and forwards the values on deploy.
## Changes
- `config.go`: `Compute` is a single `ComputeField` (`[]string`) with
`Primary()` / `IsSet()` / `String()` helpers. The deploy payload always
sends `compute` as an array.
- `loader.go`: parses either a string or an array into `ComputeField`,
rejecting empty strings/arrays and non-string elements.
- Deploy summary shows a single `Compute:` row listing all values, and
shows
GPU count whenever it's set.
- `run.go`: the run path still sends a single compute value, as that
endpoint
takes one string.
## Backward compatible
- `compute = "HOPPER_H100"` (string) behaves exactly as before.
- Omitting `compute` is unchanged — a CPU deployment with the usual
defaults.
## Test plan
- [x] All tests pass (`go test ./...`)
- [x] Deployed to dev with array syntax
- [x] Deployed to dev with string syntax (backward compat)
- [x] Deployed to dev with no compute set (default behavior)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Jonathan Irwin <jonoirwinrsa@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments