From 560411772eb276bbddefca1ff135f0eb6a938735 Mon Sep 17 00:00:00 2001 From: Jason Ansel Date: Thu, 11 Sep 2025 16:47:48 -0700 Subject: [PATCH] Fix tf32 warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UserWarning: Please use the new API settings to control TF32 behavior, such as ▌torch.backends.cudnn.conv.fp32_precision = 'tf32' or torch.backends.cuda.matmul.fp32_precision = 'ieee'. Old settings, e.g, ▌torch.backends.cuda.matmul.allow_tf32 = True, torch.backends.cudnn.allow_tf32 = True, allowTF32CuDNN() and allowTF32CuBLAS() ▌will be deprecated after Pytorch 2.9. stack-info: PR: https://github.com/pytorch/helion/pull/592, branch: jansel/stack/141 --- helion/_testing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helion/_testing.py b/helion/_testing.py index 8d27d56fd..dda909349 100644 --- a/helion/_testing.py +++ b/helion/_testing.py @@ -429,7 +429,8 @@ def run_example( rtol: Relative tolerance for correctness check (default: 1e-2) atol: Absolute tolerance for correctness check (default: 1e-1) """ - torch.set_float32_matmul_precision("high") + torch.backends.cuda.matmul.fp32_precision = "tf32" + torch.backends.cudnn.conv.fp32_precision = "tf32" # type: ignore[reportAttributeAccessIssue] # Normalize to dict format kernels = kernel_fn if isinstance(kernel_fn, dict) else {kernel_name: kernel_fn}