Repository navigation
Conversation
Transformer Engine selects TF32 for pure FP32 GEMM, and the PyTorch references in the numerics tests do not. Where cuBLAS uses TF32, the FP32 cases fail on correct code. These launchers already set NVIDIA_TF32_OVERRIDE=0 for test_mhc.py for the same reason. Set it for the numerics tests too, so that the L0 launchers give the same result outside the CI image. Signed-off-by: Bruno Volpato <brunocvcunha@gmail.com>
[Low impact] The PR appears safe to merge. SummaryDisables TF32 for three numerics test commands across the two L0 PyTorch launchers.
Reviews (1) · Last reviewed commit: "[CI] Disable TF32 for the L0 PyTorch num..." · Reviewed by Greptile |
|
@timmoon10, would you mind taking a look at this? It sets |
|
quick follow-up with some extra context from #3014 on why NGC CI passes without this override: NGC PyTorch images set IIUC |
Description
Make the L0 PyTorch numerics tests give the same result outside the CI image.
Transformer Engine selects TF32 for pure FP32 GEMM, and the PyTorch references in these tests do not use it. Where cuBLAS takes the TF32 path, FP32 cases in
test_numerics.pyandtests/pytorch/debug/test_numerics.pyfail on correct code, because the differences exceed the FP32 tolerances. The launchers already setNVIDIA_TF32_OVERRIDE=0fortest_mhc.pyfor the same reason.Type of change
Changes
NVIDIA_TF32_OVERRIDE=0for the numerics tests inqa/L0_pytorch_unittest/test.shandqa/L0_pytorch_debug_unittest/test.sh.Validation
Both launcher versions ran on NVIDIA B200 with CUDA 13.2, PyTorch 2.15.0+cu132, and no override in the environment. Without this change, FP32 cases fail in the
test_numerics.pycommand, and the debug launcher exits with an error. With this change, thetest_numerics.pycommand finds no failures, and the debug launcher exits successfully.test_numerics.pyshows the same failures on the same cases with PyTorch 2.11 and 2.13, and the override removes them.NGC PyTorch images set
TORCH_ALLOW_TF32_CUBLAS_OVERRIDE=1, so the PyTorch FP32 reference also uses TF32 there and matches Transformer Engine's default TF32 compute mode. Standard PyTorch installs defaultallow_tf32=Falseand compare Transformer Engine TF32 against PyTorch FP32. SettingNVIDIA_TF32_OVERRIDE=0disables TF32 in cuBLAS for both Transformer Engine and PyTorch. A100 and H100 were not tested.Checklist: