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

support windows/arm64 #1

Open
gedw99 opened this issue Aug 13, 2024 · 5 comments
Open

support windows/arm64 #1

gedw99 opened this issue Aug 13, 2024 · 5 comments

Comments

@gedw99
Copy link

gedw99 commented Aug 13, 2024

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
@gedw99 gedw99 changed the title windows/arm64 support windows/arm64 Aug 13, 2024
@kkoreilly
Copy link
Member

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
Copy link
Author

gedw99 commented Aug 14, 2024

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
Copy link
Member

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

@johnnynunez
Copy link

January 2025

@gedw99
Copy link
Author

gedw99 commented Nov 27, 2024

I know that there is no GitHub CI windows arm64, but how about modifying the build constraints to see what the error might be ( if any ) ?

https://github.com/cogentcore/webgpu/tree/main/wgpu/lib/windows just needs an "arm64" folder and the libwgpu_native.a for arm64 to put into into the repo.

if we can work out the issue then at least devs can built it themselves like I do.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\admin> go env
set GO111MODULE=
set GOARCH=arm64
set GOBIN=
set GOCACHE=C:\Users\admin\AppData\Local\go-build
set GOENV=C:\Users\admin\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=arm64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\admin\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\admin\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_arm64
set GOVCS=
set GOVERSION=go1.23.1
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\admin\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOARM64=v8.0
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\admin\AppData\Local\Temp\go-build3282397604=/tmp/go-build -gno-record-gcc-switches
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\admin> go run cogentcore.org/core/examples/demo@main
go: downloading cogentcore.org/core v0.3.6-0.20241126220214-5b41bab5e7d6
go: downloading github.com/chewxy/math32 v1.10.1
go: downloading golang.org/x/image v0.18.0
go: downloading github.com/anthonynsimon/bild v0.13.0
go: downloading github.com/jinzhu/copier v0.4.0
go: downloading github.com/Bios-Marcel/wastebasket v0.0.4-0.20240213135800-f26f1ae0a7c4
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading golang.org/x/net v0.27.0
go: downloading github.com/Masterminds/vcs v1.13.3
go: downloading github.com/goki/freetype v1.0.5
go: downloading github.com/alecthomas/chroma/v2 v2.13.0
go: downloading github.com/pelletier/go-toml/v2 v2.1.2-0.20240227203013-2b69615b5d55
go: downloading github.com/aymerick/douceur v0.2.0
go: downloading golang.org/x/sys v0.22.0
go: downloading github.com/gorilla/css v1.0.1
go: downloading github.com/dlclark/regexp2 v1.11.0
go: downloading github.com/cogentcore/webgpu v0.0.0-20240906154609-e35089e9a725
go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a
go: downloading golang.org/x/tools v0.23.0
go: downloading golang.org/x/mod v0.19.0
package cogentcore.org/core/examples/demo
        imports cogentcore.org/core/core
        imports cogentcore.org/core/keymap
        imports cogentcore.org/core/system/driver
        imports cogentcore.org/core/system/driver/desktop
        imports github.com/cogentcore/webgpu/wgpuglfw: build constraints exclude all Go files in C:\Users\admin\go\pkg\mod\github.com\cogentcore\w[email protected]\wgpuglfw

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

No branches or pull requests

3 participants