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

Function TestGPUCounts

utils/spec_store_test.go:47–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

45}
46
47func TestGPUCounts(t *testing.T) {
48 s := testSpecStore()
49
50 tests := []struct {
51 name string
52 gpuType string
53 expected []int
54 }{
55 {
56 name: "a6000 only has 1 GPU",
57 gpuType: "a6000",
58 expected: []int{1},
59 },
60 {
61 name: "a100xl has 1, 2, 4, and 8 GPUs",
62 gpuType: "a100xl",
63 expected: []int{1, 2, 4, 8},
64 },
65 {
66 name: "unknown GPU returns nil",
67 gpuType: "unknown",
68 expected: nil,
69 },
70 }
71
72 for _, tt := range tests {
73 t.Run(tt.name, func(t *testing.T) {
74 got := s.GPUCounts(tt.gpuType)
75 assert.Equal(t, tt.expected, got)
76 })
77 }
78}
79
80func TestNeedsGPUCountPhase(t *testing.T) {
81 s := testSpecStore()

Callers

nothing calls this directly

Calls 2

GPUCountsMethod · 0.80
testSpecStoreFunction · 0.70

Tested by

no test coverage detected