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
ONNX transformation to cast int64 constants to int32 when possible #655
Conversation
The documentation is not available anymore as the PR was closed or merged. |
Should test with ONNX Runtime, it's possible there's an issue (could avoid converting int64 to int32, and just clamp to avoid it):
|
Should be all good now, feel free to review. |
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.
LGTM
@@ -92,7 +59,7 @@ def remove_duplicate_weights(model: ModelProto, inplace: bool = False) -> ModelP | |||
return model | |||
|
|||
|
|||
def replace_atenops_to_gather(model: ModelProto): | |||
def replace_atenops_to_gather(model: ModelProto) -> ModelProto: |
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.
Does this replace aten ops related to Gather to a working version?
If so I would make it more explicit in the name.
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.
No idea, I did not code it. I'm not sure in which case it is an useful transform.
As per title.
Partially fixes #627 , we need to integrate this in this CLI and document + test.
Try with:
Inspect the original and transformed models "Slice" nodes.