Skip to content

Commit 5b8ced3

Browse files
committed
fix Metal codegen: handle shared.dyn scope, remove tvm-ffi<0.1.8 pin
1 parent 3b49183 commit 5b8ced3

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ dependencies = [
3030
# >=0.1.6 fixes a memory issue: tilelang#1502, but keep
3131
# requirement as wide as possible to be compatible with other libraries
3232
# pip will try to use latest version whenever possible.
33-
"apache-tvm-ffi~=0.1.0,>0.1.2",
34-
# apache/tvm-ffi#464
35-
"apache-tvm-ffi<0.1.8; platform_system == 'Darwin'",
33+
"apache-tvm-ffi~=0.1.0,>=0.1.6",
3634
# torch-c-dlpack-ext provides prebuilt torch extensions.
3735
# Without it, TVM FFI may require JIT compilation on first import.
3836
"torch-c-dlpack-ext; python_version < '3.14'",

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Runtime requirements
22

33
apache-tvm-ffi~=0.1.0,>=0.1.6
4-
apache-tvm-ffi<0.1.8; platform_system == 'Darwin'
54
torch-c-dlpack-ext; python_version < '3.14'
65
cloudpickle
76
ml-dtypes

src/target/codegen_metal.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ void CodeGenMetal::PrintStorageScope(const std::string &scope,
314314
std::ostream &os) { // NOLINT(*)
315315
if (scope == "global") {
316316
os << "device ";
317-
} else if (scope == "shared") {
317+
} else if (scope == "shared" || scope == "shared.dyn") {
318318
os << "threadgroup ";
319319
} else if (scope == "local") {
320320
os << "thread ";

0 commit comments

Comments
 (0)