parse_log_file() — pytorch Function Reference
Architecture documentation for the parse_log_file() function in analyze_templates.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 551bcc43_5dd8_fe79_e16b_3b670a030d46["parse_log_file()"] fc92d87b_ad85_a501_c5b5_6e3bd9880812["main()"] fc92d87b_ad85_a501_c5b5_6e3bd9880812 -->|calls| 551bcc43_5dd8_fe79_e16b_3b670a030d46 style 551bcc43_5dd8_fe79_e16b_3b670a030d46 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/microbenchmarks/analyze_templates.py lines 14–34
def parse_log_file(file_path):
with open(file_path) as f:
logs = json.load(f)
occurrence_count = {}
benchmark_logs = {}
# Parse the logs
for entry in logs:
if "invoke" in entry:
shape = entry["invoke"]
if shape not in occurrence_count:
occurrence_count[shape] = 0
occurrence_count[shape] += 1
else:
for shape, timings in entry.items():
if shape not in benchmark_logs:
benchmark_logs[shape] = []
benchmark_logs[shape].extend(timings)
return occurrence_count, benchmark_logs
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does parse_log_file() do?
parse_log_file() is a function in the pytorch codebase.
What calls parse_log_file()?
parse_log_file() is called by 1 function(s): main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free