Skip to content

add tvm-ffi metal #506

Open
ved1beta wants to merge 1 commit intohuggingface:mainfrom
ved1beta:tvf-ffi-metal
Open

add tvm-ffi metal #506
ved1beta wants to merge 1 commit intohuggingface:mainfrom
ved1beta:tvf-ffi-metal

Conversation

@ved1beta
Copy link
Copy Markdown

@ved1beta ved1beta commented Apr 26, 2026

fixes #352

Summary

  • Adds noarch variants for the tvm-ffi framework (tvm-ffi-metal, tvm-ffi-cuda, tvm-ffi-cpu, tvm-ffi-rocm, tvm-ffi-xpu, tvm-ffi-universal)
  • Introduces TvmFfiNoarch mirroring TorchNoarch;
  • Extends parse_variant and BUILD_VARIANT_REGEX
  • Updates _sort_variants so within noarch, Torch is preferred over tvm-ffi

tests

Torch beats tvm-ffi when both are present
noarch fallback when no arch variant matches
arch variant beats noarch on the actual hardware

@danieldk
Copy link
Copy Markdown
Member

danieldk commented Apr 26, 2026

We already have a branch for tvm-ffi and there is also support for kernel-builder in it. However Metal support will require upstream tvm-ffi changes, because there is currently no way for tvm-ffi to pass MTLBuffers (only pointers to the raw data), which is needed for other Metal APIs (as well as no way to get other compute context).

For this reason we are postponing tvm-ffi Metal support until these issue have been fixed upstream.

@ved1beta
Copy link
Copy Markdown
Author

ahh thanks for the response , will try to put a pr upstream 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tvm-ffi Metal support

2 participants