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

problem in converting fp32 to fp16 #307

Open
Macsim2 opened this issue Nov 18, 2024 · 2 comments
Open

problem in converting fp32 to fp16 #307

Macsim2 opened this issue Nov 18, 2024 · 2 comments

Comments

@Macsim2
Copy link

Macsim2 commented Nov 18, 2024

Hi guys,
I'm trying to convert onnx model fp32 to fp16.
but I faced This messages in the function 'remove_unnecessary_cast_node'

"The downstream node of the second cast node should be graph output" (onnxconverter_common/float16.py:557)

I knew That message caused by None of Downstream node
I am trying to use the FP16 model as much as possible.
Is there any other method I can try?
Would using TensorRT instead of ONNX improve the situation?
thank you

@Macsim2 Macsim2 changed the title bug in converting fp32 to fp16 problem in converting fp32 to fp16 Nov 18, 2024
@LeoZDong
Copy link

Could you attach the model? I think this error is saying that you have a cast node with no downstream node, which might be unexpected

@Macsim2
Copy link
Author

Macsim2 commented Dec 26, 2024

@LeoZDong How can I attach the model? Can I just send the onnx file?
and also As a temporary solution, I solved it by changing from torch to float16.

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

No branches or pull requests

2 participants