make_fn() — pytorch Function Reference
Architecture documentation for the make_fn() function in nested_graph_breaks.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 5fe342fd_6a98_d014_b2d1_1bf1df8a48c3["make_fn()"] 8d870d0f_89ae_6a9e_31f0_532e375727c4["fns()"] 8d870d0f_89ae_6a9e_31f0_532e375727c4 -->|calls| 5fe342fd_6a98_d014_b2d1_1bf1df8a48c3 736f984a_b604_69c9_be84_828e40e8a479["gn()"] 5fe342fd_6a98_d014_b2d1_1bf1df8a48c3 -->|calls| 736f984a_b604_69c9_be84_828e40e8a479 style 5fe342fd_6a98_d014_b2d1_1bf1df8a48c3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/microbenchmarks/nested_graph_breaks.py lines 16–30
def make_fn(next_fn):
if next_fn is None:
def fn(x):
x = gn(x)
torch._dynamo.graph_break()
return gn(x)
else:
def fn(x):
return gn(next_fn(gn(x)))
# to prevent recompilation + fallback to eager
fn.__code__ = fn.__code__.replace()
return fn
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does make_fn() do?
make_fn() is a function in the pytorch codebase.
What does make_fn() call?
make_fn() calls 1 function(s): gn.
What calls make_fn()?
make_fn() is called by 1 function(s): fns.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free