We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84a8988 commit 709eee7Copy full SHA for 709eee7
test/dynamo/test_functions.py
@@ -399,6 +399,11 @@ def test_get_default_dtype(x):
399
else:
400
return x - 1
401
402
+ @make_test
403
+ def test_get_autocast_gpu_dtype(x):
404
+ dtype = torch.get_autocast_gpu_dtype()
405
+ return x.type(dtype)
406
+
407
@make_test
408
def test_is_complex(x):
409
if torch.is_complex(x):
torch/_dynamo/variables/torch.py
@@ -64,6 +64,7 @@
64
torch.device,
65
torch.distributed.is_available,
66
torch.finfo,
67
+ torch.get_autocast_gpu_dtype,
68
torch.get_default_dtype,
69
torch.iinfo,
70
torch.is_autocast_cache_enabled,
0 commit comments