Skip to content
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

False warning about unsupported doubles in runtime GEMM operations #2353

Open
kmooney47 opened this issue Aug 21, 2024 · 2 comments
Open

False warning about unsupported doubles in runtime GEMM operations #2353

kmooney47 opened this issue Aug 21, 2024 · 2 comments
Labels
bug An unexpected problem or unintended behavior pending on user response Waiting for more information or validation from user

Comments

@kmooney47
Copy link

Describe the bug
When writing a TF/keras model trained w/ with F64, tf2onnx warns about a lack of float64 support for GEMM by the runtime:

onnx_model, _ = tf2onnx.convert.from_keras(model, opset=14)
onnx.save(onnx_model, "./testF64.onnx") 

WARNING:root:For now, onnxruntime only support float32 type for Gemm rewriter
From:
https://github.com/onnx/tensorflow-onnx/blob/main/tf2onnx/rewriter/gemm_rewriter.py#L74

As far as I can tell ORT indeed does support double GEMM and was implemented about a year after this warning was added to the tf2onnx writer. I'm guessing that this warning was just never updated following the addition of double support. I've tested the exported F64 onnx models and they appear to be using doubles throughout the computation.

See this commit to the runtime repo adding double support:
microsoft/onnxruntime@5968a91

Based on this I believe we can remove that warning, or at least update it to represent a more current runtime support slate.

Urgency
LOW

To Reproduce
Export a model from keras trained in F64 using tf2onnx

@kmooney47 kmooney47 added the bug An unexpected problem or unintended behavior label Aug 21, 2024
@fatcat-z
Copy link
Collaborator

Did you try to remove the line in gemm_rewriter.py and export your model successfully?

@fatcat-z fatcat-z added the pending on user response Waiting for more information or validation from user label Aug 22, 2024
@kmooney47
Copy link
Author

Did you try to remove the line in gemm_rewriter.py and export your model successfully?

The model still exports without issue as the line sends back a warning not an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior pending on user response Waiting for more information or validation from user
Projects
None yet
Development

No branches or pull requests

2 participants