make error
make Error log:
/tmp/ccLXLGtH.s: Assembler messages:
/tmp/ccLXLGtH.s:21346: Error: symbol `_ZZN8inferllm3opt24vec_vec_dot_q40_with_q80EiPKvS2_E19__PRETTY_FUNCTION__' is already defined
/tmp/ccLXLGtH.s:21351: Error: symbol `_ZZN8inferllm3opt24vec_vec_dot_q40_with_q80EiPKvS2_E19__PRETTY_FUNCTION__' is already defined
/tmp/ccLXLGtH.s:21381: Error: symbol `_ZZN8inferllm3opt19dequantize_row_q4_0EPKvPfiE19__PRETTY_FUNCTION__' is already defined
make[2]: *** [CMakeFiles/InferLLM.dir/src/kern/optimized/x86/kernel.cpp.o] Error 1
make[1]: *** [CMakeFiles/InferLLM.dir/all] Error 2
I also meet the error,but I cant fix it,it seems the compiler(gcc) bug,I don't know how to fix it
I also meet the error,but I cant fix it,it seems the compiler(gcc) bug,I don't know how to fix it
Can we try __func__ or __FUNCTION__ or something else? The error should come from INFER_ASSERT.
I also meet the error,but I cant fix it,it seems the compiler(gcc) bug,I don't know how to fix it
Can we try
__func__or__FUNCTION__or something else? The error should come fromINFER_ASSERT.
Can you explain in more detail, do you mean replace the __PRETTY_FUNCTION__ with __FUNCTION__ in INFER_ASSERT?
I also meet the error,but I cant fix it,it seems the compiler(gcc) bug,I don't know how to fix it
Can we try
__func__or__FUNCTION__or something else? The error should come fromINFER_ASSERT.Can you explain in more detail, do you mean replace the
__PRETTY_FUNCTION__with__FUNCTION__inINFER_ASSERT?
Yep. I dont think that compiler will generate the symbol without any reference of itself.
I try it, but it does not work. I think maybe the INFER_ATTRIBUTE_TARGET("avx2") and INFER_ATTRIBUTE_TARGET("avx") function result the duplicate definition,comment one of them there is no error when
compile.
INFER_ATTRIBUTE_TARGET
Then this is a bug of the compiler. I'll try to make a minimal reproducible example, and report the bug.
FYI, a blog post explains this: https://maskray.me/blog/2023-02-05-function-multi-versioning
As the post say, it is detection on the fly. Maybe we could use https://github.com/google/cpu_features to archive the same result without using gcc magic __attribute__.
I try it, but it does not work. I think maybe the
INFER_ATTRIBUTE_TARGET("avx2")andINFER_ATTRIBUTE_TARGET("avx")function result the duplicate definition,comment one of them there is no error when compile.
What is the version of your compiler? Can you show me gcc -v?
I try it, but it does not work. I think maybe the
INFER_ATTRIBUTE_TARGET("avx2")andINFER_ATTRIBUTE_TARGET("avx")function result the duplicate definition,comment one of them there is no error when compile.What is the version of your compiler? Can you show me
gcc -v?
gcc (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
I can't find the perfect method to fix this now, I just use the macro to fix the problem
I try it, but it does not work. I think maybe the
INFER_ATTRIBUTE_TARGET("avx2")andINFER_ATTRIBUTE_TARGET("avx")function result the duplicate definition,comment one of them there is no error when compile.
hi, I try it "comment one of them", but get error"error: redefinition of ‘float inferllm::opt::vec_vec_dot_q40_with_q80(int, const void*, const void*)’", I comment in optimized.h and quantize.h. is it right?
if it is not necessary, you can comment it, and build. I have fixed it with the macro of (AVX2) and (AVX), dose not work in your machine?
if it is not necessary, you can comment it, and build. I have fixed it with the macro of (AVX2) and (AVX), dose not work in your machine?
does not work. I comment in "src/kern/optimized/x86/optimized.h" and "src/kern/optimized/x86/queantize.h"
I solve this problem, by comment AVX function. thanks @chenqy4933