summarize_graph_break() — pytorch Function Reference
Architecture documentation for the summarize_graph_break() function in common.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 5752cb25_7ac2_c2bf_6619_ca3cbd78adbb["summarize_graph_break()"] bf029f88_db70_e8df_06de_66d5b0f31c56["print_summary()"] bf029f88_db70_e8df_06de_66d5b0f31c56 -->|calls| 5752cb25_7ac2_c2bf_6619_ca3cbd78adbb style 5752cb25_7ac2_c2bf_6619_ca3cbd78adbb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/common.py lines 581–602
def summarize_graph_break(filename):
"""
Sorts and de-dupes the graphs breaks on the reason string. Note that this
function is just a best effort to reduce the logging information. We could
miss some graph breaks because of de-duping. We can further refine this
function as need arises.
"""
log_file = f"{filename.rstrip('.csv')}_graph_breaks.csv"
if os.path.exists(log_file):
df = pd.read_csv(log_file)
df = df.sort_values("reason").drop_duplicates(subset="reason")
# Specialize for multi tensor sgd as reason is not identical
multi_tensor_sgd_row = df.loc[df["reason"].str.contains("_multi_tensor_sgd")]
if len(multi_tensor_sgd_row):
df = df[
~df["reason"].str.contains("_multi_tensor_sgd")
] # Drop all sgd rows
df = pd.concat(
[df, pd.DataFrame([multi_tensor_sgd_row.iloc[0]])], axis=0
) # Add back a single row
df.to_csv(f"{log_file.rstrip('.csv')}_deduped.csv", index=False)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does summarize_graph_break() do?
summarize_graph_break() is a function in the pytorch codebase.
What calls summarize_graph_break()?
summarize_graph_break() is called by 1 function(s): print_summary.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free