Skip to content

docs(build): add Windows VS clang route and HTP signing notes - #1671

Open
Erin Genovy (jefgen) wants to merge 1 commit into
qualcomm:mainfrom
jefgen:docs/windows-build-gaps
Open

Erin Genovy (jefgen) wants to merge 1 commit into
qualcomm:mainfrom
jefgen:docs/windows-build-gaps

Conversation

@jefgen

@jefgen Erin Genovy (jefgen) commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for GenieX!

From working on #1672, I was able to get things building from source on Windows ARM64 on a Snapdragon X2 Elite, and wanted to contribute back some documentation edits for what got the build working.


This only adds to notes/build.md. The MSYS2 and VsDevCmd steps stay as they are, with Visual Studio's own clang added as an alternative. The one existing line it replaces is the CLI binary's path.

Summary

  • Add the Visual Studio clang route CI uses (setup-vcvars, _build-sdk.yml): import vcvarsarm64.bat into PowerShell and put its ARM64 clang first on PATH.
  • List Python 3 as a prerequisite, for the OpenCL kernels and htp-swiv.py.
  • Name the trimmed SDKs CI installs, and the extra steps the full Qualcomm Software Center SDKs need on Windows.
  • Add "Signing the HTP skels": the matching WDK, where CMake looks for Inf2Cat.exe, the cached GGML_HEXAGON_HTP_CERT, and unsigned builds.
  • Add short notes on the llama.cpp patches, HTP skel rebuilds, --fresh and version strings.
  • Fix the CLI binary's path: rules_go builds it under bazel-out/<config>-ST-<hash>/, not bazel-bin, so the doc now asks bazelisk cquery for it.

Aside: setup-snapdragon-sdks exports WINDOWS_SDK_BIN as ...\bin\<version>\arm64, and ggml-hexagon's CMake appends arm64 and x86 to it, so that lookup misses. CI finds Inf2Cat.exe through vcvars instead, so this PR leaves CI alone.

Test plan

  • Built the SDK, signed, and the CLI end to end on Windows ARM64 on Snapdragon X2 Elite, using Visual Studio's clang the way these steps do, with the full SDKs.
  • Smoke-tested both NPU runtimes on that build. Each answered "In one sentence, what is the capital of France?" correctly:
    • llama.cpp, with the self-signed HTP skels: qualcomm-ai-hub-community/Qwen3-4B-Instruct-2507-Hi-Fi-fraQtl (Q4_0), decoding at 33.2 tok/s.
    • QAIRT 2.50: qualcomm/Qwen3-4B-Instruct-2507, decoding at 35.5 tok/s.
  • Ran the new PowerShell block verbatim in a fresh pwsh: arm64 host and target, the chosen Windows SDK, and native clang and lld-link first on PATH.
  • Relative links and anchors in notes/build.md resolve.
  • Not tried here: the trimmed SDKs, since this build used the full ones, or an unsigned build. CI runs both.

Co-authored by Copilot + Human.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Erin Genovy <29107334+jefgen@users.noreply.github.com>

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant