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 bea70f2 commit b957aa4Copy full SHA for b957aa4
transformer_engine/pytorch/jit.py
@@ -22,7 +22,12 @@
22
no_torch_dynamo = lambda recursive=True: lambda func: func
23
if torch.__version__ >= "2":
24
import torch._dynamo
25
- no_torch_dynamo = lambda recursive=True: lambda f: torch._dynamo.disable(f, recursive=recursive)
+ if torch.__version__ >= "2.1":
26
+ no_torch_dynamo = lambda recursive=True: lambda f: \
27
+ torch._dynamo.disable(f, recursive=recursive)
28
+ else:
29
+ # no "recursive" option in pyTorch 2.0 - it acts as if recursive was True
30
+ no_torch_dynamo = lambda recursive=True: torch._dynamo.disable
31
32
33
def set_jit_fusion_options() -> None:
0 commit comments