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 c0ad755 commit 84a8988Copy full SHA for 84a8988
test/dynamo/test_functions.py
@@ -399,6 +399,13 @@ def test_get_default_dtype(x):
399
else:
400
return x - 1
401
402
+ @make_test
403
+ def test_is_complex(x):
404
+ if torch.is_complex(x):
405
+ return x + 1
406
+ else:
407
+ return x - 1
408
+
409
@make_test
410
def test_device(x):
411
if not x.is_cuda:
torch/_dynamo/variables/torch.py
@@ -69,6 +69,7 @@
69
torch.is_autocast_cache_enabled,
70
torch.is_autocast_cpu_enabled,
71
torch.is_autocast_enabled,
72
+ torch.is_complex,
73
torch.is_floating_point,
74
torch.nn.functional._Reduction.get_enum,
75
]
0 commit comments