Skip to content

Silence the Windows HIP build's 83,362 warnings, and keep the Linux ones - #528

Merged
bernardladenthin merged 1 commit into
mainfrom
local/quiet-windows-hip-warnings
Oct 12, 2026
Merged

bernardladenthin merged 1 commit into
mainfrom
local/quiet-windows-hip-warnings

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Measured in run 38172107721, and the comparison is the whole argument:

job log lines warnings
Windows ROCm/HIP 714,345 83,362
Windows SYCL 11,981 724
Windows CPU (clang) 2,627 407
Linux CUDA 3,266 9
Linux ROCm/HIP 2,455 9
C++ Tests Windows 1,655 66
Windows arm64 1,499 24
Windows CUDA 1,068 0

The Windows ROCm job is 60× larger than the next biggest and carries 98.5 % of every warning
its Windows jobs emit. The Linux ROCm job compiles the same upstream sources with the same TheRock
clang for the same 23 GPU targets
— and produces nine warnings.

The cause is the language, not the arch count

Upstream compiles the HIP sources as plain C++ on Windows (CXX_IS_HIPCC on WIN32) and as the
HIP language on Linux. Clang's C++ frontend reports what the HIP one does not:

class count
-Wsign-compare 29,673
-Wnested-anon-types 17,964
-Wmissing-noreturn 16,378
-Wunused-variable 6,404
-Wmissing-braces 5,988
-Wunused-parameter 3,386
-Wcast-qual / -Wunreachable-code-break / 2 more 1,529

Every one is in ggml/src/ggml-cuda/*.cu — upstream's own code. Not one line of ours, and nothing
we would ever act on.

-w on ggml-hip, Windows only

Suppressing a whole warning set is normally the wrong instrument. What makes it right here is the
Linux job
: it compiles the same sources and keeps every warning, in a log short enough to read. The
information is preserved where it is legible and dropped where it is multiplied by 23.

It also ends the alternative, which was chasing one more class per toolchain bump — eight today. And
it subsumes the -Wno-ignored-attributes added for the dllimport flood, so that becomes one flag
instead of a growing list.

Errors are untouched: a real compile failure still fails the job.

Whether other jobs need the same: measured, not assumed

No. Outside the ROCm job every log is between 1,068 and 11,981 lines, which is readable. SYCL's
724 warnings come from icx on upstream code and may carry information worth keeping; nothing there
is multiplied into six figures.

Upstream

Worth an issue with that table — their own windows-rocm job pays the identical cost, and the fix is
theirs: either the warnings or the C++-on-Windows choice. Recorded in TODO.md next to the other
three measured upstream findings.

check-natives.py 0 disagreements. The effect is only observable in a ROCm job: this is one compile
flag on one target, and the next run's line count is the measurement.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G

Measured in run 38172107721: the Windows ROCm job's log is 714,345 lines with 83,362 warning messages, while the Linux ROCm job -- the same upstream sources, the same TheRock clang, the same 23 GPU targets -- has 9 warnings in 2,455 lines. The Windows job is 60 times larger than the next biggest job of that run and carries 98.5 percent of all warnings its Windows jobs emit; SYCL is second with 724 in 12k lines, everything else is between 0 and 407.

The cause is the language, not the arch count. Upstream compiles the HIP sources as plain C++ on Windows (CXX_IS_HIPCC on WIN32) and as the HIP language on Linux, and clang's C++ frontend reports what the HIP one does not: sign-compare 29,673 times, nested-anon-types 17,964, missing-noreturn 16,378, then unused variables, missing braces, unused parameters, cast-qual and unreachable breaks. Every one of them is in ggml/src/ggml-cuda/*.cu, upstream's own code -- not a line of ours, and nothing we would ever act on.

So -w on the ggml-hip target, Windows only, which subsumes the dllimport suppression added earlier. Suppressing a whole warning set is normally the wrong instrument, and what makes it right here is the Linux job: it compiles the same sources and keeps every warning in a log short enough to read, so the information is preserved where it is legible and dropped where it is multiplied by 23. It also ends the alternative, which was chasing one more warning class per toolchain bump. Errors are untouched -- a real compile failure still fails the job.

The answer to whether other jobs need the same is measured rather than assumed: no. The table in TODO.md lists all eight, and outside the ROCm job the logs are between 1,068 and 11,981 lines, which is readable.

Worth an upstream issue with that table, since their own windows-rocm job pays the identical cost and the fix is theirs -- either the warnings or the C++-on-Windows choice.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01E2h8gXyyE5UeimkL9vQv9G
@sonarqubecloud

Copy link
Copy Markdown

@bernardladenthin
bernardladenthin merged commit 79acec0 into main Oct 12, 2026
58 of 70 checks passed
@bernardladenthin
bernardladenthin deleted the local/quiet-windows-hip-warnings branch October 12, 2026 00:07

This branch had an error being deployed

1 failed and 1 active deployments
maven-central — d82e2744 Deployed Oct 11, 2026 by bernardladenthin via Verify GPG signing key (no secrets printed) #1233
startgate — d82e2744 Deployed Oct 11, 2026 by bernardladenthin via Start gate (abort window) #1233
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