Skip to content

Commit 3fb283a

Browse files
authored
Fix allow_tf32 warning (#413)
``` 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. Please see https://pytorch.org/docs/main/notes/cuda.html#tensorfloat-32-tf32-on-ampere-and-later-devices (Triggered internally at /home/jansel/pytorch/aten/src/ATen/Context.cpp:80.) ```
1 parent 457df0f commit 3fb283a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/test_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from helion._testing import import_path
1414
from helion._testing import skipIfRefEager
1515

16-
torch.backends.cuda.matmul.allow_tf32 = True
17-
torch.backends.cudnn.allow_tf32 = True
16+
torch.backends.cuda.matmul.fp32_precision = "tf32"
17+
torch.backends.cudnn.conv.fp32_precision = "tf32"
1818

1919

2020
class TestExamples(RefEagerTestBase, TestCase):

test/test_matmul.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
from helion._testing import import_path
1616
import helion.language as hl
1717

18-
torch.backends.cuda.matmul.allow_tf32 = True
19-
torch.backends.cudnn.allow_tf32 = True
18+
torch.backends.cuda.matmul.fp32_precision = "tf32"
19+
torch.backends.cudnn.conv.fp32_precision = "tf32"
2020
examples_dir = Path(__file__).parent.parent / "examples"
2121
examples_matmul = import_path(examples_dir / "matmul.py").matmul
2222

0 commit comments

Comments
 (0)