Files
nixpkgs/pkgs/development/python-modules/flashinfer-python/trtllm-gen-routing-symlink-in-gen-src-dir.patch
Gaetan Lepage 6d1c716487 python3Packages.flashinfer-python: fix trtllm-gen routing module with a read-only cubin dir
gen_trtllm_gen_routing_module() creates a header symlink inside FLASHINFER_CUBIN_DIR, which is
the read-only flashinfer-cubin package in the store:
  PermissionError: [Errno 13] Permission denied: '.../flashinfer_cubin/cubins/flashinfer'

Use FLASHINFER_GEN_SRC_DIR instead, like the other trtllm-gen modules. flashinfer-jit-cache builds
from the same source, so it applies flashinfer-python's patches too.
2026-11-08 11:58:42 +01:00

20 lines
682 B
Diff

--- a/flashinfer/jit/fused_moe.py
+++ b/flashinfer/jit/fused_moe.py
@@ -486,7 +486,7 @@
h = get_artifact(f"{bmm_export_path}/{header}", get_meta_hash(checksum, header))
assert h, f"{header} not found"
symlink_path = (
- jit_env.FLASHINFER_CUBIN_DIR
+ jit_env.FLASHINFER_GEN_SRC_DIR
/ "flashinfer"
/ "trtllm"
/ "batched_gemm"
@@ -531,6 +531,7 @@
jit_env.FLASHINFER_CSRC_DIR,
jit_env.FLASHINFER_CSRC_DIR / "nv_internal",
jit_env.FLASHINFER_CSRC_DIR / "nv_internal/include",
+ jit_env.FLASHINFER_GEN_SRC_DIR,
jit_env.FLASHINFER_CUBIN_DIR,
],
)