NVIDIA / NVIDIA/cutlass

[BUG] std::numeric_limits<half_t>::digits

Open
#1,701 3 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

Just a minor thing I noticed.

include/cutlass/half_t.h set std::numeric_limit<half_t>::digits to 10 but it should be 11. The implicits 1 bit at the start is counted normally e.g. std::numeric_limits::digits == 24.

It appears to be wrong in line 565 and 628. Not sure if anything with cutlass depends on it being wrong so I'm not filing an pull request. Let me know if I should.

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

Open include/cutlass/half_t.h and inspect the std::numeric_limits<half_t>::digits definitions around lines 565 and 628. Compare their values with the documented precision convention used for std::numeric_limits::digits, then check whether the existing test suite covers half_t numeric limits. Done means both definitions report the correct value without breaking dependent tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.