-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
apps: microtvm: Disable CONFIG_FPU
for Zephyr runtime
#8055
Conversation
@microbuilder Hi Kevin. Thanks a lot for addressing those annoying warnings related to
I hope CI will catch it too, but it can take a while to do so, hence I'm sharing it here with you. You can reproduce it with locally by running, for instance: So, even if that works, I'm wondering how to disable it for the MPS2 board only, since CONFIG_FPU=y will be enabled by default anyway for all the boards, and apparently CONFIG_FPU=n is not enough to disable (override) it per board? |
@gromero I tested this on microtvm reference virtual machine with mps2_an521 platform and it was fine. |
I tested this with |
@microbuilder @mehrdadh Hi folks, sorry for the delay on reviewing it. @mehrdadh thanks for the additional checks! I figured out why the link error pasted above happened on my local environment but not on the CI. It happens that the CI is using Zephyr SDK 0.12 whilst I was using Zephyr SDK 0.11 and the following Zephyr SDK fix is only in 0.12:
hence the soft-float functions were not present in my environment, causing the linking errors when the patch in question is applied. That, on the other hand, exposed the fact that
but are included (and used) in the .elf image when the patch is applied (for
This seems expected because although Thus one might think it was just a matter of enabling
However although the build will finish ok the following error will be caught by the CI when testing against models that rely on floating point operations:
This happens because microTVM-Zephyr build system ends up linking mixed objects, i.e. objects built with soft-float and without soft-float functions. This bug was recently fixed by PR #8230, which now allows to set Kevin, since Zephyr defaults regarding CONFIG_FPU might not be what microTVM needs (which is ok) I think we need to enabled FPU per board, for each board (@areusch and @mehrdadh are you ok with that?) So could you please update your patch? It also needs to be rebased since
For the records, the "best-case scenario warning" about conflicts during builds mentioned by Kevin in his original commit message is the one that currently happens on the CI, i.e. [0]:
|
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.
Kevin, please see my review comments in the previous comment (about rebasing, addressing AOT app too, and enabling CONFIG_FPU
per board for each board. Thank you!
@microbuilder friendly ping :) |
@microbuilder please address @gromero's comment and rebase the PR |
522e8ab
to
67f358e
Compare
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.
LGTM!
@microbuilder thanks for this change.
@microbuilder Thanks! There is only a nit, a typo in the commit message that I'd like to get it fixed: |
`CONFIG_FPU` was being enabled by default for every platform, regardless of whether or not the platform using the sample app actually had a HW FPU unit. As a result, FPU instructions may be included on platforms that aren't able to support them, or in a best-case scenario we will get a warning about the conflict during builds, which pollutes the CI output, in a worst-case scenario a fault. This change removes the `CONFIG_FPU=y` setting from being set at the application level, since this flag should be set at the chip level for any platform that has an FPU. Signed-off-by: Kevin Townsend <[email protected]>
@microbuilder Thanks! LGTM! |
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.
thanks @microbuilder !
`CONFIG_FPU` was being enabled by default for every platform, regardless of whether or not the platform using the sample app actually had a HW FPU unit. As a result, FPU instructions may be included on platforms that aren't able to support them, or in a best-case scenario we will get a warning about the conflict during builds, which pollutes the CI output, in a worst-case scenario a fault. This change removes the `CONFIG_FPU=y` setting from being set at the application level, since this flag should be set at the chip level for any platform that has an FPU. Signed-off-by: Kevin Townsend <[email protected]>
`CONFIG_FPU` was being enabled by default for every platform, regardless of whether or not the platform using the sample app actually had a HW FPU unit. As a result, FPU instructions may be included on platforms that aren't able to support them, or in a best-case scenario we will get a warning about the conflict during builds, which pollutes the CI output, in a worst-case scenario a fault. This change removes the `CONFIG_FPU=y` setting from being set at the application level, since this flag should be set at the chip level for any platform that has an FPU. Signed-off-by: Kevin Townsend <[email protected]>
CONFIG_FPU
was being enabled by default for every platform,regardless of whether or not the platform using the sample app actually
had a HW FPU unit. As a result, FPU instructions may be included on
platforms that aren't able to support them, or in a best-case scenario
we will get a warning about the confllct during builds, which pollutes
the CI output, in a worst-case scenario a fault.
This change removes the
CONFIG_FPU=y
setting from being set at theapplication level, since this flag should be set at the chip level for
any platform that has an FPU.
Signed-off-by: Kevin Townsend [email protected]