AddDefaultAttributesPass¶

class onnx_ir.passes.common.AddDefaultAttributesPass[source]¶

Add default values for optional attributes that are not present in nodes.

This pass iterates through all nodes in the model and for each node: 1. Gets the ONNX schema for the operator 2. For each optional attribute with a default value in the schema 3. If the attribute is not present in the node, adds it with the default value

call(model)[source]¶

Main entry point for the add default attributes pass.

Parameters:

model (Model)

Return type:

PassResult