chop.passes.graph.analysis.statistical_profiler.profile_statistics

profile_statistics_analysis_pass

chop.passes.graph.analysis.statistical_profiler.profile_statistics.profile_statistics_analysis_pass(graph, pass_args: dict)[source]

Perform profile statistics analysis on the given graph.

Parameters:
  • graph (MaseGraph) – The graph to perform analysis on.

  • pass_args (dict) – The arguments for the analysis pass.

pass_args = {
    "by": "type", # pick from ["name", "type"]
    "target_weight_nodes": "linear", # ["conv2d", "linear" ...],
    "target_activation_nodes": "relu", # ["relu", "sigmoid" ...],
    "weight_statistics": {
        "variance_precise": {
            "device": "cpu",
            "dims": "all"
        },
    },
    "activation_statistics": {
        "variance_precise": {"device": "cpu", "dims": "all"},
    },
    "input_generator": input_generator,
    "num_samples": 1,
    "profile_output_activation": False,
Returns:

The modified graph and an empty dictionary.

Return type:

tuple(MaseGraph, dict)