Repository navigation
fix(build): add missing c10/hip/HIPException.h include in gated_rmsnorm_quant_kernels.cu - #2839
Closed
ChuanLi1101 wants to merge 1 commit into
Closed
ChuanLi1101 wants to merge 1 commit into
ChuanLi1101 wants to merge 1 commit into
Conversation
…rm_quant_kernels.cu The file uses C10_HIP_KERNEL_LAUNCH_CHECK() at line 223 but never includes the header that defines it, so PREBUILD_KERNELS=1 builds fail with: csrc/kernels/gated_rmsnorm_quant_kernels.cu:223:5: error: use of undeclared identifier 'C10_HIP_KERNEL_LAUNCH_CHECK' JIT builds do not hit this because the JIT hipify pipeline injects these headers implicitly; PREBUILD_KERNELS=1 goes through setup.py extensions directly and does not. Fixes #2837 Made-with: Cursor
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
sunway513
pushed a commit
that referenced
this pull request
Apr 21, 2026
…rm_quant_kernels.cu Cherry-pick of #2839 (by @ChuanLi1101) onto release/v0.1.12 to unblock PREBUILD_KERNELS=1 builds in vLLM ml-ci-internal base image. Fixes #2837. See PR #2839 for full root-cause analysis.
This was referenced Apr 21, 2026
sunway513
added a commit
that referenced
this pull request
Apr 21, 2026
…nels.cu Per Lingpeng's review on PR #2839/#2842 — the macro is defined only by recent PyTorch versions' c10/hip/HIPException.h. Building AITER from source against older PyTorch releases (e.g. vLLM ml-ci-internal lane, issue #2837) fails to find the macro even when the include is present. The macro is used in exactly one place across all of csrc/. It's an error-reporting wrapper around hipGetLastError() — the kernel launches themselves are unaffected. Removing it eliminates the build-env dependency and is robust across PyTorch versions. Supersedes #2842 (cherry-pick of #2839's include-based fix). Fixes #2837.
valarLip
pushed a commit
that referenced
this pull request
Apr 22, 2026
…nels.cu (#2846) Per Lingpeng's review on PR #2839/#2842 — the macro is defined only by recent PyTorch versions' c10/hip/HIPException.h. Building AITER from source against older PyTorch releases (e.g. vLLM ml-ci-internal lane, issue #2837) fails to find the macro even when the include is present. The macro is used in exactly one place across all of csrc/. It's an error-reporting wrapper around hipGetLastError() — the kernel launches themselves are unaffected. Removing it eliminates the build-env dependency and is robust across PyTorch versions. Supersedes #2842 (cherry-pick of #2839's include-based fix). Fixes #2837.
Contributor
|
@ChuanLi1101 This PR has been inactive for over 2 months. Is the HIPException.h include fix still applicable? If you still plan to pursue it, please rebase onto current main and push an update. If there's no response within ~2 weeks, we'll close this to keep the PR queue clean — it can always be reopened or resubmitted. |
Contributor
|
No activity for 15 days, so this is now labelled |
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.
Summary
Adds the missing
#include <c10/hip/HIPException.h>tocsrc/kernels/gated_rmsnorm_quant_kernels.cuso that wheel builds withPREBUILD_KERNELS=1succeed.Fixes #2837.
Root cause
gated_rmsnorm_quant_kernels.culine 223 usesC10_HIP_KERNEL_LAUNCH_CHECK()but the file never includes the header that defines it. The macro lives inc10/hip/HIPException.h(analogue ofC10_CUDA_KERNEL_LAUNCH_CHECKinc10/cuda/CUDAException.h).aiter/jit/utils/hipify/injects these c10 headers implicitly, so the missing include was invisible in per-PR CI.PREBUILD_KERNELS=1path: compiles the.cudirectly viasetup.pyextensions, without that injection, and fails withThe regression was introduced in 875f6b7 (#2499, "Fuse gated rmsnorm + group_quant for qwen3next and qwen3.5") and is present in v0.1.12.post1.
Fix
One-line change: add
#include <c10/hip/HIPException.h>to the file's include block.Test plan
PREBUILD_KERNELS=1 pip install .no longer errors ongated_rmsnorm_quant_kernels.cu.Follow-up suggestion
This class of bug (compiles via JIT, fails via
PREBUILD_KERNELS=1) is only catchable by a wheel-build CI lane. Consider adding a per-PR job that runsPREBUILD_KERNELS=1 pip wheel .on at least one config; happy to send a separate proposal.