Skip to content

[BUG] Wrong assertion in integer_subbyte.h #1949

@Algy

Description

@Algy

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]:(

assert(value < upper_bound);
):

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions