Skip to content

Wire up Metal shader precompilation from offline training runs. #79298

Closed
flutter-team-archive/engine
#25644

Description

@chinmaygarde

Now that https://bugs.chromium.org/p/skia/issues/detail?id=11392 has landed and been rolled in, preparation of Metal pipelines from harvested SKPs can be implemented. This is a tracking bug to make sure lifecycle and threading implications of the attempt at engine launch are reasoned about before enabling this on all renderer launch attempts.

Activity

  1. added
    engineflutter/engine related. See also e: labels.
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    on Mar 29, 2021
  2. self-assigned this
    on Mar 29, 2021
  3. chinmaygarde commented on Apr 6, 2021

    @chinmaygarde
    ContributorAuthor

    The precompilation of harvested SKSL's has been wired up. Working on testing and benchmarking this in the host harness.

  4. acoutts commented on Apr 20, 2021

    @acoutts

    Is this available in master to try now?

  5. CavalcanteLeo commented on Apr 20, 2021

    @CavalcanteLeo

    will this fix iOS shader jank issue? (using metal)

  6. acoutts commented on Apr 20, 2021

    @acoutts

    will this fix iOS shader jank issue?

    See the guide here on how to utilize it: https://flutter.dev/docs/perf/rendering/shader#how-to-use-sksl-warmup
    This should let you significantly reduce it.

  7. zaidkazi commented on Apr 20, 2021

    @zaidkazi

    I thought that tutorial doeisnt work on metal @acoutts

  8. 69 remaining items

  9. zanderso commented on Jun 2, 2021

    @zanderso
    Member

    @SM2DevLLC Bundling multiple SkSLs is not yet implemented. Please give a thumbs-up to #73098 to indicate your interest in that feature.

  10. jnovak-SM2Dev commented on Jun 2, 2021

    @jnovak-SM2Dev

    @zanderso Oh ok. So I can't really do iPad and iPhone since they would need to be in the same file, so i'd need to pick one for now to build for release?

  11. b3nni97 commented on Jun 4, 2021

    @b3nni97

    I have the problem that I publish my app via Xcode and how can I attach the sksl file there? If I go via Xcode -> Product -> Archive then I can't set anything else there.

  12. alectogeek commented on Jun 5, 2021

    @alectogeek

    I have the problem that I publish my app via Xcode and how can I attach the sksl file there? If I go via Xcode -> Product -> Archive then I can't set anything else there.

    @b3nni97 you don't have to attach the sksl file manually. It is enough to use flutter build ios --bundle-sksl-path your-file-name.sksl.json to build an app and after that, you can archive and publish via xCode

  13. armandojimenez commented on Jun 5, 2021

    @armandojimenez

    Tried it on my app, it really reduce jank (Not all, there still jank, I know is jank because it dissapear after third open)... but, now my app takes more than 10 secs on the splash screen, and sometime when I restart the phone, it can take more thank 30 sec. Only happens on first app install, and when I restart the phone. On a iPhone 11 Pro Max

  14. armandojimenez commented on Jun 6, 2021

    @armandojimenez

    Question, when I do the warm process, Do i only need to trigger the animation with jank only one time? or do I need to run it mutiple times until it runs smooth? does it affect at all the size of the .json and app start time?

  15. m-j-g commented on Jun 16, 2021

    @m-j-g

    I'm having a hard time tracking where this is committed. Is there a version number that has this implemented? Trying to stay on top of this so that I'm aware when it makes it to beta/stable

  16. matehat commented on Jun 18, 2021

    @matehat

    Same here, is there a way to know when we can get out of the dev channel while keeping Metal shader caching?

  17. zanderso commented on Jun 21, 2021

    @zanderso
    Member

    @m-j-g @matehat This will be on beta channel in version 2.3, which I believe should be out soon.

  18. scorpion-orion commented on Jul 13, 2021

    @scorpion-orion

    I followed the instructions on https://flutter.dev/docs/perf/rendering/shader#how-to-use-sksl-warmup but when I press M on the command line nothing happen, no file or folder created. Can someone hep me? Thank you.

    On a Mac, you need to use Shift + m. Yeah who would have thought M means Shift + m? Probably only me. Kind of silly when the command line literally needs the capital M instead of just m. Flutter team as a whole is really awesome! But sometimes I find the new guy coming in and can't code the command line properly. There's nothing in the command line output that says press Shift + m.

    Also one more thing, we have flutter build ios --release --bundle-sksl-path but why didn't they also make flutter run --release --bundle-sksl-path too, just to make our lives less miserable so that we won't need to archive into ipa, sign with adhoc and then manually deploy to the device. To make it more head spinning, flutter run --release --no-build actually ignores the --no-build flag and rebuilds anyway. I mean, whoever writes this command line tool seriously needs to sit down and reflect what's going on since 2019 until now 2021.

  19. joshbenaron commented on Jul 16, 2021

    @joshbenaron

    @m-j-g @matehat This will be on beta channel in version 2.3, which I believe should be out soon.

    Is it on stable yet?

  20. github-actions commented on Jul 30, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  21. locked as resolved and limited conversation to collaborators on Jul 30, 2021
  22. added
    P0Critical issues such as a build break or regression
    and removed on Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressionc: performanceRelates to speed or footprint issues (see "perf:" labels)c: renderingUI glitches reported at the engine/skia or impeller rendering levelengineflutter/engine related. See also e: labels.waiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions