Skip to content

Commit c98800a

Browse files
authored
Add Apple GPUs (#49)
This fixes testing on local macOS machines (CI doesn't have this problem because they don't attach GPUs)
1 parent 2b7cb0d commit c98800a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mojo/extensions.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ _gpu_toolchains_tag = tag_class(
204204
"mi300x": "amdgpu:gfx942",
205205
"mi325": "amdgpu:gfx942",
206206
"rtx5090": "nvidia:120a",
207+
"m1": "metal:10",
208+
"m2": "metal:20",
209+
"m3": "metal:30",
210+
"m4": "metal:40",
207211
},
208212
doc = "The GPUs supported by this toolchain, mapping to Mojo's target accelerators.",
209213
),
@@ -227,6 +231,10 @@ _gpu_toolchains_tag = tag_class(
227231
"MI325": "mi325",
228232
"Navi": "radeon",
229233
"AMD Radeon Graphics": "radeon",
234+
"Apple M1": "m1",
235+
"Apple M2": "m2",
236+
"Apple M3": "m3",
237+
"Apple M4": "m4",
230238
},
231239
doc = "The output from nvidia-smi or rocm-smi to the corresponding GPU name in SUPPORTED_GPUS.",
232240
),

0 commit comments

Comments
 (0)