diff --git a/src/qonnx/custom_op/registry.py b/src/qonnx/custom_op/registry.py index 65b8b2ba..cefc0973 100644 --- a/src/qonnx/custom_op/registry.py +++ b/src/qonnx/custom_op/registry.py @@ -28,8 +28,6 @@ import importlib -from qonnx.util.basic import get_preferred_onnx_opset - _QONNX_DOMAINS = ["finn", "qonnx.custom_op", "onnx.brevitas"] @@ -45,6 +43,11 @@ def is_finn_op(op_type): return is_finn +def get_preferred_onnx_opset(): + "Return preferred ONNX opset version for QONNX" + return 11 + + def getCustomOp(node, onnx_opset_version=get_preferred_onnx_opset(), brevitas_exception=True): "Return a QONNX CustomOp instance for the given ONNX node, if it exists." op_type = node.op_type diff --git a/src/qonnx/util/basic.py b/src/qonnx/util/basic.py index 7c1560ed..d91844da 100644 --- a/src/qonnx/util/basic.py +++ b/src/qonnx/util/basic.py @@ -51,7 +51,7 @@ def get_preferred_onnx_opset(): "Return preferred ONNX opset version for QONNX" - return 11 + return qonnx.custom_op.registry.get_preferred_onnx_opset() def qonnx_make_model(graph_proto, **kwargs):