[AOTI][XPU] Support lazy Triton kernel compilation for cpp-wrapper on XPU#179239
Closed
etaf wants to merge 2 commits intogh/etaf/217/basefrom
Closed
[AOTI][XPU] Support lazy Triton kernel compilation for cpp-wrapper on XPU#179239etaf wants to merge 2 commits intogh/etaf/217/basefrom
etaf wants to merge 2 commits intogh/etaf/217/basefrom
Conversation
etaf
added a commit
that referenced
this pull request
Apr 3, 2026
… XPU The lazy Triton kernel compilation feature (#175416) introduced CUDA-specific assumptions that broke XPU cpp-wrapper codegen. Fix the XPU incompatibilities: - lazy_triton_compile.h: conditional include for XPU vs CUDA device headers; change runTritonKernelWithAutotune stream param from cudaStream_t to void* (both pointer types convert implicitly) - cpp_wrapper_gpu.py: use device-appropriate pointer type for scratch allocations instead of hardcoded CUdeviceptr - sycl_runtime_wrappers.h: query threads_per_warp from the kernel object via compile_sub_group_size instead of requiring it as an external parameter, matching static_launcher/xpu.cpp - Remove threads_per_warp plumbing from triton_heuristics.py and cpp_wrapper_gpu.py codegen since it is no longer needed ghstack-source-id: 58de386 Pull-Request: #179239
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/179239
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 275b274 with merge base 1dc5e2f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
etaf
added a commit
that referenced
this pull request
Apr 3, 2026
… XPU The lazy Triton kernel compilation feature (#175416) introduced CUDA-specific assumptions that broke XPU cpp-wrapper codegen. Fix the XPU incompatibilities: - lazy_triton_compile.h: conditional include for XPU vs CUDA device headers; change runTritonKernelWithAutotune stream param from cudaStream_t to void* (both pointer types convert implicitly) - cpp_wrapper_gpu.py: use device-appropriate pointer type for scratch allocations instead of hardcoded CUdeviceptr - sycl_runtime_wrappers.h: query threads_per_warp from the kernel object via compile_sub_group_size instead of requiring it as an external parameter, matching static_launcher/xpu.cpp - Remove threads_per_warp plumbing from triton_heuristics.py and cpp_wrapper_gpu.py codegen since it is no longer needed ghstack-source-id: 9bcb595 Pull-Request: #179239
Collaborator
Author
|
Hi @desertfire @jansel, PR #175416 has caused a significant number of test failures on XPU, and this fix is needed to address them. Could you please help review this PR? |
desertfire
approved these changes
Apr 3, 2026
Collaborator
Author
|
@pytorchbot merge |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
weifengpy
pushed a commit
that referenced
this pull request
Apr 7, 2026
… XPU (#179239) The lazy Triton kernel compilation feature (#175416) introduced CUDA-specific assumptions that broke XPU cpp-wrapper codegen. Fix the XPU incompatibilities: - lazy_triton_compile.h: conditional include for XPU vs CUDA device headers; change runTritonKernelWithAutotune stream param from cudaStream_t to void* (both pointer types convert implicitly) - cpp_wrapper_gpu.py: use device-appropriate pointer type for scratch allocations instead of hardcoded CUdeviceptr - sycl_runtime_wrappers.h: query threads_per_warp from the kernel object via compile_sub_group_size instead of requiring it as an external parameter. - Remove threads_per_warp plumbing from triton_heuristics.py and cpp_wrapper_gpu.py codegen since it is no longer needed Pull Request resolved: #179239 Approved by: https://github.com/desertfire
nklshy-aws
pushed a commit
to nklshy-aws/pytorch
that referenced
this pull request
Apr 7, 2026
… XPU (pytorch#179239) The lazy Triton kernel compilation feature (pytorch#175416) introduced CUDA-specific assumptions that broke XPU cpp-wrapper codegen. Fix the XPU incompatibilities: - lazy_triton_compile.h: conditional include for XPU vs CUDA device headers; change runTritonKernelWithAutotune stream param from cudaStream_t to void* (both pointer types convert implicitly) - cpp_wrapper_gpu.py: use device-appropriate pointer type for scratch allocations instead of hardcoded CUdeviceptr - sycl_runtime_wrappers.h: query threads_per_warp from the kernel object via compile_sub_group_size instead of requiring it as an external parameter. - Remove threads_per_warp plumbing from triton_heuristics.py and cpp_wrapper_gpu.py codegen since it is no longer needed Pull Request resolved: pytorch#179239 Approved by: https://github.com/desertfire
pytorch-bot Bot
pushed a commit
that referenced
this pull request
Apr 10, 2026
… XPU (#179239) The lazy Triton kernel compilation feature (#175416) introduced CUDA-specific assumptions that broke XPU cpp-wrapper codegen. Fix the XPU incompatibilities: - lazy_triton_compile.h: conditional include for XPU vs CUDA device headers; change runTritonKernelWithAutotune stream param from cudaStream_t to void* (both pointer types convert implicitly) - cpp_wrapper_gpu.py: use device-appropriate pointer type for scratch allocations instead of hardcoded CUdeviceptr - sycl_runtime_wrappers.h: query threads_per_warp from the kernel object via compile_sub_group_size instead of requiring it as an external parameter. - Remove threads_per_warp plumbing from triton_heuristics.py and cpp_wrapper_gpu.py codegen since it is no longer needed Pull Request resolved: #179239 Approved by: https://github.com/desertfire
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.
Stack from ghstack (oldest at bottom):
The lazy Triton kernel compilation feature (#175416) introduced
CUDA-specific assumptions that broke XPU cpp-wrapper codegen.
Fix the XPU incompatibilities:
headers; change runTritonKernelWithAutotune stream param from
cudaStream_t to void* (both pointer types convert implicitly)
allocations instead of hardcoded CUdeviceptr
object via compile_sub_group_size instead of requiring it as an
external parameter.
cpp_wrapper_gpu.py codegen since it is no longer needed
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo