Skip to content

Add an (opset) version to Python objects #136

@Jegp

Description

@Jegp

Currently, there's no way to know which version a NIR graph is being read as. Every graph should contain an opset code so implementors can verify exactly what version they're working on.

We are currently writing version numbers into all the NIR files. That uses the NIR version number instead of an opset code. I reckon there are three ways of handling this:

  1. Move the versioning into the Python object (which will be serialized anyway)
  2. Use version numbers in the files but opset codes in the nodes
  3. Use both version numbers and opset codes in files and objects

I would argue for setting 1 to avoid redundancy. We'll have to represent versioning in Python, so we might as well centralize it. And by making it a property of the objects, we can retain the read_version function in the I/O code and proxy that to the object inside the graph.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions