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

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Mar 30, 2023

From bisecting through the shader performance, i've determined something odd which is that both the vector operations in IPHalfSampleDecal and the conversion of the input texture coordinates to half precision led to the regressed performance. No other changes cause a performance regression, at least locally - and should be safe to reland so that we can get the benefits of reduced CPU usage. I will update this with local benchmark numbers shortly.

BEFORE

{
  "success": true,
  "data": {
    "average_frame_build_time_millis": 0.27609999999999996,
    "90th_percentile_frame_build_time_millis": 0.341,
    "99th_percentile_frame_build_time_millis": 0.435,
    "worst_frame_build_time_millis": 0.435,
    "missed_frame_build_budget_count": 0,
    "average_frame_rasterizer_time_millis": 250.66653846153844,
    "90th_percentile_frame_rasterizer_time_millis": 251.383,
    "99th_percentile_frame_rasterizer_time_millis": 252.709,
    "worst_frame_rasterizer_time_millis": 252.709,
    "missed_frame_rasterizer_budget_count": 39,
    "frame_count": 40,
    "frame_rasterizer_count": 39,
    "new_gen_gc_count": 0,
    "old_gen_gc_count": 0,
    "average_vsync_transitions_missed": 16.075949367088608,
    "90th_percentile_vsync_transitions_missed": 16.0,
    "99th_percentile_vsync_transitions_missed": 17.0,
    "average_vsync_frame_lag": 0.0,
    "90th_percentile_vsync_frame_lag": 0.0,
    "99th_percentile_vsync_frame_lag": 0.0,
    "average_layer_cache_count": 0.0,
    "90th_percentile_layer_cache_count": 0.0,
    "99th_percentile_layer_cache_count": 0.0,
    "worst_layer_cache_count": 0.0,
    "average_layer_cache_memory": 0.0,
    "90th_percentile_layer_cache_memory": 0.0,
    "99th_percentile_layer_cache_memory": 0.0,
    "worst_layer_cache_memory": 0.0,
    "average_picture_cache_count": 0.0,
    "90th_percentile_picture_cache_count": 0.0,
    "99th_percentile_picture_cache_count": 0.0,
    "worst_picture_cache_count": 0.0,
    "average_picture_cache_memory": 0.0,
    "90th_percentile_picture_cache_memory": 0.0,
    "99th_percentile_picture_cache_memory": 0.0,
    "worst_picture_cache_memory": 0.0,
    "total_ui_gc_time": 0.0,
    "30hz_frame_percentage": 0.0,
    "60hz_frame_percentage": 100.0,
    "80hz_frame_percentage": 0.0,
    "90hz_frame_percentage": 0.0,
    "120hz_frame_percentage": 0.0,
    "illegal_refresh_rate_frame_count": 0,
    "average_cpu_usage": 69.94081630612244,
    "90th_percentile_cpu_usage": 72.5,
    "99th_percentile_cpu_usage": 75.4,
    "average_gpu_usage": 100.0,
    "90th_percentile_gpu_usage": 100.0,
    "99th_percentile_gpu_usage": 100.0,
    "average_memory_usage": 100.2139668367347,
    "90th_percentile_memory_usage": 103.59375,
    "99th_percentile_memory_usage": 104.171875
  },

AFTER

  "success": true,
  "data": {
    "average_frame_build_time_millis": 0.30504999999999993,
    "90th_percentile_frame_build_time_millis": 0.402,
    "99th_percentile_frame_build_time_millis": 0.442,
    "worst_frame_build_time_millis": 0.442,
    "missed_frame_build_budget_count": 0,
    "average_frame_rasterizer_time_millis": 250.5412820512821,
    "90th_percentile_frame_rasterizer_time_millis": 251.221,
    "99th_percentile_frame_rasterizer_time_millis": 251.948,
    "worst_frame_rasterizer_time_millis": 251.948,
    "missed_frame_rasterizer_budget_count": 39,
    "frame_count": 40,
    "frame_rasterizer_count": 39,
    "new_gen_gc_count": 0,
    "old_gen_gc_count": 0,
    "average_vsync_transitions_missed": 16.050632911392405,
    "90th_percentile_vsync_transitions_missed": 16.0,
    "99th_percentile_vsync_transitions_missed": 17.0,
    "average_vsync_frame_lag": 0.0,
    "90th_percentile_vsync_frame_lag": 0.0,
    "99th_percentile_vsync_frame_lag": 0.0,
    "average_layer_cache_count": 0.0,
    "90th_percentile_layer_cache_count": 0.0,
    "99th_percentile_layer_cache_count": 0.0,
    "worst_layer_cache_count": 0.0,
    "average_layer_cache_memory": 0.0,
    "90th_percentile_layer_cache_memory": 0.0,
    "99th_percentile_layer_cache_memory": 0.0,
    "worst_layer_cache_memory": 0.0,
    "average_picture_cache_count": 0.0,
    "90th_percentile_picture_cache_count": 0.0,
    "99th_percentile_picture_cache_count": 0.0,
    "worst_picture_cache_count": 0.0,
    "average_picture_cache_memory": 0.0,
    "90th_percentile_picture_cache_memory": 0.0,
    "99th_percentile_picture_cache_memory": 0.0,
    "worst_picture_cache_memory": 0.0,
    "total_ui_gc_time": 0.0,
    "30hz_frame_percentage": 0.0,
    "60hz_frame_percentage": 100.0,
    "80hz_frame_percentage": 0.0,
    "90hz_frame_percentage": 0.0,
    "120hz_frame_percentage": 0.0,
    "illegal_refresh_rate_frame_count": 0,
    "average_cpu_usage": 70.76600016000002,
    "90th_percentile_cpu_usage": 72.400001,
    "99th_percentile_cpu_usage": 74.099999,
    "average_gpu_usage": 100.0,
    "90th_percentile_gpu_usage": 100.0,
    "99th_percentile_gpu_usage": 100.0,
    "average_memory_usage": 100.56187499999999,
    "90th_percentile_memory_usage": 103.23437499999997,
    "99th_percentile_memory_usage": 104.67187499999997
  },

@chinmaygarde chinmaygarde changed the title [Impeller] migrate gaussian blur to half precision [Impeller] migrate gaussian blur to half precision. Mar 30, 2023
jonahwilliams added 2 commits March 30, 2023 17:45
@chinmaygarde chinmaygarde changed the title [Impeller] migrate gaussian blur to half precision. [Impeller] Migrate gaussian blur to half precision. Mar 31, 2023
@jonahwilliams jonahwilliams marked this pull request as ready for review March 31, 2023 21:52
Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

Sorry, I've got the Friday afternoon brain fog. Could you spell out the conclusion from the before/after data?

Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm w/ above question.

I guess the effects of this will show up in the new blur benchmark?

@jonahwilliams
Copy link
Contributor Author

I would not expect to see a significant difference except in power consumption. This change is the same as previous one, but it retains high precision in the input texture coordinates.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 1, 2023
@auto-submit auto-submit bot merged commit c56d5fb into flutter:main Apr 1, 2023
@jonahwilliams jonahwilliams deleted the gaussian_perf_2 branch April 1, 2023 00:54
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2023
zanderso pushed a commit to flutter/flutter that referenced this pull request Apr 1, 2023
…23924)

Manual roll requested by zra@google.com

flutter/engine@b2855e0...a48eedb

2023-04-01 zanderso@users.noreply.github.com Revert "[web] Move text
editing nodes outside of shadowDOM" (flutter/engine#40847)
2023-04-01 skia-flutter-autoroll@skia.org Roll Skia from 4d1e9cabf0c8 to
9973ef180f1f (2 revisions) (flutter/engine#40843)
2023-04-01 skia-flutter-autoroll@skia.org Roll Dart SDK from
6ac8d3ad105f to 7e36e11608f3 (6 revisions) (flutter/engine#40842)
2023-04-01 jonahwilliams@google.com [Impeller] take advantage of native
decal sampling, blend cleanups (flutter/engine#40839)
2023-04-01 yjbanov@google.com Revert "[web] use callConstructor for
FinalizationRegistry due to bug… (flutter/engine#40841)
2023-04-01 zanderso@users.noreply.github.com Revert "Add ui_web to
embedder.yaml so that the analyzer knows about it."
(flutter/engine#40840)
2023-04-01 jonahwilliams@google.com [Impeller] Migrate gaussian blur to
half precision. (flutter/engine#40800)
2023-03-31 skia-flutter-autoroll@skia.org Roll Skia from 33f80c07a09c to
4d1e9cabf0c8 (3 revisions) (flutter/engine#40836)
2023-03-31 110993981+htoor3@users.noreply.github.com [web] Move text
editing nodes outside of shadowDOM (flutter/engine#39688)
2023-03-31 mdebbar@google.com [web] Fix canvasKitVariant test
(flutter/engine#40833)
2023-03-31 yjbanov@google.com [web] use callConstructor for
FinalizationRegistry due to bug in dart2js (flutter/engine#40798)
2023-03-31 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from
kiAbXJ_MIn6CAC9-C... to f16HBH4MJdaKy7Hlf... (flutter/engine#40831)
2023-03-31 godofredoc@google.com Remove ios-release-nobitcode from
engine v2 builders. (flutter/engine#40830)
2023-03-31 jacksongardner@google.com Add ui_web to embedder.yaml so that
the analyzer knows about it. (flutter/engine#40827)
2023-03-31 skia-flutter-autoroll@skia.org Roll Skia from 2b86c6d364d0 to
33f80c07a09c (1 revision) (flutter/engine#40826)

Also rolling transitive DEPS:
  fuchsia/sdk/core/mac-amd64 from kiAbXJ_MIn6C to f16HBH4MJdaK

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 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
exaby73 pushed a commit to NevercodeHQ/flutter that referenced this pull request Apr 17, 2023
…utter#123924)

Manual roll requested by zra@google.com

flutter/engine@b2855e0...a48eedb

2023-04-01 zanderso@users.noreply.github.com Revert "[web] Move text
editing nodes outside of shadowDOM" (flutter/engine#40847)
2023-04-01 skia-flutter-autoroll@skia.org Roll Skia from 4d1e9cabf0c8 to
9973ef180f1f (2 revisions) (flutter/engine#40843)
2023-04-01 skia-flutter-autoroll@skia.org Roll Dart SDK from
6ac8d3ad105f to 7e36e11608f3 (6 revisions) (flutter/engine#40842)
2023-04-01 jonahwilliams@google.com [Impeller] take advantage of native
decal sampling, blend cleanups (flutter/engine#40839)
2023-04-01 yjbanov@google.com Revert "[web] use callConstructor for
FinalizationRegistry due to bug… (flutter/engine#40841)
2023-04-01 zanderso@users.noreply.github.com Revert "Add ui_web to
embedder.yaml so that the analyzer knows about it."
(flutter/engine#40840)
2023-04-01 jonahwilliams@google.com [Impeller] Migrate gaussian blur to
half precision. (flutter/engine#40800)
2023-03-31 skia-flutter-autoroll@skia.org Roll Skia from 33f80c07a09c to
4d1e9cabf0c8 (3 revisions) (flutter/engine#40836)
2023-03-31 110993981+htoor3@users.noreply.github.com [web] Move text
editing nodes outside of shadowDOM (flutter/engine#39688)
2023-03-31 mdebbar@google.com [web] Fix canvasKitVariant test
(flutter/engine#40833)
2023-03-31 yjbanov@google.com [web] use callConstructor for
FinalizationRegistry due to bug in dart2js (flutter/engine#40798)
2023-03-31 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from
kiAbXJ_MIn6CAC9-C... to f16HBH4MJdaKy7Hlf... (flutter/engine#40831)
2023-03-31 godofredoc@google.com Remove ios-release-nobitcode from
engine v2 builders. (flutter/engine#40830)
2023-03-31 jacksongardner@google.com Add ui_web to embedder.yaml so that
the analyzer knows about it. (flutter/engine#40827)
2023-03-31 skia-flutter-autoroll@skia.org Roll Skia from 2b86c6d364d0 to
33f80c07a09c (1 revision) (flutter/engine#40826)

Also rolling transitive DEPS:
  fuchsia/sdk/core/mac-amd64 from kiAbXJ_MIn6C to f16HBH4MJdaK

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 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants