-
Notifications
You must be signed in to change notification settings - Fork 614
[Tosa] : Use output type for bias for creating tosa.conv #4252
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: main
Are you sure you want to change the base?
Conversation
The nightly build failures are unrelated and seems to be failing for all recent CIs. @sjarus, please let me know if there's any concern with merging this change after approval. Thanks! |
Converting to draft as I found some other failures when trying different integer type inputs, will look into those failures and possible add fixes in this same PR. |
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.
Nice catch, thanks @sahas3 !
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.
This is quite extensive in terms of introducing new capability around quantized type coverage. Thanks so much.
Thank you, appreciate the kind words. |
For ConvolutionLayer initialized without bias, a zero tensor for bias is created when converting to
tosa.conv2d
as the op always expects a bias tensor. This zero tensor was always initialized to befp32
irrespective of what the input/weights type were. This leads to a validation error sincebias
type (fp32) didn't match with output of conv (fp16) when the input/weight are offp16
type.