Skip to content

Commit b72420d

Browse files
davidtaiclaude
andcommitted
ci: run the Python tests in 2 GPU and 3 CPU shards
The hosted macOS runners are a shared pool. Pack the GPU pass into 2 shards and the CPU pass into 3 shards, balanced by the durations that run 39902948153 measured. A run now uses 8 macOS jobs, and at most 6 run at the same time (before: 10 jobs, 8 at the same time). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 7448e09 commit b72420d

2 files changed

Lines changed: 44 additions & 44 deletions

File tree

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"gpu": [
33
[
4+
"test_quantized",
45
"test_ops",
56
"test_reduce",
67
"test_nn",
@@ -32,71 +33,66 @@
3233
"test_tree"
3334
],
3435
[
35-
"test_quantized",
36-
"test_fft",
36+
"test_fast_sdpa",
37+
"test_fast_gated_delta",
3738
"test_compile",
39+
"test_fft",
40+
"test_array",
3841
"test_blas"
39-
],
40-
[
41-
"test_fast_gated_delta",
42-
"test_fast_sdpa",
43-
"test_array"
4442
]
4543
],
4644
"cpu": [
4745
[
48-
"test_fast_gated_delta.TestGatedDelta.test_gated_delta_sequential",
46+
"test_fast_gated_delta.TestGatedDelta.test_gated_delta_simdgroup",
4947
"test_quantized:rest",
50-
"test_export_import",
48+
"test_fast_sdpa.TestFastSDPA.test_sdpa_vector_gqa_long",
5149
"test_fft",
50+
"test_fast_gated_delta:rest",
51+
"test_ops",
52+
"test_array",
53+
"test_conv",
5254
"test_eval",
53-
"test_upsample",
54-
"test_load",
55-
"test_threads",
55+
"test_autograd",
56+
"test_metal_threadgroup_bounds",
57+
"test_zero_copy",
58+
"test_bf16",
59+
"test_einsum",
5660
"test_double",
57-
"test_device",
58-
"test_einsum"
61+
"test_memory"
5962
],
6063
[
61-
"test_fast_gated_delta.TestGatedDelta.test_gated_delta_nax",
64+
"test_reduce",
65+
"test_fast_gated_delta.TestGatedDelta.test_gated_delta_sequential",
66+
"test_compile",
6267
"test_quantized.TestQuantized.test_qmv_wide",
6368
"test_quantized.TestQuantized.test_gather_qmm_sorted",
69+
"test_nn",
6470
"test_quantized.TestQuantized.test_qmv",
65-
"test_quantized.TestQuantized.test_qmm_large_dims",
66-
"test_quantized.TestQuantized.test_gather_qmm_sorted_nax_large_m",
67-
"test_compile",
68-
"test_optimizers",
69-
"test_conv",
70-
"test_autograd",
71-
"test_vmap",
71+
"test_fast",
72+
"test_upsample",
73+
"test_threads",
7274
"test_random",
73-
"test_linalg",
74-
"test_bf16",
75+
"test_vmap",
7576
"test_conv_transpose",
76-
"test_constants"
77+
"test_tree",
78+
"test_graph"
7779
],
7880
[
79-
"test_fast_gated_delta.TestGatedDelta.test_gated_delta_simdgroup",
80-
"test_reduce",
81+
"test_fast_gated_delta.TestGatedDelta.test_gated_delta_nax",
8182
"test_fast_sdpa.TestFastSDPA.test_sdpa",
82-
"test_zero_copy",
83-
"test_metal_threadgroup_bounds",
83+
"test_fast_sdpa:rest",
84+
"test_export_import",
85+
"test_quantized.TestQuantized.test_gather_qmm_sorted_nax_large_m",
86+
"test_blas",
87+
"test_quantized.TestQuantized.test_qmm_large_dims",
88+
"test_optimizers",
89+
"test_load",
8490
"test_extension",
85-
"test_graph",
91+
"test_linalg",
8692
"test_init",
93+
"test_constants",
8794
"test_losses",
88-
"test_memory",
89-
"test_tree"
90-
],
91-
[
92-
"test_fast_sdpa.TestFastSDPA.test_sdpa_vector_gqa_long",
93-
"test_fast_sdpa:rest",
94-
"test_fast_gated_delta:rest",
95-
"test_blas",
96-
"test_ops",
97-
"test_nn",
98-
"test_array",
99-
"test_fast"
95+
"test_device"
10096
]
10197
]
10298
}

‎.github/workflows/fork-tests.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ name: Fork Tests
1717
# .github/scripts/fork-tests/python-shards.json, and
1818
# .github/scripts/fork-tests/python_shards.py fails a job if a test file is
1919
# in no shard or in two shards.
20+
#
21+
# The hosted macOS runners are a shared pool. A run uses 8 macOS jobs, and
22+
# at most 6 of them run at the same time. A new push to a pull request
23+
# cancels the older run and frees its runners.
2024

2125
on:
2226
pull_request:
@@ -172,7 +176,7 @@ jobs:
172176
matrix:
173177
# One job for each "gpu" shard in python-shards.json. The script
174178
# fails if the two counts are not equal.
175-
shard: [0, 1, 2]
179+
shard: [0, 1]
176180
env:
177181
METAL_DEBUG_ERROR_MODE: 0
178182
METAL_DEVICE_WRAPPER_TYPE: 1
@@ -282,7 +286,7 @@ jobs:
282286
fail-fast: false
283287
matrix:
284288
# One job for each "cpu" shard in python-shards.json.
285-
shard: [0, 1, 2, 3]
289+
shard: [0, 1, 2]
286290
env:
287291
DEVICE: cpu
288292
# Tests that take more than 5 minutes on the CPU. The GPU pass

0 commit comments

Comments
 (0)