Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented May 23, 2024

issue: flutter/flutter#148496

The linked issue showed us as ALU bound with the linear gradient, this should relieve some of that pressure.

Tests: There is already existing golden tests for this, this just changed the performance, no new functionality.

summary of math improvements:

  • (num_colors - 1) * division -> multiplication
  • (num_colors - 1) * subtractions removed
  • removes 1 dot()
  • 1 division -> multiplication
  • 1 subtraction removed

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.

@gaaclarke gaaclarke marked this pull request as ready for review May 23, 2024 22:38
@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.

@gaaclarke
Copy link
Member Author

I ran out of time today, I'll try to profile this tomorrow to get a sense of what kind of difference this makes.

@gaaclarke
Copy link
Member Author

Malioc diff:

In variant Main:
  fp16_arithmetic: 35 <- before
  fp16_arithmetic: 37 <- after
total_cycles in variant Main
        arith_total arith_fma   arith_cvt   arith_sfu   load_store  varying     texture     bound       
before  0.750000    0.421875    0.750000    0.625000    4.000000    0.250000    0.000000    load_store
after   0.718750    0.406250    0.718750    0.562500    4.000000    0.250000    0.000000    load_store

In variant Main:
  work_registers_used: 17 <- before
  work_registers_used: 21 <- after

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #53007 at sha 9eeb55d

Copy link
Contributor

@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.

Fuck yeah, optimizations!

LGTM

@gaaclarke
Copy link
Member Author

Here's a rough estimate of the difference on my iphone se 2022. These are singleton datapoints so your mileage may vary.

before

Screenshot 2024-05-24 at 9 56 21 AM

after

Screenshot 2024-05-24 at 10 09 22 AM

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label May 24, 2024
@auto-submit auto-submit bot merged commit c4d47d5 into flutter:main May 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 24, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 25, 2024
…149057)

flutter/engine@b5e98f9...f693fdd

2024-05-24 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Fix overlay reorganization for edge case with only 1 overlay (flutter/engine#53006)
2024-05-24 skia-flutter-autoroll@skia.org Roll Dart SDK from 49b226cecee7 to 4ef8ed68a8d4 (1 revision) (flutter/engine#53024)
2024-05-24 skia-flutter-autoroll@skia.org Roll Skia from f832549400ab to 97783ac3000d (1 revision) (flutter/engine#53023)
2024-05-24 30870216+gaaclarke@users.noreply.github.com [Impeller] sped up the linear gradient by moving calculations to the cpu (flutter/engine#53007)

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 jonahwilliams@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
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request May 31, 2024
…lutter#149057)

flutter/engine@b5e98f9...f693fdd

2024-05-24 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Fix overlay reorganization for edge case with only 1 overlay (flutter/engine#53006)
2024-05-24 skia-flutter-autoroll@skia.org Roll Dart SDK from 49b226cecee7 to 4ef8ed68a8d4 (1 revision) (flutter/engine#53024)
2024-05-24 skia-flutter-autoroll@skia.org Roll Skia from f832549400ab to 97783ac3000d (1 revision) (flutter/engine#53023)
2024-05-24 30870216+gaaclarke@users.noreply.github.com [Impeller] sped up the linear gradient by moving calculations to the cpu (flutter/engine#53007)

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 jonahwilliams@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller will affect goldens
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants