NVIDIA / NVIDIA/cutlass

VisitorRowReduction::Callbacks::reduction is declared to return ElementCompute but has no return statement

Open Beginner friendly
#3,495 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CUTLASS C++
Dominant language
C++
Stars
10.5k
Forks
2.1k
Avg merge
3d 11h
Merged PRs (30d)
7

Description

Description

VisitorRowReduction::Callbacks::reduction in include/cutlass/epilogue/threadblock/fusion/visitor_store.hpp (lines 551-560) is declared to return ElementCompute but contains no return statement; control flows off the end of a non-void function, which is undefined behavior. Compilers flag it (-Wreturn-type / nvcc equivalent).

The result is currently benign because the only call site (line 508) discards the return value. The function also duplicates the existing shared helper fragment_reduce (line 214) that the Col and Scalar reduction visitors already use at lines 330 and 748.

Suggested fix

Either change the signature to void, or delete the private duplicate and call fragment_reduce<RegReduceFn, RoundStyle>(reduce_buffer, result) like the sibling visitors.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in include/cutlass/epilogue/threadblock/fusion/visitor_store.hpp at lines 551-560 and inspect the call site at line 508. Compare the duplicate reduction logic with fragment_reduce at line 214 and the sibling visitors at lines 330 and 748. Done means the non-void fallthrough is removed, the existing reduction behavior is preserved, and the compiler warning is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.