NVIDIA / NVIDIA/cutlass

[BUG] Wrong assertion in integer_subbyte.h

Open
#1,949 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

? - Needs Triage bug inactive-30d inactive-90d
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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.