Skip to content

Commit 496fb2a

Browse files
committed
fix: add const qualifier to y_col pointer in ggml-bitnet-mad.cpp
On Windows with ClangCL, the code at line 811 declares int8_t * but receives a const int8_t *, causing compilation error: cannot initialize a variable of type 'int8_t *' with an rvalue of type 'const int8_t *' This fix adds the const qualifier to match the actual pointer type being assigned.
1 parent 01eb415 commit 496fb2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ggml-bitnet-mad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ void ggml_vec_dot_i2_i8_s_Nx1(int n, float * s, size_t bs, const void * vx, size
808808
accu[iy] = _mm256_setzero_si256();
809809
}
810810

811-
int8_t * y_col = y + col * by;
811+
const int8_t * y_col = y + col * by;
812812

813813
for (int i = 0; i < group32_num; i++) {
814814
const uint8_t *px = x + i * 1024;

0 commit comments

Comments
 (0)