-
Notifications
You must be signed in to change notification settings - Fork 691
Cortex_m backend: Fix add implementation #15100
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
- Call CMSIS-NN kernel with correct argument order and signs - Change python implementation to reflect CMSIS-NN behaviour - Fix scale calculations - Remove broken broadcasting support - Add pass to lower scalar version ops - Remove unused definitions/ implementations in operators.py, operators.yaml and op_quantized_add.cpp Note: arm_elementwise_add_s8 does not natively support broadcasting, so simply resizing the output tensor will not work. Enabling this in an efficient way is not stragiht forward, so avoid fusing these ops for now to avoid break graphs. Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: Id76db13848f2ce67d7527f40d31c06db663af8fa
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15100
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 7 New Failures, 4 Unrelated FailuresAs of commit 8b68170 with merge base 73f7286 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
output_multiplier, | ||
output_shift, | ||
out); | ||
|
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.
Should we the add an explicit shape check before running the add operation ?
If shapes do not match, return an error and log a clear message (e.g., "Input tensors must have the same shape for CMSIS-NN add operation. Broadcasting is not supported."). (or) something like that..
Note: arm_elementwise_add_s8 does not natively support broadcasting, so simply resizing the output tensor will not work. Enabling this in an efficient way is not straight forward, so avoid fusing these ops for now to avoid break graphs.
cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai