Comparison Functions

Module: polygraphy.tools.args

class CompareFuncSimpleArgs[source]

Bases: BaseArgs

Comparison Function: simple: the CompareFunc.simple comparison function.

Depends on:

  • ComparatorCompareArgs

parse_impl(args)[source]

Parses command-line arguments and populates the following attributes:

no_shape_check

Whether to skip shape checks.

Type:

bool

rtol

Per-tensor relative tolerance.

Type:

Dict[str, float]

atol

Per-tensor absolute tolerance.

Type:

Dict[str, float]

check_error_stat

The error metric to check.

Type:

str

infinities_compare_equal

Whether to allow +-inf to compare as equal.

Type:

bool

save_heatmaps

Directory in which to save heatmaps of error.

Type:

str

show_heatmaps

Whether to display heatmaps of error.

Type:

bool

save_error_metrics_plot

Path to store generated error plots.

Type:

str

show_error_metrics_plot

Whether to display the error metrics plots.

Type:

bool

error_quantile

Per-tensor quantile of error to compute.

Type:

Dict[str, float]

class CompareFuncIndicesArgs[source]

Bases: BaseArgs

Comparison Function: indices: the CompareFunc.indices comparison function.

Depends on:

  • ComparatorCompareArgs

parse_impl(args)[source]

Parses command-line arguments and populates the following attributes:

index_tolerance

Per-tensor index tolerance.

Type:

Dict[str, int]