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

Small fix for unified kernel reduction #926

Merged
merged 2 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cuda/base/kernel_launch_reduction.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void run_kernel_row_reduction(std::shared_ptr<const CudaExecutor> exec,
} else {
select_run_generic_kernel_row_reduction(
subwarp_sizes(),
[&](int compiled_subwarp_size) {
[cols](int compiled_subwarp_size) {
return compiled_subwarp_size >= cols ||
compiled_subwarp_size == config::warp_size;
},
Expand Down Expand Up @@ -488,7 +488,7 @@ void run_kernel_col_reduction(std::shared_ptr<const CudaExecutor> exec,
if (cols <= config::warp_size) {
select_generic_col_reduction_small(
subwarp_sizes(),
[&](int compiled_subwarp_size) {
[cols](int compiled_subwarp_size) {
return compiled_subwarp_size >= cols ||
compiled_subwarp_size == config::warp_size;
},
Expand Down
4 changes: 2 additions & 2 deletions dpcpp/base/kernel_launch_reduction.dp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ void run_kernel_row_reduction_stage1(std::shared_ptr<const DpcppExecutor> exec,
} else {
select_generic_kernel_row_reduction_2d(
subsubgroup_sizes(),
[&](int compiled_ssg_size) {
[cols](int compiled_ssg_size) {
return compiled_ssg_size >= cols ||
compiled_ssg_size == sg_size;
},
Expand Down Expand Up @@ -612,7 +612,7 @@ void run_kernel_col_reduction_stage1(std::shared_ptr<const DpcppExecutor> exec,
if (cols <= sg_size) {
select_generic_col_reduction_small(
subsubgroup_sizes(),
[&](int compiled_ssg_size) {
[cols](int compiled_ssg_size) {
return compiled_ssg_size >= cols ||
compiled_ssg_size == sg_size;
pratikvn marked this conversation as resolved.
Show resolved Hide resolved
},
Expand Down
4 changes: 2 additions & 2 deletions hip/base/kernel_launch_reduction.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void run_kernel_row_reduction(std::shared_ptr<const HipExecutor> exec,
} else {
select_run_generic_kernel_row_reduction(
subwarp_sizes(),
[&](int compiled_subwarp_size) {
[cols](int compiled_subwarp_size) {
return compiled_subwarp_size >= cols ||
compiled_subwarp_size == config::warp_size;
},
Expand Down Expand Up @@ -496,7 +496,7 @@ void run_kernel_col_reduction(std::shared_ptr<const HipExecutor> exec,
if (cols <= config::warp_size) {
select_generic_col_reduction_small(
subwarp_sizes(),
[&](int compiled_subwarp_size) {
[cols](int compiled_subwarp_size) {
return compiled_subwarp_size >= cols ||
compiled_subwarp_size == config::warp_size;
},
Expand Down