Home / Function/ output_signpost() — pytorch Function Reference

output_signpost() — pytorch Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b8cdd827_b831_469a_75e3_9eb4a7bb1874["output_signpost()"]
  252d25b3_f1f5_8378_1d89_3019fda40b3e["latency_experiment_summary()"]
  252d25b3_f1f5_8378_1d89_3019fda40b3e -->|calls| b8cdd827_b831_469a_75e3_9eb4a7bb1874
  04a3a4a6_8db3_854d_a893_02c9542bf9dd["speedup_experiment()"]
  04a3a4a6_8db3_854d_a893_02c9542bf9dd -->|calls| b8cdd827_b831_469a_75e3_9eb4a7bb1874
  79f63331_206c_51dc_bfd1_4fd84b939754["check_accuracy()"]
  79f63331_206c_51dc_bfd1_4fd84b939754 -->|calls| b8cdd827_b831_469a_75e3_9eb4a7bb1874
  c52cc8f1_b576_9d50_98d9_34f721215c0e["run_performance_test_non_alternate()"]
  c52cc8f1_b576_9d50_98d9_34f721215c0e -->|calls| b8cdd827_b831_469a_75e3_9eb4a7bb1874
  d162fe35_2cc5_7738_ed94_76ad697846ef["run_performance_test()"]
  d162fe35_2cc5_7738_ed94_76ad697846ef -->|calls| b8cdd827_b831_469a_75e3_9eb4a7bb1874
  c9be2096_e6d7_2374_ad2e_a6e33f435ada["run()"]
  c9be2096_e6d7_2374_ad2e_a6e33f435ada -->|calls| b8cdd827_b831_469a_75e3_9eb4a7bb1874
  style b8cdd827_b831_469a_75e3_9eb4a7bb1874 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/common.py lines 431–532

def output_signpost(data, args, suite, error=None):
    from torch.utils._stats import simple_call_counter

    data = data.copy()

    if "name" not in data:
        data["name"] = current_name

    if "dev" not in data:
        data["dev"] = current_device

    filtered_args = vars(args).copy()
    # I generated this list by reading through all the configs and dropping
    # ones that looked irrelevant or redundant
    for k in [
        "filter",
        "exclude",
        "exclude_exact",
        "dump_raw_metrics",
        "log_operator_inputs",
        "distributed_master_port",
        "skip_accuracy_check",
        "generate_aot_autograd_stats",
        "output",
        "output_directory",
        "disable_output",
        "export_profiler_trace",
        "profiler_trace_name",
        "explain",
        "stats",
        "print_memory",
        "print_compilation_time",
        "print_dataframe_summary",
        "print_graph_breaks",
        "log_graph_breaks",
        "timing",
        "progress",
        "timeout",
        "per_process_memory_fraction",
        "minify",
        "verbose",
        "quiet",
        "print_fx",
        "print_aten_ops",
        "log_conv_args",
        "recompile_profiler",
        "find_batch_sizes",
        # Redundant
        "batch_size",
        "batch_size_file",
        "only",
        "diff_branch",
        "tag",
        "coverage",
        "overhead",
        "speedup_dynamo_ts",
        "speedup_fx2trt",
        "speedup_fx2trt_fp16",
        "accuracy",
        "performance",
        "tolerance",
    ]:
        del filtered_args[k]

    event_name = "unknown"
    if args.accuracy:
        event_name = "accuracy"
    elif args.quantization:
        event_name = "quantization"
    elif args.performance:
        event_name = "performance"

    from torch._dynamo.utils import calculate_time_spent, compilation_time_metrics

    wall_time_by_phase = calculate_time_spent()

    open_source_signpost(
        subsystem="dynamo_benchmark",
        name=event_name,
        parameters=json.dumps(
            {
                **data,
                # TODO: Arguably the rest of these should be in the CSV too
                "suite": suite,
                # Better than using compile_times utils directly
                # NB: Externally, compilation_metrics colloquially refers to
                # the coarse-grained phase timings, even though internally
                # they are called something else
                "compilation_metrics": wall_time_by_phase,
                "agg_compilation_metrics": {
                    k: sum(v) for k, v in compilation_time_metrics.items()
                },
                "detailed_compilation_metrics": compilation_time_metrics,
                "simple_call_counter": simple_call_counter,
                # NB: args has training vs inference
                "args": filtered_args,
                "error": error,
            }
        ),
    )

    return wall_time_by_phase["total_wall_time"]

Subdomains

Frequently Asked Questions

What does output_signpost() do?
output_signpost() is a function in the pytorch codebase.
What calls output_signpost()?
output_signpost() is called by 6 function(s): check_accuracy, latency_experiment_summary, run, run_performance_test, run_performance_test_non_alternate, speedup_experiment.

Analyze Your Own Codebase

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

Try Supermodel Free