Files
nixpkgs/pkgs/development/python-modules/flashinfer-python/gemm-interface-include-functional.patch
Gaetan Lepage e20a73266f python3Packages.flashinfer-python: fix trtllm_gemm_runner build with GCC 16
trtllmGen_gemm_export/GemmInterface.h (shipped in flashinfer-cubin) uses std::reference_wrapper
without including <functional>, which GCC 16's libstdc++ no longer brings in transitively:
  error: incomplete type "std::reference_wrapper<gemm::gemm::GemmInterface::ModuleCache>" is not allowed

Include it in trtllm_gemm_runner.cu before that header.
2026-11-08 11:58:42 +01:00

19 lines
918 B
Diff

trtllmGen_gemm_export/GemmInterface.h (shipped in flashinfer-cubin) uses std::reference_wrapper
without including <functional>. With GCC 16's libstdc++, nothing included before it in
trtllm_gemm_runner.cu provides it:
error: incomplete type "std::reference_wrapper<gemm::gemm::GemmInterface::ModuleCache>" is not allowed
Include it before that header.
--- a/csrc/trtllm_gemm_runner.cu
+++ b/csrc/trtllm_gemm_runner.cu
@@ -23,6 +23,9 @@
#include "flashinfer/exception.h"
#include "flashinfer/trtllm/common.h"
#include "flashinfer/trtllm/gemm/trtllmGen_gemm_export/Enums.h"
+// GemmInterface.h uses std::reference_wrapper without including <functional>
+#include <functional>
+
#include "flashinfer/trtllm/gemm/trtllmGen_gemm_export/GemmInterface.h"
#include "flashinfer/trtllm/gemm/trtllmGen_gemm_export/trtllm/gen/DtypeDecl.h"
#include "flashinfer/trtllm/gemm/trtllmGen_gemm_export/trtllm/gen/SfLayoutDecl.h"