-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Which component has the problem?
CUTLASS C++
Bug Report
Describe the bug
When buildling CUTLASS C++ with C++20, I encountered several warnings about lambda capture in kernels:
/cutlass/include/cutlass/gemm/collective/sm100_blockscaled_mma_array_warpspecialized_rcggemm.hpp(694): warning #2908-D: the implicit by-copy capture of "this" is deprecated
Tensor mSFB_tmp = observed_tma_load_sfb_->get_tma_tensor(shape(layout_SFB));
^
Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
Steps/Code to reproduce bug
Build with the compilation flag -std=c++20.
The warnings are caused by the implicit by-copy capture mode.
cutlass/gemm/collective/sm100_blockscaled_mma_array_warpspecialized_rcggemm.hpp:
auto mSFB_nkl = [=](){ // capture by copy
if constexpr (IsCtaN192) {
Tensor mSFB_tmp = observed_tma_load_sfb_->get_tma_tensor(shape(layout_SFB)); // Access "this" implicitly.
...To resolve this, you can either capture by reference or add this to the capture list i.e., [=, this]
auto mSFB_nkl = [&](){ // capture by refernece
if constexpr (IsCtaN192) {
Tensor mSFB_tmp = observed_tma_load_sfb_->get_tma_tensor(shape(layout_SFB)); // Access "this" implicitly.
...Reactions are currently unavailable