Commit Graph
6 Commits
Author SHA1 Message Date
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
penguin_wwyandLeiWang1999 47d1b48c21 [BugFix] Skip source-compilation options when exporting LLVM module (#2467)
* [BugFix] Skip source-compilation options when exporting LLVM module cache

* Add regression test

* Refactor kernel cache export handling and improve test coverage

- Renamed `_get_compile_args` to `_get_source_compile_args` for clarity.
- Introduced `_get_export_link_args` to manage export link arguments.
- Updated `_safe_write_executable` to accept export kwargs directly.
- Enhanced `TVMFFIKernelCache` to determine export kwargs based on target host.
- Modified tests to validate new export behavior and ensure source options are correctly handled for different targets.

---------

Co-authored-by: LeiWang1999 <leiwang1999@outlook.com>
2026-07-02 16:41:07 +08:00
Lei Wang 8fd83e22fd [JIT] Remove frontend disk cache (#2363)
Remove frontend disk cache
2026-06-10 00:05:22 +08:00
SepcntandLeiWang1999 e20e74fef5 Optimize disk cache source loading (#2176)
* Optimize disk cache source loading

* Add tests for kernel cache frontend hit and improve memory cache handling

- Introduced a new test to validate the round-trip functionality of real primitive functions in the kernel cache.
- Enhanced the memory cache logic to prevent overwriting existing entries.
- Improved error handling when tagging kernel cache entries with logging for better debugging.

* [Cache] Refine lazy source restore

Guard memory-cache writes after compile, make cache tagging failures diagnosable, and document the lazy frontend-cache gate.

Wrap cached source text/path in CachedTextSource and add a real PrimFunc frontend-cache round-trip regression test.

---------

Co-authored-by: LeiWang1999 <leiwang1999@outlook.com>
2026-05-25 15:49:36 +08:00
Lei Wang e1d63880f6 [Cache] Refactor cache namespace layout (#2057)
* Refactor cache namespace layout

* Update atomic cache tests for namespaced paths

* Ensure namespaced cache dirs exist before save

* Use auto backend in grouped gemm ptr example

* Keep grouped gemm ptr example off cutedsl

* Always use auto backend for grouped gemm ptr

* Skip grouped gemm examples in cutedsl CI

* Ignore grouped gemm examples in cutedsl workflow
2026-04-18 20:15:36 +08:00
Lei WangandFreebase6912 d098f51b8f [Enhancement] Use atomic directory rename for cache writes (#1982)
* [Enhancement] Use atomic directory rename for cache writes

Replace per-file os.replace with write-to-staging + os.rename to
ensure other processes never see an incomplete cache directory.
Also add cleanup of stale staging dirs on init.

* [Bugfix] Fix atomic cache save: abort on critical file failure and fix staging cleanup

- Let kernel lib and params save failures propagate instead of swallowing
  them, so the staging directory is cleaned up rather than renamed as an
  incomplete cache entry.
- Move autotuner staging directory to TILELANG_CACHE_DIR so that
  _cleanup_stale_staging_dirs() can find and remove stale entries.

* Fix atomic cache save recovery and error handling

* Remove unnecessary blank lines in _FakeAdapter and _FakeKernel classes in autotune and cache test files.

* Tighten atomic cache completeness checks

* Simplify atomic cache save error handling

* submodule update

* remove legacy test

---------

Co-authored-by: Freebase6912 <amid-gauze-racing@duck.com>
2026-04-17 02:27:00 +08:00