This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 8cb946ef67 [TARGET] Specify correct `mcpu` for Metal target tags
(#18822)
8cb946ef67 is described below
commit 8cb946ef6720ebe1b503c92ed90c493ec192745f
Author: Masahiro Hiramori <[email protected]>
AuthorDate: Thu Feb 26 11:34:44 2026 +0900
[TARGET] Specify correct `mcpu` for Metal target tags (#18822)
As per title.
---
python/tvm/target/tag_registry/metal.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/python/tvm/target/tag_registry/metal.py
b/python/tvm/target/tag_registry/metal.py
index f30d1c0a2a..7e1d68b1f8 100644
--- a/python/tvm/target/tag_registry/metal.py
+++ b/python/tvm/target/tag_registry/metal.py
@@ -19,7 +19,7 @@
from .registry import register_tag
-def _register_metal_tag(name, max_threads, shared_mem, warp_size):
+def _register_metal_tag(name, max_threads, shared_mem, warp_size, mcpu):
register_tag(
name,
{
@@ -30,12 +30,12 @@ def _register_metal_tag(name, max_threads, shared_mem,
warp_size):
"host": {
"kind": "llvm",
"mtriple": "arm64-apple-macos",
- "mcpu": "apple-m4",
+ "mcpu": mcpu,
},
},
)
-_register_metal_tag("apple/m1-gpu", 1024, 32768, 32)
-_register_metal_tag("apple/m1-gpu-restricted", 256, 32768, 32)
-_register_metal_tag("apple/m2-gpu", 1024, 32768, 32)
+_register_metal_tag("apple/m1-gpu", 1024, 32768, 32, "apple-m1")
+_register_metal_tag("apple/m1-gpu-restricted", 256, 32768, 32, "apple-m1")
+_register_metal_tag("apple/m2-gpu", 1024, 32768, 32, "apple-m2")