Fix inference mode mismatch in FlashInfer warmup (#33788)
This commit is contained in:
@@ -621,7 +621,7 @@ class BaseRunner(ABC):
|
||||
torch.get_device_module(mr.device).synchronize()
|
||||
mr.tp_group.barrier()
|
||||
with forward_context(ForwardContext(attn_backend=mr.attn_backend)):
|
||||
with torch.inference_mode(), run_ctx or empty_context():
|
||||
with run_ctx or empty_context():
|
||||
run_once()
|
||||
|
||||
def _autotune_buffers(self) -> Tuple[Optional[Any], Optional[int]]:
|
||||
|
||||
@@ -190,7 +190,7 @@ def flashinfer_autotune_context(model_runner: ModelRunner, *, skip_logits: bool)
|
||||
|
||||
maybe_skip_logits = autotune_dummy_run_mode()
|
||||
skip_ops = get_flashinfer_autotune_skip_ops(mr)
|
||||
with torch.inference_mode(), autotune(
|
||||
with autotune(
|
||||
True,
|
||||
cache=str(autotune_cache),
|
||||
skip_ops=skip_ops,
|
||||
|
||||
Reference in New Issue
Block a user