Skip to content

ci: Add support for CUDA 13.4 ARM64 builds for Windows - #26650

Open
shivamkumard-ctrl wants to merge 4 commits into
ggml-org:masterfrom
shivamkumard-ctrl:windows-arm64-cuda-13.4
Open

ci: Add support for CUDA 13.4 ARM64 builds for Windows#26650
shivamkumard-ctrl wants to merge 4 commits into
ggml-org:masterfrom
shivamkumard-ctrl:windows-arm64-cuda-13.4

Conversation

@shivamkumard-ctrl

Copy link
Copy Markdown

Overview

  • Added an architecture-specific CUDA 13.4 Windows build entry targeting ARM64.
  • Added a CMake configuration to enable ARM64 CUDA cross-compilation from an x64 Windows environment using the x64-hosted CUDA and MSVC toolchain while linking against the ARM64 CUDA import libraries to produce ggml-cuda.dll.
  • Validated the self-hosted Windows x64 workflow, including toolkit acquisition, CMake configuration, ARM64 CUDA cross-compilation, and packaging. Runtime validation was performed separately on a native ARM64 RTX Spark system using TinyLlama 1.1B Q4_K_M to verify the generated binaries.
  • The ARM64 CUDA job builds only the ggml-cuda.dll backend (LLAMA_BUILD_SERVER=OFF).
  • The release consists of two packages: the main ARM64 release package, which combines the existing ARM64 CPU outputs with ggml-cuda.dll, and a separate runtime package containing the required CUDA runtime libraries (cudart64_13.dll, cublas64_13.dll, and cublasLt64_13.dll).

Additional information

The CUDA 13.4 setup uses NVIDIA Developer Preview component archives instead of the GA component downloads used by the existing CUDA setups and will require updates once CUDA 13.4 reaches GA.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - Used Codex 5.6 for the initial changes, then cleaned up and refined the implementation.

Added an architecture-specific CUDA 13.4 Windows build entry targeting ARM64.
Added a CMake configuration to enable ARM64 CUDA cross-compilation from an x64 Windows environment using the x64-hosted CUDA and MSVC toolchain while linking against the ARM64 CUDA import libraries to produce ggml-cuda.dll.
Validated the self-hosted Windows x64 workflow, including toolkit acquisition, CMake configuration, ARM64 CUDA cross-compilation, and packaging. Runtime validation was performed separately on a native ARM64 RTX Spark system using TinyLlama 1.1B Q4_K_M to verify the generated binaries.
The ARM64 CUDA job builds only the ggml-cuda.dll backend (LLAMA_BUILD_SERVER=OFF). The release consists of two packages: the main ARM64 release package, which combines the existing ARM64 CPU outputs with ggml-cuda.dll, and a separate runtime package containing the required CUDA runtime libraries (cudart64_13.dll, cublas64_13.dll, and cublasLt64_13.dll).
The CUDA 13.4 setup uses NVIDIA Developer Preview component archives instead of the GA component downloads used by the existing CUDA setups and will require updates once CUDA 13.4 reaches GA.
@github-actions github-actions Bot added build Compilation issues devops improvements to build systems and github actions labels Aug 5, 2026

@ORippler ORippler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

1. MSVC has issues with NEON intrinsics, and we should use LLVM/clang for arm builds: #8446 Edit: see we do dynamic runtime linking of MSVC-built ggm-cuda.dll + CLANG-built ggml/lllama already, so this does not apply
2. Any build not containing OpenMP will see severe perf regressions, so this PR is effectively gated by #25782 while not gated (we build and redistribute debug libomp on windows in current CI), we should look to get #25782 merged first

@ORippler ORippler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generally looks good to me, left some comments. After deep-diving I see we do dynamic runtime linking of MVSC-built ggml-cuda.dll + CLANG-built ggml/llama already, so please disregard my first fomment above

required: true
cuda_arch:
description: "CUDA target architecture"
required: false

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
required: false
required: true

If we always specify this, we may as well require it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This would break the manual CI flow because it uses the same actions, and we haven’t added the architecture-specific entries there yet. [Reference]

A separate PR will add ARM64 support for manual builds and cover this change.

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread cmake/arm64-windows-msvc-cuda.cmake
@ORippler
ORippler dismissed their stale review August 6, 2026 10:58

deep dive on current release.yaml invalidated concerns

@ggerganov

Copy link
Copy Markdown
Member

we should look to get #25782 merged first

I think it's OK if we get this PR before the OpenMP stuff?

@ORippler

ORippler commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

I think it's OK if we get this PR before the OpenMP stuff?

yeah these are legal, not functional/perf aspects

@ggerganov

Copy link
Copy Markdown
Member

@shivamkumard-ctrl Any reason to still be in draft mode?

- Moves CUDA-specific CMake options into matrix defines.
- Keeps the CUB 3DOT2 option only for CUDA 12.4.
- Removes runtime argument construction and the unnecessary server option.
- Aligns ARM64 CUDA runtime packaging with the existing robocopy approach.
- Generalizes the ARM64 release label from CUDA 13.4 to CUDA 13.
@shivamkumard-ctrl
shivamkumard-ctrl marked this pull request as ready for review August 7, 2026 07:00
@shivamkumard-ctrl
shivamkumard-ctrl requested review from a team and ggerganov as code owners August 7, 2026 07:00
Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml

@ORippler ORippler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding this!

@ggerganov

Copy link
Copy Markdown
Member

Give us some time to review this PR with @CISC

One question that arise - should these builds be tagged as "preview" in the Release page to signify that they use a "preview" version of CUDA 13.4?

Comment thread .github/workflows/release.yml Outdated
@ORippler

ORippler commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

One question that arise - should these builds be tagged as "preview" in the Release page to signify that they use a "preview" version of CUDA 13.4?

Fine by me/I have no stance on this

@CISC

CISC commented Aug 7, 2026

Copy link
Copy Markdown
Member

LGTM, can we have link to successful release build please?

@ORippler

ORippler commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

@CISC this one completed https://github.com/shivamkumard-ctrl/llama.cpp/actions/runs/31154609762#artifacts (and was used by me to verify native vs. cross-compiled perf on RTX Spark), but was on commit aa8c22e iirc

Latest one is https://github.com/shivamkumard-ctrl/llama.cpp/actions/runs/31171067141#artifacts, where related windows-cuda jobs also pass.

LMK if you need/meant something else

@CISC

CISC commented Aug 7, 2026

Copy link
Copy Markdown
Member

LMK if you need/meant something else

Perfect, thanks.

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
@CISC

CISC commented Aug 7, 2026

Copy link
Copy Markdown
Member

@ORippler guess you get the honor. :)

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

Labels

build Compilation issues devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants