Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions flashinfer-jit-cache/build_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ def _create_build_metadata():

def _compile_jit_cache(output_dir: Path, verbose: bool = True):
"""Compile AOT modules using flashinfer.aot functions directly."""
# Ensure flashinfer/data/ symlinks exist (normally created by the main
# package's build_backend, but jit-cache builds may not install the main
# package first). Use importlib to avoid name collision with this file.
import importlib.util

spec = importlib.util.spec_from_file_location(
"main_build_backend", Path(__file__).parent.parent / "build_backend.py"
)
main_build_backend = importlib.util.module_from_spec(spec)
spec.loader.exec_module(main_build_backend)
main_build_backend._create_data_dir(use_symlinks=True)

from flashinfer import aot

# Get the project root directory
Expand Down
Loading