cogentcore / webgpu

Cross-platform Go bindings for WebGPU
Apache License 2.0
13 stars 0 forks source link

support windows/arm64 #1

Open gedw99 opened 3 months ago

gedw99 commented 3 months ago

This is in good shape and works really well.

Can we add windows arm64 also to: https://github.com/cogentcore/webgpu/tree/main/wgpu/lib/windows ?

Its possible now but was not a few months ago: https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/

"These runners are available to our customers on our GitHub Team and Enterprise Cloud plans. We expect to begin offering Arm runners for open source projects by the end of the year."

You would need to go into your settings -> Actions -> runner groups -> then add an ARM runner :) This does mean for now, they are also not free in public repos.

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, ubuntu-arm-latest, windows-latest, macos-latest, macos-arm-latest]

    runs-on: ${{ matrix.os }}

You can test using UTM BTW if your on Mac, since its Arm also. But it can also emulate amd64 binaries.

https://github.com/utmapp/UTM

Screenshot 2024-08-13 at 20 30 25
kkoreilly commented 3 months ago

Thank you for the suggestion! We probably don't want to do this until they provide free runners for arm64. Also, do you know how much usage windows arm64 has in general? If there is not much usage and it can run amd64 binaries anyway, I'm not sure if we want to bloat the repository with more large object files. However, if there is decent usage, it is probably worth supporting this at some point. Also, thank you for linking to UTM; I didn't know about it!

gedw99 commented 3 months ago

Yeah I read somewhere that Github / Microsoft will make the windows arm64 runners free in a few months.

I personally just use Task in CI, so that I have zero dependency on GitHub for CI. It can run in Github CI or gitlab or my own local CI test labs. It installs golang using gobrew by just inspecting the go mod, and builds and then pushes the release using GitHub cli. No GitHub actions needed, except a standard template that just wraps Task.

For Device testing the GUI apps can have get the web hook out of the CI, so it makes live easier with testing, because the app will just update on the servers, Desktop. You can also do it on mobile using a Webview, where it runs cogent as a web gui inside the Webview. I think I set a link to that golang webview. I do it this way.

So my point is that you can setup Github CI to run both on Github Servers and your own Hardware.

--

About how popular Windows 11 arm is / will be ...

Personally I know that windows arm64 is going to be a huge push by Microsoft because the Qualcomm chips are as fast or faster than the m2 and m3 chips from Apple based on reviews I read. I dont have one yet, but will for testing soon.

About 4 years ago, Microsoft and Qualcomm tried this and sort of messed it up. This time around they got them act together it seems.

The Qualcomm and Windows 11 do emulation too. This solves the huge problem that Microsoft had with old apps that are amd64 in that the new Qualcomm chips can run the old apps and the new arm64 apps.

In UTM, I run Windows 11 arm64, and can run windows amd64 and it will emulate. If I feed it windows/ arm64 it's faster. So it can do what Apple chips do with emulation / Rosetta. It also means you can test both without needing a Windows Surface Laptop with the Qualcomm Elite chip. So easy Dev testing :)

Cognent runs in it fine, as does GIO and pretty much anything else.

https://www.qualcomm.com/products/features/windowsapps

https://www.theverge.com/2024/6/26/24186432/microsoft-windows-on-arm-qualcomm-copilot-plus-pcs-prism-emulator

You can buy them now and they are FAST. https://www.youtube.com/watch?v=X3RsshZCZEA

DO I personally have users that I support using the Windows 11 arm64 laptops ? Yes I do. I think it's because the battery life is way longer and the performance so much higher than the Intel stuff, and because of the emulation.


UTM. Yeah it's a god send. Getting windows 11 on it is so easy too and screaming fast.

kkoreilly commented 3 months ago

Thank you for all of the information! We will definitely consider supporting windows/arm64 once GitHub makes those runners free.

johnnynunez commented 1 week ago

January 2025