Compiler error

Open Beginner friendly
#407 8 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cmake, cpp

Research direction

Start at /BitNet/src/ggml-bitnet-mad.cpp around line 811 and reproduce the reported compiler diagnostic under Ubuntu 24.04.3 with the listed Clang or GCC versions. Confirm the pointer declaration is const-correct and that the project compiles without this error.

Written by the indexing model from the issue text.

Description

Under Ubuntu LTS 24.04.3 I got the following compiler error:

/BitNet/src/ggml-bitnet-mad.cpp:811:18: error: cannot initialize a variable of type 'int8_t *' (aka 'signed char *') with an rvalue of type 'const int8_t *' (aka 'const signed char *')
  811 |         int8_t * y_col = y + col * by;
      |                  ^       ~~~~~~~~~~~~

Using CLANG in v18.1.3 and CMAKE in v3.28.3 and GCC/G++ in v13.3.0 and Python in v3.12.3.

Needed to add "const":
811 | const int8_t * y_col = y + col * by;

Dominant language
C++
Stars
40.3k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

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.

More from microsoft/BitNet

All issues in microsoft/BitNet

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.