Fix CUDA 13 build error in gqa_unfused_attention.cu#28309
Merged
yuslepukhin merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
tianleiwu
added a commit
that referenced
this pull request
May 3, 2026
### Description Fix CUDA 13 build failure introduced by PR #28198 (commit 997c479). **Root cause:** `gqa_unfused_attention.cu` directly includes `<cub/cub.cuh>`, which on CUDA 13.x transitively pulls in CCCL's `tcgen05_ld.h`. That header uses `__out` as a parameter name in inline PTX assembly, but on Windows MSVC the SAL annotation macro `#define __out` expands it, turning `__out[0]` into `[0]` — causing a parse error. **Fix:** Changed `#include <cub/cub.cuh>` to `#include "core/providers/cuda/cu_inc/cub.cuh"` — the existing ORT wrapper that `#undef __out` before including CUB. ### Motivation and Context The CUDA 13 packaging pipeline (`py-cuda13-packaging-pipeline.yml`) has been failing since PR #28198 was merged, with errors like: ``` E:/_work/_temp/v13.0/include/cccl/cuda/__ptx/instructions/generated/tcgen05_ld.h(20): error : expected an identifier asm("tcgen05.ld.sync.aligned.16x64b.x1.b32 {%0}, [%1];" : "=r"( [0]) : "r"(__taddr) : "memory"); ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix CUDA 13 build failure introduced by PR #28198 (commit 997c479).
Root cause:
gqa_unfused_attention.cudirectly includes<cub/cub.cuh>, which on CUDA 13.x transitively pulls in CCCL'stcgen05_ld.h. That header uses__outas a parameter name in inline PTX assembly, but on Windows MSVC the SAL annotation macro#define __outexpands it, turning__out[0]into[0]— causing a parse error.Fix: Changed
#include <cub/cub.cuh>to#include "core/providers/cuda/cu_inc/cub.cuh"— the existing ORT wrapper that#undef __outbefore including CUB.Motivation and Context
The CUDA 13 packaging pipeline (
py-cuda13-packaging-pipeline.yml) has been failing since PR #28198 was merged, with errors like: