[Fix] Clear stale FlashInfer BF16 MoE index cache (#33016)

This commit is contained in:
Ziang Li
2026-07-31 00:35:15 -07:00
committed by GitHub
parent 585a7d05e3
commit 937c77cf50
@@ -374,6 +374,11 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, MultiPlatformOp):
# Reorder rows of W1 for fused gated activation
if self.use_flashinfer_trtllm_moe:
# The cached indices are GPU tensors. Colocated weight offloading
# can release their backing memory between reloads, so rebuild them
# once per post-processing cycle.
self._cache_permute_indices.clear()
from flashinfer.fused_moe.core import (
_maybe_get_cached_w3_w1_permute_indices,
convert_to_block_layout,