Home / Function/ write_csv_when_exception() — pytorch Function Reference

write_csv_when_exception() — pytorch Function Reference

Architecture documentation for the write_csv_when_exception() function in common.py from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  7d8e78e3_8a0c_828f_ff82_254897550856["write_csv_when_exception()"]
  c52cc8f1_b576_9d50_98d9_34f721215c0e["run_performance_test_non_alternate()"]
  c52cc8f1_b576_9d50_98d9_34f721215c0e -->|calls| 7d8e78e3_8a0c_828f_ff82_254897550856
  d162fe35_2cc5_7738_ed94_76ad697846ef["run_performance_test()"]
  d162fe35_2cc5_7738_ed94_76ad697846ef -->|calls| 7d8e78e3_8a0c_828f_ff82_254897550856
  c9be2096_e6d7_2374_ad2e_a6e33f435ada["run()"]
  c9be2096_e6d7_2374_ad2e_a6e33f435ada -->|calls| 7d8e78e3_8a0c_828f_ff82_254897550856
  3473d1a5_c1f5_fc97_006e_79a1d3081bef["write_outputs()"]
  7d8e78e3_8a0c_828f_ff82_254897550856 -->|calls| 3473d1a5_c1f5_fc97_006e_79a1d3081bef
  style 7d8e78e3_8a0c_828f_ff82_254897550856 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/common.py lines 3814–3829

def write_csv_when_exception(args, name: str, status: str, device=None):
    print(status)
    placeholder_batch_size = 0
    devices = [device] if device is not None else args.devices
    if args.accuracy:
        headers = ["dev", "name", "batch_size", "accuracy"]
        rows = [[device, name, placeholder_batch_size, status] for device in devices]
    elif args.performance:
        headers = ["dev", "name", "batch_size", "speedup", "abs_latency"]
        rows = [[device, name, placeholder_batch_size, 0.0, 0.0] for device in devices]
    else:
        headers = []
        rows = [[device, name, placeholder_batch_size, 0.0] for device in devices]

    for row in rows:
        write_outputs(output_filename, headers, row)

Subdomains

Frequently Asked Questions

What does write_csv_when_exception() do?
write_csv_when_exception() is a function in the pytorch codebase.
What does write_csv_when_exception() call?
write_csv_when_exception() calls 1 function(s): write_outputs.
What calls write_csv_when_exception()?
write_csv_when_exception() is called by 3 function(s): run, run_performance_test, run_performance_test_non_alternate.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free