[BUG] Wrong assertion in integer_subbyte.h
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
Describe the bug
I got an Assertion failure while I tried 55_hopper_int4_fp8_gemm
This was due to the following incorrect assertion logic at [this line]:(https://github.com/NVIDIA/cutlass/blob/8aa95dbb888be6d81c6fbf7169718c5244b53227/include/cutlass/integer_subbyte.h#L96):
[[maybe_unused]] constexpr int lower_bound = -(1 << (Bits - 1));
[[maybe_unused]] constexpr int upper_bound = (1 << (Bits - 1)) - 1;
assert(value >= lower_bound);
assert(value < upper_bound); # HERE
The assertion should be assert(value <= upper_bound) as the upper_bound is inclusive.
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
Start by reading include/cutlass/integer_subbyte.h at line 96, where the reported assertion is defined. Verify the boundary behavior for the inclusive upper bound and run the relevant existing test or project test suite if available. Done means the valid maximum integer value no longer triggers the assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100