-
Notifications
You must be signed in to change notification settings - Fork 6k
Vectorize rrect_blur #55576
Vectorize rrect_blur #55576
Conversation
Really curious to see the malioc diff. |
Here's one from before my last (and final) vectorization: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8735240889996581441/+/u/test:_malioc_diff/stdout |
One thing that is unfortunate is that it seems to falling into "stack spilling". I would have expected less or equal register usage. It possibly could be faster if we could avoid that. |
The stack spills are concerning. And thats happening on Mali-T880 which is our low-end representative. Perhaps this makes things faster all the way till we run out of stack space. It's faster on iOS because there are likely no spills. |
Or there is spilling on iOS too but the savings from the vectorization are larger than the load/store calls. I could try to reuse variables more to see if that reduces register pressure but I can't run malioc locally. Do we have an easy way to do that? I have it installed locally but it doesn't handle includes and doesn't seem to have an argument to make them work.
|
For mali-t880 longest/shortest path, (14.85 + 9.0) < (25.74 + 1.0) so it still seems like a net positive. |
If you have malioc installed locally, then it should be possible to just run the same script the bots are running to generate the diff. If malioc not in your path perhaps? |
So I'd be careful with vectorization. Most GPUs are SIMT now, and so despite data types being vec4 based all of the math ops are still scalar.
This is correct, a stack spill is absolutely catastrophic for performance. |
I would like to spend some time verifying the reported performance numbers. I had previously investigate this and on iOS found that it was net negative. |
I got rid of the stack spill by reusing the integral variable:
|
Numbers check out locally for me. Good to hear that you got rid of the stack spill! LGTM |
Awesome. I have no concerns past that. Seems like Jonah had some prior experience not seeing expected results with vectorization so get a +1 from him as well. |
Nevermind 🙂 |
auto label is removed for flutter/engine/55576, due to - The status or check suite Linux linux_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label. |
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. |
The error was introduced in 56a32c7 when i tried to avoid the stack spilling. Let me double check that diff. |
This reverts commit 56a32c7. fixed stack spilling change
fixed, I got my swizzles swizzled |
…156144) flutter/engine@bd44b58...247bc68 2024-10-03 skia-flutter-autoroll@skia.org Roll Dart SDK from 8b45ba3fdbfa to 1c2e6ad84af1 (1 revision) (flutter/engine#55610) 2024-10-03 skia-flutter-autoroll@skia.org Roll Skia from f074e2bd0aba to 68fea8aa589b (1 revision) (flutter/engine#55609) 2024-10-03 skia-flutter-autoroll@skia.org Roll Skia from df2e478e9f8d to f074e2bd0aba (1 revision) (flutter/engine#55608) 2024-10-03 skia-flutter-autoroll@skia.org Roll Skia from ba95ec201dfd to df2e478e9f8d (2 revisions) (flutter/engine#55607) 2024-10-03 skia-flutter-autoroll@skia.org Roll Dart SDK from 14b931c40076 to 8b45ba3fdbfa (1 revision) (flutter/engine#55606) 2024-10-03 skia-flutter-autoroll@skia.org Roll Skia from 03431ca9d337 to ba95ec201dfd (3 revisions) (flutter/engine#55599) 2024-10-03 30870216+gaaclarke@users.noreply.github.com Vectorize rrect_blur (flutter/engine#55576) 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 matanl@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
issue: flutter#148496 28% speed improvement in the rrect_blur shader. ## before <img width="1728" alt="Screenshot 2024-10-01 at 3 45 46�PM" src="https://github.com/user-attachments/assets/643068a5-ab1e-4fa3-bc03-184b2ee4a6cf"> ## after <img width="1728" alt="Screenshot 2024-10-01 at 3 42 30�PM" src="https://github.com/user-attachments/assets/41445231-ffea-4279-8142-ce126df8187c"> [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
issue: flutter/flutter#148496
28% speed improvement in the rrect_blur shader.
before
after
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.