Skip to content

Commit ad1bff1

Browse files
eqypytorchmergebot
authored andcommitted
[TF32] Fix typo in tf32 wrapper function (pytorch#78438)
Pull Request resolved: pytorch#78438 Approved by: https://github.com/ngimel
1 parent b740a99 commit ad1bff1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torch/testing/_internal/common_cuda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ def tf32_off():
7676
@contextlib.contextmanager
7777
def tf32_on(self, tf32_precision=1e-5):
7878
old_allow_tf32_matmul = torch.backends.cuda.matmul.allow_tf32
79-
old_precison = self.precision
79+
old_precision = self.precision
8080
try:
8181
torch.backends.cuda.matmul.allow_tf32 = True
8282
self.precision = tf32_precision
8383
with torch.backends.cudnn.flags(enabled=None, benchmark=None, deterministic=None, allow_tf32=True):
8484
yield
8585
finally:
8686
torch.backends.cuda.matmul.allow_tf32 = old_allow_tf32_matmul
87-
self.precision = old_precison
87+
self.precision = old_precision
8888

8989

9090
# This is a wrapper that wraps a test to run this test twice, one with

0 commit comments

Comments
 (0)