NonFusedGemmRun verification compares GEMM1 twice; GEMM0 output is never checked
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
Description
NonFusedGemmRun::run in examples/45_dual_gemm/dual_gemm_run.h (~lines 435-447) checks the two GEMM outputs with two byte-identical comparisons:
bool passed0 = cutlass::reference::host::TensorEquals(
reference_D1.host_view(),
tensor_D1.host_view()); // should compare reference_D0 vs tensor_D0
CHECK_TRUE(passed0);
bool passed1 = cutlass::reference::host::TensorEquals(
reference_D1.host_view(),
tensor_D1.host_view());
CHECK_TRUE(passed1);
GEMM0's output is never value-compared - it is only checked to be nonzero - so any wrong-but-nonzero GEMM0 result passes the example's verification. Present since the example was introduced (2019, then examples/43_dual_gemm). Today dual_gemm.cu instantiates only DualFusedGemmRun (whose checks are correct), but this struct ships as the canonical non-fused baseline users copy.
Suggested fix
Make passed0 compare reference_D0.host_view() with tensor_D0.host_view().
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open examples/45_dual_gemm/dual_gemm_run.h and inspect NonFusedGemmRun::run around lines 435-447. Verify that the first TensorEquals call compares reference_D0.host_view() with tensor_D0.host_view(), then review the surrounding checks to confirm GEMM0 and GEMM1 are both validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100