BitNet icon indicating copy to clipboard operation
BitNet copied to clipboard

在preset_kernels目录下,bitnet-lut-kernels-tl1.h中,代码是否有错?int16x8_t和int8x16_t 两个数是否可以直接相加?具体含义是什么?

Open dujifeng opened this issue 1 year ago • 2 comments

int16x8_t vec_c[4];
int8x16x2_t vec_v_left_0 = vzipq_s8(vec_v_0_left_tmp1, vec_v_0_left_tmp0); int8x16x2_t vec_v_right_0 = vzipq_s8(vec_v_0_right_tmp1, vec_v_0_right_tmp0); vec_c[0] += vec_v_left_0.val[0]; vec_c[0] += vec_v_right_0.val[0]; vec_c[1] += vec_v_left_0.val[1]; vec_c[1] += vec_v_right_0.val[1];

dujifeng avatar Feb 19 '25 04:02 dujifeng

Hello, @dujifeng , I think this problem means some data type inconsistencies. I submitted this #161 issue. I am not native of Chinese language. Can you write your comments in English?

y-vectorfield avatar Feb 19 '25 06:02 y-vectorfield

You are right. I just found the error and raise this issue. By the way, do you understand the code implementation of look-up-table generation and the look up table process in matrix mul. The coorspond funcs are ggml_preprocessor() and ggml_qgemm_lut() in this project.

dujifeng avatar Feb 20 '25 10:02 dujifeng