MCPcopy Create free account
hub / github.com/pytorch/tutorials / bar

Function bar

recipes_source/torch_compiler_set_stance_tutorial.py:55–57  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

53
54@torch.compiler.set_stance("force_eager")
55def bar(x):
56 # force disable the compiler
57 return foo(x)
58
59
60print(bar(inp)) # not compiled, prints -1

Calls 1

fooFunction · 0.70

Tested by

no test coverage detected