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

Function testSpecStore

utils/spec_store_test.go:10–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8)
9
10func testSpecStore() *SpecStore {
11 return NewSpecStore(map[string]api.GpuSpecConfig{
12 "a100xl_x1": {DisplayName: "NVIDIA A100 (80GB)", VramGB: 80, GpuCount: 1, VcpuOptions: []int{4, 8, 12}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 500}},
13 "a100xl_x2": {DisplayName: "NVIDIA A100 (80GB)", VramGB: 80, GpuCount: 2, VcpuOptions: []int{8, 12, 16, 20, 24}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 1000}},
14 "a100xl_x4": {DisplayName: "NVIDIA A100 (80GB)", VramGB: 80, GpuCount: 4, VcpuOptions: []int{60}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 2000}},
15 "a100xl_x8": {DisplayName: "NVIDIA A100 (80GB)", VramGB: 80, GpuCount: 8, VcpuOptions: []int{120}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 4000}},
16 "a6000_x1": {DisplayName: "RTX A6000", VramGB: 48, GpuCount: 1, VcpuOptions: []int{4, 6}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 500}},
17 "h100_x1": {DisplayName: "NVIDIA H100", VramGB: 80, GpuCount: 1, VcpuOptions: []int{4, 8, 12, 16}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 500}},
18 "h100_x2": {DisplayName: "NVIDIA H100", VramGB: 80, GpuCount: 2, VcpuOptions: []int{8, 12, 16, 20, 24}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 1000}},
19 "h100_x4": {DisplayName: "NVIDIA H100", VramGB: 80, GpuCount: 4, VcpuOptions: []int{60}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 2000}},
20 "h100_x8": {DisplayName: "NVIDIA H100", VramGB: 80, GpuCount: 8, VcpuOptions: []int{120}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 4000}},
21 "l40_x1": {DisplayName: "NVIDIA L40", VramGB: 48, GpuCount: 1, VcpuOptions: []int{4, 8}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 500}},
22 "l40_x2": {DisplayName: "NVIDIA L40", VramGB: 48, GpuCount: 2, VcpuOptions: []int{8, 12, 16}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 1000}},
23 "l40_x4": {DisplayName: "NVIDIA L40", VramGB: 48, GpuCount: 4, VcpuOptions: []int{40}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 2000}},
24 "l40_x8": {DisplayName: "NVIDIA L40", VramGB: 48, GpuCount: 8, VcpuOptions: []int{80}, RamPerVCPUGiB: 8, StorageGB: api.StorageRange{Min: 100, Max: 4000}},
25 })
26}
27
28func TestGPUOptions(t *testing.T) {
29 s := testSpecStore()

Callers 9

TestGPUOptionsFunction · 0.70
TestGPUCountsFunction · 0.70
TestNeedsGPUCountPhaseFunction · 0.70
TestVCPUOptionsFunction · 0.70
TestIncludedVCPUsFunction · 0.70
TestRamPerVCPUFunction · 0.70
TestStorageRangeFunction · 0.70
TestNormalizeGPUTypeFunction · 0.70
TestLookupFunction · 0.70

Calls 1

NewSpecStoreFunction · 0.85

Tested by

no test coverage detected