Skip to content

Commit f130e55

Browse files
committed
add unittests without jit
1 parent 69284ed commit f130e55

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

flashinfer/aot.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,6 @@ def gen_all_modules(
525525
# Add cuDNN FMHA module
526526
jit_specs.append(gen_cudnn_fmha_module())
527527

528-
# NOTE(Zihao): just for debugging, remove later
529-
jit_specs = [gen_spdlog_module()]
530-
531528
# dedup
532529
names = set()
533530
ret: List[JitSpec] = []

flashinfer/jit/cpp_ext.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ def _get_num_workers() -> Optional[int]:
263263

264264

265265
def run_ninja(workdir: Path, ninja_file: Path, verbose: bool) -> None:
266+
if os.environ.get("FLASHINFER_DISABLE_JIT"):
267+
raise RuntimeError(
268+
"JIT compilation is disabled via FLASHINFER_DISABLE_JIT environment variable"
269+
)
266270
workdir.mkdir(parents=True, exist_ok=True)
267271
command = [
268272
"ninja",

scripts/task_test_nightly_build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ pip install ${DIST_CUBIN_DIR}/*.whl
2323
echo "Installing flashinfer-jit-cache from ${DIST_JIT_CACHE_DIR}..."
2424
pip install ${DIST_JIT_CACHE_DIR}/*.whl
2525

26+
# Disable JIT to verify that jit-cache package contains all necessary
27+
# precompiled modules for the test suite to pass without compilation
28+
echo "Disabling JIT compilation to test with precompiled cache only..."
29+
export FLASHINFER_DISABLE_JIT=1
30+
2631
echo "Installing flashinfer-python from ${DIST_PYTHON_DIR}..."
2732
pip install ${DIST_PYTHON_DIR}/*.tar.gz
2833

0 commit comments

Comments
 (0)