yzh119 opened a new pull request, #189:
URL: https://github.com/apache/tvm-ffi/pull/189

   This PR adds option to build PyTorch DLPack extension ahead of time.
   
   # Changes
   
   - Environment variable control: Set TVM_FFI_BUILD_TORCH_EXT=1 to pre-compile 
the extension at build time
   - Local version tagging: Set TVM_FFI_LOCAL_VERSION=torch2.5.0 to create 
version-tagged wheels (e.g., apache_tvm_ffi-0.1.0+torch2.5.0-...whl)
   - Dynamic build dependencies: PyTorch is only required as a build dependency 
when TVM_FFI_BUILD_TORCH_EXT=1
   - Automatic fallback: Runtime automatically uses pre-compiled extension if 
available, otherwise falls back to JIT compilation
   
   # Usage
   
   ## Default: JIT compilation (no torch build dependency)
   ```bash
     python -m build --wheel
   ```
   
   ## AOT compilation with version tag
   ```
     TVM_FFI_BUILD_TORCH_EXT=1 TVM_FFI_LOCAL_VERSION="torch2.5.0" python -m 
build --wheel
   ```
   
   Backward compatible: Default behavior unchanged, opt-in only.
   
   Remaining work includes adding the release workflow and @cyx-6 could take 
over, you can refer to 
https://github.com/flashinfer-ai/flashinfer/blob/main/.github/workflows/release.yml


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to