Skip to content

Modify onnx.Cast(to:f16) to onnx.Cast(to:f32) #3229

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

chentong319
Copy link
Collaborator

Add the rewrite to the decomposition pass under control of flag: --enable-force-f32-cast.
When a model is f16, we can use onnx tool to convert it to f32 for the interface, but not the cast op inside the model. This PR is a temporary workaround to blindly convert the onnx.Cast op. The change should be abandoned if a correct conversion is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant