MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / GPUCounts

Method GPUCounts

utils/spec_store.go:119–127  ·  view source on GitHub ↗

GPUCounts returns all valid GPU counts for a given GPU type, sorted.

(gpuType string)

Source from the content-addressed store, hash-verified

117
118// GPUCounts returns all valid GPU counts for a given GPU type, sorted.
119func (s *SpecStore) GPUCounts(gpuType string) []int {
120 var counts []int
121 for gpuCount := 1; gpuCount <= 8; gpuCount++ {
122 if s.Lookup(gpuType, gpuCount) != nil {
123 counts = append(counts, gpuCount)
124 }
125 }
126 return counts
127}
128
129// IsGPUTypeAvailable reports whether any count for this GPU type is available.
130func (s *SpecStore) IsGPUTypeAvailable(gpuType string) bool {

Callers 15

IsGPUTypeAvailableMethod · 0.95
NeedsGPUCountPhaseMethod · 0.95
TestGPUCountsFunction · 0.80
trySkipModifyComputeMethod · 0.80
initModifyStepMethod · 0.80
handleEnterMethod · 0.80
getMaxCursorMethod · 0.80
computePreviewPriceMethod · 0.80
renderComputeStepMethod · 0.80
trySkipComputeMethod · 0.80
initStepMethod · 0.80

Calls 1

LookupMethod · 0.95

Tested by 1

TestGPUCountsFunction · 0.64