shapes() — pytorch Function Reference
Architecture documentation for the shapes() function in inductor_mm.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 31b7d7cf_d369_349c_d3fb_295720c1291f["shapes()"] 4526aa5c_f504_cae4_579d_39d37e870ba4["test_total_time()"] 31b7d7cf_d369_349c_d3fb_295720c1291f -->|calls| 4526aa5c_f504_cae4_579d_39d37e870ba4 dd08baca_e7b7_4c73_60cc_7d9f6fa55a3a["test_GPU_time()"] 31b7d7cf_d369_349c_d3fb_295720c1291f -->|calls| dd08baca_e7b7_4c73_60cc_7d9f6fa55a3a style 31b7d7cf_d369_349c_d3fb_295720c1291f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/microbenchmarks/inductor_mm.py lines 90–109
shapes = [
# alexnet
([128, 9216], [9216, 4096]),
([128, 4096], [4096, 4096]),
([128, 4096], [4096, 1000]),
# BERT
([2048, 768], [768, 768]),
([2048, 768], [768, 3072]),
([2048, 3072], [3072, 768]),
# hf_GPT2
([1024, 768], [768, 768]),
([1024, 768], [768, 3072]),
([1024, 3072], [3072, 768]),
([1024, 768], [768, 2304]),
]
print("test total time")
test_total_time(shapes)
print("test GPU time")
test_GPU_time(shapes)
Domain
Subdomains
Source
Frequently Asked Questions
What does shapes() do?
shapes() is a function in the pytorch codebase.
What does shapes() call?
shapes() calls 2 function(s): test_GPU_time, test_total_time.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free