Commit Graph
7 Commits
Author SHA1 Message Date
Lei WangandClaude Fable 5 7525499330 [CUDA][Cache] Publish immutable binary cache directories (#3177)
* [CUDA][Cache] Publish immutable binary cache directories

* [Example] Drop stale torch JIT build locks in minference example

The vertical_slash_index extension builds into a cache directory shared
across CI runs. torch's FileBaton lock file is not tied to the owning
process, so a run cancelled mid-compile leaves it behind and every later
load() polls on it forever (hung CI at test_vs_sparse_attn). Guard the
build with an OS-level flock, which dies with its holder, and remove any
leftover FileBaton lock before invoking torch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-08 02:46:47 +08:00
Rishabh Sinha 11ec2397fe [Cache] Store cached kernel params as JSON instead of cloudpickle (#3143)
The kernel cache and the autotuner result cache loaded params.pkl with
cloudpickle.load(), so a writable cache directory allowed arbitrary code
execution on the next cache hit. Kernel params are plain data, so store
them as JSON via TVM's reflection (tvm.ir.save_json / load_json), which
rebuilds IR nodes without executing code. Entries without params.json are
treated as incomplete and rebuilt.

Fixes #2817
2026-09-06 16:06:20 +08:00
Lei Wang fded655836 [Runtime][Cache] Detect and repair corrupted cache entries (#3074)
Harden cache entries against partial writes
2026-08-24 17:15:45 +08:00
Lei Wang e3bef1ceac [Runtime][Cache] Remove separate cache temporary directory (#3069)
* [CUDA][Cache] Keep binary cache writes on one filesystem

* [Runtime][Cache] Remove separate cache temporary directory

* [Tests] Drop redundant autotune staging regression

* [Tests] Keep kernel cache cleanup focused

* [Tests] Keep CUDA cache cleanup focused
2026-08-23 21:33:47 +08:00
Chaofan Lin fef9f76092 [Backend] Add unified backend resolution policy (#2318)
* Refactor backend module registration

* Define backends with explicit specs

* Require explicit backend for codegen

* Rename backend spec to backend module

* Keep host codegen on selected backend

* Introduce backend context for compilation

* Remove legacy backend compatibility APIs

* Restore backend API docstrings
2026-08-06 02:41:57 +08:00
Lei Wang 0d97af896e [CUDA][Cache] Include compile options in binary cache key (#2532)
* Include CUDA compile options in binary cache key

* enhance
2026-07-07 00:09:22 +08:00
Lei Wang 46f3d1c924 [CUDA][JIT][Cache] Add cross-host CUDA binary cache (#2459)
* Add CUDA target code attr support

* Add CUDA target normalization support

Introduced a new function to normalize CUDA targets, ensuring that the target is correctly identified and transformed based on the detected architecture. Added a test to verify that the bare CUDA target uses the detected architecture accurately.

* Add cross-host CUDA binary cache

* Nest host kernel cache under version namespace
2026-06-26 15:56:04 +08:00