Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpu: nvidia: Updated matmul labda capture #2110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShanoToni
Copy link
Contributor

Description

When compiling oneDNN with C++20, the current matmul executor causes errors due to the lambda capturing this.
In C++20 implicit capture of this is an error, while in C++17 explicit capture will flag as a warning.

PR adds use of the already existing compiler workaround for the lambda capture WA_THIS_COPY_CAPTURE

Example error:

src/gpu/nvidia/cudnn_matmul_executor.hpp:89:13: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,-Wdeprecated-this-capture]   89 |             free_runtime_scratch(matmul_impl_->has_runtime_params(),      |             ^/export/users/mkltest/ec/oneDNN-auto-ef77e8c0-f90d-f1f3-8666-a4bf010d0e2d/sources/src/gpu/nvidia/cudnn_matmul_executor.hpp:63:33: note: add an explicit capture of 'this' to capture '*this' by reference   63 |         compat::host_task(cgh, [=](const compat::interop_handle &ih) 

Checklist

General

  • [ x ] Do all unit and benchdnn tests (make test and make test_benchdnn_*) pass locally for each commit?
  • [ x ] Have you formatted the code using clang-format?

Bug fixes

  • [ x ] Have you included information on how to reproduce the issue (either in a github issue or in this PR)?

@ShanoToni ShanoToni requested a review from a team as a code owner September 23, 2024 16:11
@github-actions github-actions bot added the platform:gpu-nvidia Codeowner: @oneapi-src/onednn-gpu-nvidia label Sep 23, 2024
Copy link
Contributor

@mgouicem mgouicem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THanks for the fix!
Could you rename the commit message to align it to the PR title?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:gpu-nvidia Codeowner: @oneapi-src/onednn-gpu-nvidia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants