Skip to content

Commit e1eefa4

Browse files
authored
[Bug] Fix torch warning of tf32 usage (vllm-project#29112)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
1 parent ed6ae1e commit e1eefa4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vllm/model_executor/layers/batch_invariant.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,5 +852,6 @@ def init_batch_invariance():
852852
enable_batch_invariant_mode()
853853

854854
# Disable TF32 for batch invariance - it causes non-deterministic rounding
855-
torch.backends.cuda.matmul.allow_tf32 = False
856-
torch.backends.cudnn.allow_tf32 = False
855+
torch.backends.cuda.matmul.fp32_precision = "ieee"
856+
torch.backends.cudnn.conv.fp32_precision = "ieee"
857+
torch.backends.cudnn.rnn.fp32_precision = "ieee"

0 commit comments

Comments
 (0)