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

Add GPU Passthrough (Metal) for GitHub-hosted macOS runners #7085

Closed
3 of 11 tasks
Gustl22 opened this issue Feb 10, 2023 · 6 comments
Closed
3 of 11 tasks

Add GPU Passthrough (Metal) for GitHub-hosted macOS runners #7085

Gustl22 opened this issue Feb 10, 2023 · 6 comments

Comments

@Gustl22
Copy link

Gustl22 commented Feb 10, 2023

Tool name

Metal

Tool license

Proprietary

Add or update?

  • Add
  • Update

Desired version

3

Approximate size

No response

Brief description of tool

Some tools such as Flutter 3.7 need GPU (Metal) support in order to execute the UI tests.
CC: @Steve-Glass

Related:
#1779
#1779 (comment)
#2014
Nested virtualization: #183

Flutter removes OpenGL support: flutter/flutter#108304
According issue: flutter/flutter#118469 (comment)
Apple Silicon / M1 support: github/roadmap#528

URL for tool's homepage

https://developer.apple.com/metal/

Provide a basic test case to validate the tool's functionality.

name: test
jobs:
  macos:
    runs-on: macOS-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v3
      - uses: subosito/flutter-action@v2
        with:
          flutter-version: '3.7.0'
          channel: 'stable'
      - uses: bluefireteam/melos-action@main
      - name: setup-cocoapods
        uses: maxim-lobanov/setup-cocoapods@v1
        with:
          podfile-path: ./packages/audioplayers/example/macos/Podfile.lock

      - name: Run Flutter integration tests
        working-directory: ./packages/audioplayers/example
        run: |
          flutter test -d macos integration_test/app_test.dart

Platforms where you need the tool

  • Azure DevOps
  • GitHub Actions

Runner images where you need the tool

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Can this tool be installed during the build?

No this is a hardware or software restriction.

Tool installation time in runtime

No response

Are you willing to submit a PR?

I don't think I can solve this

@ddobranic
Copy link
Contributor

ddobranic commented Feb 10, 2023

hello @Gustl22, thank you for your request. unfortunately, according to comment we are not able to fulfill it at the moment.

@Gustl22
Copy link
Author

Gustl22 commented Feb 10, 2023

@ddobranic Yes I already linked that comment in the issue description, but it has been a while since then. There's always some way. The question is more the concrete why it's not technically possible and if it's worth the effort 😅
I created this due to #183 (comment)
Best regards :)

@mikhailkoliada
Copy link
Contributor

Hello! It is currently impossible due to runners' design, there is no any ETA on feature like this.

@Gustl22
Copy link
Author

Gustl22 commented Mar 3, 2023

@mikhailkoliada thank you! What do you mean by "impossible". As far as I'm aware the GPU on Apple Silicon chips is integrated. So it would only be a software limitation then. Would be helpful understanding, why something is not possible, instead of stating, that it is not possible. It's also fine to be a reason, that GH does not make any profit from it (maybe).

@Gustl22
Copy link
Author

Gustl22 commented Apr 20, 2023

@nebuk89 Do you also consider adding metal support in #2187, as GPU is shipped with the chip (?). Seems that other providers also manage to give access to the Metal GPU. Apple has discontinued support for OpenGL, thus developers need an alternative to test their apps:
flutter/flutter#120154 (comment)

@spyoungtech
Copy link

spyoungtech commented Jun 27, 2024

Hello! It is currently impossible due to runners' design, there is no any ETA on feature like this.

@mikhailkoliada would you mind elaborating on this?

I'm not sure what virtualization strategy MacOS runners use, but it may be helpful to know that VMware (since Sonoma) and Parallels (since Big Sur) now both support hardware acceleration via Metal, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants