Skip to content

gemm: pass this by reference for kernel lambda captures - #841

Merged
taozha2 merged 1 commit into
intel:mainfrom
lowpolyneko:fix-cxx-20
Sep 22, 2026
Merged

taozha2 merged 1 commit into
intel:mainfrom
lowpolyneko:fix-cxx-20

Conversation

@lowpolyneko

Copy link
Copy Markdown

Description

C++20 has deprecated implicit capture by value for this with [=](){. An alternative fix is to explicitly include this in the capture list with [=, this](){. However, this emits a warning with C++17 and below.

These warnings currently cause vllm-xpu-kernels to fail building with torch>=2.13, C++20 support mandated for kernels, and -Werror enabled.

Type

  • Bug
  • Feature
  • Performance
  • Refactor

Testing

  • Tests pass
  • Xe12
  • Xe20

References

This issue is inherited from upstream. There is an outstanding PR on CUTLASS's repository that also fixes this issue (see NVIDIA#2997), however it is stale.

Checklist

  • Copyright
  • Co-pilot Review
  • Deprecated APIs not used

@rolandschulz

Copy link
Copy Markdown

Note: We don't currently validate with C++20 so there might be other issues.

C++20 has deprecated implicit capture by value for `this` with `[=](){`.
An alternative fix is to explicitly include `this` in the capture list
with `[=, this](){`. However, this emits a warning on C++17 and below.
@taozha2
taozha2 enabled auto-merge (squash) September 22, 2026 06:22
@taozha2
taozha2 merged commit 689d7a3 into intel:main Sep 22, 2026
7 of 9 checks passed
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.

4 participants