-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
disable -fassociative-math (within -funsafe-math-optimizations) #12096
Conversation
dagar
commented
May 28, 2019
•
edited by AuterionWrikeBot
Loading
edited by AuterionWrikeBot
- includes ECL Battery voltage sensor problem with FMU 1.7 + IO 1.3 #601: Implemented Kahan summation algorithm for adding process noise
- Implemented Kahan summation algorithm for adding process noise PX4-ECL#601
@PX4/testflights could you give this one quick flight on a single platform with a comparison to current master? |
Questions
|
Note this also has the Kahan summation, so I expect the flight performance to be a little different, since the bias variance estimates will actually grow now unless there is data fused that reduces them. The CPU load will be particularly interesting to track. Note the places with big code size differences will probably also be the places with big performance differences - mostly stuff with matrix oeprations that can't have common calculations factored out or cancelled now. It depends if it is in a hot loop or not. There are also some risks, for example the optimization would save us from 0/0 situations since the variables would be cancelled. We'll have to keep an eye out for this. |
SITL testing works fine for me, no noticeable changes. |
I would merge Kahan summation first, then evaluate the math flags separately. |
The issue is that the Kahan summation is optimized out by the math flags, so is 'implicitly disabled' unless we do workarounds in the ECL. |
I'm aware, but I would do that locally first. |
Tested on Pixhawk 4mini v5Modes Tested
Procedure Notes Logs |
Unexpectedly the cpu usage actually decreased slightly. Master - https://review.px4.io/plot_app?log=9cb9ecae-bdf7-49aa-968e-6c523a153220 PR 12096 - https://review.px4.io/plot_app?log=16427fc8-4db8-4f08-a525-895c51298e3f |
Tested on Pixhawk 4 v5 Notes: In Acro mode, while flying, it does not feel like full acro mode. https://review.px4.io/plot_app?log=5f79e673-f4f3-41e3-a1c1-da3205ca4437 flight card Tested on Pixhawk1 v3 fixed wing Position Mode: no issue log: |
@PX4/testflights please exhaustively test this across all vehicles. |
Tested on PixRacer V4:Modes Tested Position Mode: Good. - Procedure Logs - PR 12096 Log Comparison to Master: Tested on PixRacer V4:Modes Tested: Procedure: Notes: In Acro mode, while flying, it does not feel like full acro mode. Log: Tested on Pixhawk 2 Cube V3:Modes Tested Position Mode: Good. - Procedure Logs Log Comparison to Master: Tested on Pixhawk 2 Cube V3: Modes Tested: Procedure: Notes: In Acro mode, while flying, it does not feel like full acro mode. Log: |
Tested on Pixhawk 4 mini v5Modes Tested
Procedure
Notes
Logs Tested on Pixhawk Pro v4Modes Tested
Procedure
Notes
Logs
Tested on NXP FMUK66 v3Modes Tested
Procedure Notes Logs |
This is looking good so far. New plan, I'll update the PR to bring in only the optimization flag changes, which will then put PX4/PX4-ECL#601 in a position where they can bring in the change when @priseborough is ready. |
Tested on PixRacer V4:Flight Card 1 Modes Tested: Procedure: Notes: Flight Card 2 Modes Tested Procedure Note: Flight Card 3 Modes Tested Procedure Note: Logs: Flight card 1: https://review.px4.io/plot_app?log=63ea5b4e-d8df-49cf-a25b-ad5495395a76 Flight card 2: https://review.px4.io/plot_app?log=7c6f8293-2489-4784-8823-df034c5d17a2 Flight card 3: https://review.px4.io/plot_app?log=e195ddd3-b27b-4d66-a010-1759d23809cf Tested on Pixhawk 2 Cube V3:Note: Lowered MPC_THR_MIN parameter from 12 to 11, no difference was seen due to wind not being strong enough for the paused landing issue to be reproduced. We will keep testing and trying to reproduce the issue. Logs Flight card 1: https://review.px4.io/plot_app?log=b8bce6d8-9e85-4ab3-915d-3169a818e967 Flight card 2: https://review.px4.io/plot_app?log=4de0f92b-5efc-47bf-a3c7-26df2b97e677 Flight card 3: https://review.px4.io/plot_app?log=bb4a041f-3118-4180-9859-e967b60527e8 |
Tested on Pixhawk Pro v4Flight Card 1 Modes Tested:
Procedure: Notes: Flight Card 2 Modes Tested
Procedure Note: Flight Card 3 Modes Tested
Procedure Note: Flight Card 4 Modes Tested
Procedure Note: Logs:
Tested on Pixhawk 4 mini v5Flight Card 1 Modes Tested:
Procedure: Notes: Flight Card 2 Modes Tested
Procedure Note: Flight Card 3 Modes Tested
Procedure Note: Flight Card 4 Modes Tested
Procedure Note: Logs:
|
Tested on Pixhawk 4 mini v5 v-tol convergence Modes Tested: Position Mode: perfect mission mode: perfect |
@PX4/testflights can you do another acro test with the latest build? The Kahan stuff has been removed, I want to see if that fixes the feeling of stabilization when exactly horizontal in acro. It needs to be compared to master to see if it feels different. |
Tested on Pixhawk pro V4: Modes tested: Acro mode Notes: In Acro mode, while flying, it still does not feel like full acro mode. In rotation, the vehicle hesitates when passing through its level upright position in what seems like an attempt to stabilize. Same behavior as before noted, no improvements noted. PR Acro mode test log: Master test log: Tested on Pixhawk4 mini v5 Notes: In Acro mode, while flying, it feels much better than before, but still it does not feel like full acro mode. You can still note slight assistance to attempt to stabilize. It definitely improved, noted lock-in when rotating. PR Acro mode test log: Master test log: |
@dannyfpv please enable Airmode and let me know if it still feels off. The rate tracking is also not great on the log I see. Can you tune it? Make sure to increase the I gains. |
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.
Based on the comparison of the logs between master and this PR I don't think there are any issues specifically caused by removing this optimization.