Values¶
- class onnxscript.values.Opset(domain: str, version: int)[source]¶
Represents an ONNX Opset, which consists of a domain name, a version.
It also contains a set of operations. This represents an Opset defined in the ONNX schema registry and the operations are retrieved from the ONNX schema registry. It also stores function definitions created for ops in the corresponding Opset.
Only a single instance of Opset is created for a given (domain, version) pair.
- class onnxscript.values.Op(opset: Opset, name: str, op_schema: OpSchema | None = None)[source]¶
Represents an ONNX op instance (for example, the MatMul op from ONNX opset version 13).
It belongs to a particular Opset and has a name.
- opset¶
The Opset that this op belongs to.
- name¶
The name of the op.
- op_schema¶
The ONNX OpSchema for the op.
- class onnxscript.values.OnnxFunction(opset: Opset | None, pyfun: Callable, irfun: IRFunction, source: str, kwargs: dict[str, Any])[source]¶
Represents an ONNX op for which a function-body has been defined in onnxscript.
- opset¶
Opset the function belongs to.
- name¶
Name of the function.
- function¶
Python function.
- function_ir¶
Python code parsed as an
irbuilder.IRFunction
.
- source¶
Source code used to generate the function.
- kwargs¶
Additional properties used to construct a ModelProto.
- op_schema¶
Generated ONNX OpSchema for this op.
- property opname: str¶
Deprecated since version 0.1.
Deprecated and will be removed in version the future. Please use ‘.name’ instead.