Skip to content

Introduce clone model #172

@Johansmm

Description

@Johansmm

I would like to know if it is possible to clone an ir.Model from API. I would like something like we can make in onnx:

new_model = onnx.ModelProto()
new_model.CopyFrom(original_model)

Or simpler as:

new_model_ir = original_model_ir.clone()

Today, (to make this) I have to go through onnx:

def clone_ir_model(model):
    return ir.from_proto(ir.to_proto(model))

Which is not optimal

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions