Skip to content
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

Enable _Float16 "half-float" Functionality Only When Available. #49851

Merged

Conversation

johnoneil
Copy link
Contributor

Description:

We're cross-compiling impeller for Android, but x86 Android targets don't have half float (_Float16) _ support. This change disables half float support in impeller/geometry/half.h for platforms where the _Float16 builtin is lacking.

As can be seen in half.h, Float16 support is enabled for all non-windows platforms, which doesn't not allow our use case.

Issues

I can't seem to find a way to file an issue describing this, but

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • [] I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@jonahwilliams
Copy link
Member

We actually only use the half types on iOS and macOS platforms, everywhere else we end up using floats for compatibility reasons. You could ifdef out the Half precision support for non-apple platforms, but you'd also need to turn off the tests in the non-apple configurations as well.

@johnoneil
Copy link
Contributor Author

You could ifdef out the Half precision support for non-apple platforms

Thanks for this Jonah. I'll take that approach. Will update this in a few hours.

@johnoneil johnoneil force-pushed the wb/johnoneil/platform-half-float-support branch from 3c00aa1 to f2e4ba5 Compare January 22, 2024 21:03
@johnoneil johnoneil marked this pull request as draft January 22, 2024 21:16
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

@jonahwilliams
Copy link
Member

@johnoneil johnoneil force-pushed the wb/johnoneil/platform-half-float-support branch from f2e4ba5 to 8483da1 Compare January 22, 2024 22:07
@johnoneil johnoneil force-pushed the wb/johnoneil/platform-half-float-support branch from 8483da1 to 7a3d111 Compare January 22, 2024 22:33
@johnoneil johnoneil marked this pull request as ready for review January 29, 2024 23:28
@johnoneil
Copy link
Contributor Author

Updated PR to green.
If there's anything further you'd like on this just let me know.

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2024
Copy link
Contributor

auto-submit bot commented Jan 29, 2024

auto label is removed for flutter/engine/49851, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2024
@auto-submit auto-submit bot merged commit df5f1af into flutter:main Jan 29, 2024
30 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 30, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 30, 2024
…142501)

flutter/engine@65bf8b1...df5f1af

2024-01-29 johnoneil@users.noreply.github.com Enable `_Float16` "half-float" Functionality Only When Available. (flutter/engine#49851)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants