We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05ac839 commit eaad488Copy full SHA for eaad488
1 file changed
test/util.py
@@ -219,8 +219,10 @@ def next_power_of_2(n: int):
219
def torch_use_tf32_matmul():
220
origin = torch.backends.cuda.matmul.fp32_precision
221
torch.backends.cuda.matmul.fp32_precision = "tf32"
222
- yield
223
- torch.backends.cuda.matmul.fp32_precision = origin
+ try:
+ yield
224
+ finally:
225
+ torch.backends.cuda.matmul.fp32_precision = origin
226
227
228
def get_compute_capability_major():
0 commit comments