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

Method Lookup

utils/spec_store.go:62–68  ·  view source on GitHub ↗

Lookup returns the spec for a given GPU type and count.

(gpuType string, gpuCount int)

Source from the content-addressed store, hash-verified

60
61// Lookup returns the spec for a given GPU type and count.
62func (s *SpecStore) Lookup(gpuType string, gpuCount int) *api.GpuSpecConfig {
63 spec, ok := s.specs[publicConfigKey(gpuType, gpuCount)]
64 if ok {
65 return &spec
66 }
67 return nil
68}
69
70// IsSpecAvailable reports whether a concrete spec is available. Availability
71// fails open when the API did not provide availability data.

Callers 8

GPUCountsMethod · 0.95
VCPUOptionsMethod · 0.95
RamPerVCPUMethod · 0.95
StorageRangeMethod · 0.95
TestLookupFunction · 0.80
initFunction · 0.80
shouldSkipUpdateCheckFunction · 0.80

Calls 1

publicConfigKeyFunction · 0.85

Tested by 1

TestLookupFunction · 0.64