Thanks to visit codestin.com Credit goes to github.com
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 2e8d2a2 commit b5021baCopy full SHA for b5021ba
test/dynamo/test_functions.py
@@ -436,6 +436,13 @@ def test_get_default_dtype(x):
436
else:
437
return x - 1
438
439
+ @make_test
440
+ def test_is_complex(x):
441
+ if torch.is_complex(x):
442
+ return x + 1
443
+ else:
444
+ return x - 1
445
+
446
@make_test
447
def test_device(x):
448
if not x.is_cuda:
torch/_dynamo/variables/torch.py
@@ -73,6 +73,7 @@
73
torch.is_autocast_cache_enabled,
74
torch.is_autocast_cpu_enabled,
75
torch.is_autocast_enabled,
76
+ torch.is_complex,
77
torch.is_floating_point,
78
torch.nn.functional._Reduction.get_enum,
79
]
0 commit comments