-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix subgraph bug #260
fix subgraph bug #260
Conversation
xiaowuhu
commented
Jul 13, 2023
•
edited
Loading
edited
- When convert onnx model from fp32 to fp16, the previous process didn't distinguish global graph(model.graph) with sub-graph such as the elseGraph and thenGraph in If op's attribute, so the new Cast op was added into global graph, but it should be insinde the sub-graph.
- After added Cast op, the order of all the ops should be re-sort, in order that the ORT can inference it correctly. Before this PR, the resort need using other tools to do, not friendly to end user.
- add pyproject.toml, because setup.py was deprecated and cannot be used any longer since last week
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Signed-off-by: xiaowuhu <[email protected]>
Please fix the CI failures. |
Signed-off-by: xiaowuhu <[email protected]>
This reverts commit 2da0727.
@@ -248,9 +248,9 @@ def find_type_conversion(source_type, target_type): | |||
""" | |||
Find the operator name for converting source_type into target_type | |||
""" | |||
if type(source_type) == type(target_type): | |||
if isinstance(source_type, target_type): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert from coreml calls this with target_type being FloatTensorType(shape=[]), which is not a type, resulting in
TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
Writing here because the old version would have worked
Python 3.10.13
onnxconverter_common.version 1.14.0
onnxmltools.version 1.12.0
onnx.version 1.15.0
coremltools.version 7.1