main() — pytorch Function Reference
Architecture documentation for the main() function in fx_microbenchmarks.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 6760b199_72fa_746c_6cb0_c904d0485466["main()"] b5c9c5fb_ec6e_0bae_bf95_77dadef24243["huge_graph()"] 6760b199_72fa_746c_6cb0_c904d0485466 -->|calls| b5c9c5fb_ec6e_0bae_bf95_77dadef24243 style 6760b199_72fa_746c_6cb0_c904d0485466 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/microbenchmarks/fx_microbenchmarks.py lines 19–27
def main():
g = huge_graph()
def fn():
for n in g.graph.nodes:
pass
t = min(timeit.repeat(fn, number=K, repeat=3))
print(f"iterating over {N * K} FX nodes took {t:.1f}s ({N * K / t:.0f} nodes/s)")
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does main() do?
main() is a function in the pytorch codebase.
What does main() call?
main() calls 1 function(s): huge_graph.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free