-
Notifications
You must be signed in to change notification settings - Fork 57
[CVS-172796] fix bfloat16 conversion when single cast node to bfloat16 #841
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
base: ovep-develop
Are you sure you want to change the base?
Conversation
…use original bf16 outputs tensor
…ansform for OV CPU
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.
Limited the condition of bfloat16 conversion to trigger only on GPU and NPU, since CPU has some sort of reference implementation.
Looks good to me, thanks.
|
@bopeng1234 . This simply ignores BF16-> FP16 for CPU. Why is this conversion needed for GPU and NPU? |
@mklimenk , can you help to clarify on it? |
|
As we discussed, removing the bfloat16 model conversion branch. |
|
@bopeng1234, please modify the onnxruntime/core/providers/openvino/ov_versions/data_ops.cc file as well to remove the bfloat16 handling there. You can refer to the original PR to see what's required |
|
Sure, revert the changes of #741 |
Description
Disable bfloat16 model conversion when the graph's node size <=1.
Motivation and Context
CVS-172796
bfloat16_fix::Transform made changes to the bfloat16 output model, changed the output type to float16.
When single node test, cast_op_test.cc, it only has one node "Cast", the output is changed to float16 by the transformation, but testcase still use it as bfloat16 tensor, which will cause a mismatch;
May need to disable the transformation when unit test runs. OR. Add a cast node before BF16 output node.
This PR
revert the changes of #741, remove the bfloat16 model transformation