Skip to content

Commit

Permalink
moved function get_preferred_onnx_opset to avoid circular commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jvreca committed Sep 13, 2024
1 parent 171d038 commit c84226f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/qonnx/custom_op/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

import importlib

from qonnx.util.basic import get_preferred_onnx_opset

_QONNX_DOMAINS = ["finn", "qonnx.custom_op", "onnx.brevitas"]


Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/qonnx/util/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c84226f

Please sign in to comment.