Unable to run setup_env.py
I have followed the instruction from https://github.com/microsoft/BitNet?tab=readme-ov-file#build-from-source but stuck at step to build the project shell log:
(bitnet-cpp) user@bitnet1:~/BitNet$ python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s
INFO:root:Compiling the code using CMake.
ERROR:root:Error occurred while running command: Command '['cmake', '--build', 'build', '--config', 'Release']' returned non-zero exit status 2., check details in logs/compile.log
(bitnet-cpp) user@bitnet1:~/BitNet$ cat logs/compile.log
[ 1%] Building C object 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o
cc: error: unrecognized command-line option ‘-Wunreachable-code-break’; did you mean ‘-Wunreachable-code’?
cc: error: unrecognized command-line option ‘-Wunreachable-code-return’; did you mean ‘-Wunreachable-code’?
gmake[2]: *** [3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/build.make:76: 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:759: 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
(bitnet-cpp) user@bitnet1:~/BitNet$ cmake --version
cmake version 3.25.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
(bitnet-cpp) user@bitnet1:~/BitNet$ python --version
Python 3.9.22
(bitnet-cpp) user@bitnet1:~/BitNet$ clang --version
Debian clang version 18.1.8 (++20240731024826+3b5b5c1ec4a3-1~exp1~20240731144843.145)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Same issue!
The solution is to use clang-19 as the compiler. Run:
export CC="clang-19"
export CXX="clang++-19"
Then try to build the project again:
python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s
Hope this helps solve your issue!
I still got the error.
Running on Ubuntu + ARM64 server
[ 1%] Building CXX object 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/__/__/__/__/src/ggml-bitnet-mad.cpp.o In file included from /home/thomas/BitNet/3rdparty/llama.cpp/ggml/src/./ggml-quants.h:4, from /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:5: /home/thomas/BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:154:16: warning: ISO C++ prohibits anonymous structs [-Wpedantic] 154 | struct { | ^ /home/thomas/BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:175:16: warning: ISO C++ prohibits anonymous structs [-Wpedantic] 175 | struct { | ^ /home/thomas/BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:196:16: warning: ISO C++ prohibits anonymous structs [-Wpedantic] 196 | struct { | ^ /home/thomas/BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:261:16: warning: ISO C++ prohibits anonymous structs [-Wpedantic] 261 | struct { | ^ /home/thomas/BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:294:16: warning: ISO C++ prohibits anonymous structs [-Wpedantic] 294 | struct { | ^ /home/thomas/BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:311:16: warning: ISO C++ prohibits anonymous structs [-Wpedantic] 311 | struct { | ^ /home/thomas/BitNet/src/ggml-bitnet-mad.cpp: In function ‘size_t quantize_i2_s(const float*, void*, int64_t, int64_t, const float*)’: /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:46:100: warning: unused parameter ‘quant_weights’ [-Wunused-parameter] 46 | size_t quantize_i2_s(const float * src, void * dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) { | ~~~~~~~~~~~~~~^~~~~~~~~~~~~ /home/thomas/BitNet/src/ggml-bitnet-mad.cpp: In function ‘void ggml_vec_dot_i2_i8_s(int, float*, size_t, const void*, size_t, const void*, size_t, int)’: /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:95:28: warning: cast from type ‘const void*’ to type ‘uint8_t*’ {aka ‘unsigned char*’} casts away qualifiers [-Wcast-qual] 95 | const uint8_t * x = (uint8_t *)vx; | ^~~~~~~~~~~~~ /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:96:28: warning: cast from type ‘const void*’ to type ‘int8_t*’ {aka ‘signed char*’} casts away qualifiers [-Wcast-qual] 96 | const int8_t * y = (int8_t *)vy; | ^~~~~~~~~~~~ /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:94:52: warning: unused parameter ‘bs’ [-Wunused-parameter] 94 | void ggml_vec_dot_i2_i8_s(int n, float * s, size_t bs, const void * vx, size_t bx, const void * vy, size_t by, int nrc) { | ~~~~~~~^~ /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:94:80: warning: unused parameter ‘bx’ [-Wunused-parameter] 94 | void ggml_vec_dot_i2_i8_s(int n, float * s, size_t bs, const void * vx, size_t bx, const void * vy, size_t by, int nrc) { | ~~~~~~~^~ /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:94:108: warning: unused parameter ‘by’ [-Wunused-parameter] 94 | void ggml_vec_dot_i2_i8_s(int n, float * s, size_t bs, const void * vx, size_t bx, const void * vy, size_t by, int nrc) { | ~~~~~~~^~ /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:94:116: warning: unused parameter ‘nrc’ [-Wunused-parameter] 94 | void ggml_vec_dot_i2_i8_s(int n, float * s, size_t bs, const void * vx, size_t bx, const void * vy, size_t by, int nrc) { | ~~~~^~~ during GIMPLE pass: vect /home/thomas/BitNet/src/ggml-bitnet-mad.cpp: In function ‘size_t quantize_i2_s(const float*, void*, int64_t, int64_t, const float*)’: /home/thomas/BitNet/src/ggml-bitnet-mad.cpp:46:8: internal compiler error: in vect_transform_reduction, at tree-vect-loop.cc:7457 46 | size_t quantize_i2_s(const float * src, void * dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) { | ^~~~~~~~~~~~~ 0xffff96a3773f __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0xffff96a37817 __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions. gmake[2]: *** [3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/build.make:135: 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/__/__/__/__/src/ggml-bitnet-mad.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:955: 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/all] Error 2 gmake: *** [Makefile:136: all] Error 2
clang-19 is still not activated, and the current compilation is still using gcc-13. Please try this command:
cmake -B build -DGGML_BITNET_ARM_TL1=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19
Let me know if you encounter any issues with this approach.
What is the general time on the whole build. I have old machine, Mac m1, trying to test BitNet here. The build is not moving further than Building with CMake step, even letting it run beyond 15-20 minutes..... Help me what to do
[ 0%] Building CXX object 3rdparty/llama.cpp/ggml/src/CMakeFiles/ggml.dir/////src/ggml-bitnet-lut.cpp.o In file included from /BitNet/src/ggml-bitnet-lut.cpp:9: In file included from /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-quants.h:4: /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:154:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct] 154 | struct { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:154:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:175:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct] 175 | struct { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:175:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:196:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct] 196 | struct { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:196:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:261:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct] 261 | struct { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:261:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:294:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct] 294 | struct { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:294:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:311:9: warning: anonymous structs are a GNU extension [-Wgnu-anonymous-struct] 311 | struct { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/./ggml-common.h:311:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types] In file included from /BitNet/src/ggml-bitnet-lut.cpp:10: /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:24:6: warning: no previous prototype for function 'per_tensor_quant' [-Wmissing-prototypes] 24 | void per_tensor_quant(int k, void* lut_scales_, void* b_) {{ | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:24:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 24 | void per_tensor_quant(int k, void* lut_scales_, void* b_) {{ | ^ | static /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:53:6: warning: no previous prototype for function 'partial_max_reset' [-Wmissing-prototypes] 53 | void partial_max_reset(void* lut_scales_) {{ | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 53 | void partial_max_reset(void* lut_scales_) {{ | ^ | static /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:287:9: warning: no previous prototype for function 'qgemm_lut_3200_8640' [-Wmissing-prototypes] 287 | int32_t qgemm_lut_3200_8640(void* A, void* LUT, void* Scales, void* LUT_Scales, void* C) { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:287:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 287 | int32_t qgemm_lut_3200_8640(void* A, void* LUT, void* Scales, void* LUT_Scales, void* C) { | ^ | static /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:299:2: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi] 299 | }; | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:421:9: warning: no previous prototype for function 'qgemm_lut_3200_3200' [-Wmissing-prototypes] 421 | int32_t qgemm_lut_3200_3200(void* A, void* LUT, void* Scales, void* LUT_Scales, void* C) { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:421:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 421 | int32_t qgemm_lut_3200_3200(void* A, void* LUT, void* Scales, void* LUT_Scales, void* C) { | ^ | static /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:433:2: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi] 433 | }; | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:539:9: warning: no previous prototype for function 'qgemm_lut_8640_3200' [-Wmissing-prototypes] 539 | int32_t qgemm_lut_8640_3200(void* A, void* LUT, void* Scales, void* LUT_Scales, void* C) { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:539:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 539 | int32_t qgemm_lut_8640_3200(void* A, void* LUT, void* Scales, void* LUT_Scales, void* C) { | ^ | static /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:551:2: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi] 551 | }; | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:584:54: warning: 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] 584 | if (!(is_type_supported(tensor->type) && tensor->backend == GGML_BACKEND_TYPE_CPU && tensor->extra == nullptr)) { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../include/ggml.h:585:9: note: 'backend' has been explicitly marked deprecated here 585 | GGML_DEPRECATED(enum ggml_backend_type backend, "use the buffer type to find the storage location of the tensor"); | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../include/ggml.h:192:61: note: expanded from macro 'GGML_DEPRECATED' 192 | # define GGML_DEPRECATED(func, hint) func attribute((deprecated(hint))) | ^ In file included from /BitNet/src/ggml-bitnet-lut.cpp:10: /BitNet/3rdparty/llama.cpp/ggml/src/../../../../include/bitnet-lut-kernels.h:591:15: warning: unused variable 'scales_size' [-Wunused-variable] 591 | const int scales_size = 1; | ^~~~~~~~~~~ /BitNet/src/ggml-bitnet-lut.cpp:62:15: warning: 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] 62 | src0->backend == GGML_BACKEND_TYPE_CPU) { | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../include/ggml.h:585:9: note: 'backend' has been explicitly marked deprecated here 585 | GGML_DEPRECATED(enum ggml_backend_type backend, "use the buffer type to find the storage location of the tensor"); | ^ /BitNet/3rdparty/llama.cpp/ggml/src/../include/ggml.h:192:61: note: expanded from macro 'GGML_DEPRECATED' 192 | # define GGML_DEPRECATED(func, hint) func attribute((deprecated(hint))) | ^ /BitNet/src/ggml-bitnet-lut.cpp:74:15: warning: unused variable 'bits' [-Wunused-variable] 74 | const int bits = ggml_bitnet_get_type_bits(src0->type); | ^~~~ /BitNet/src/ggml-bitnet-lut.cpp:70:131: warning: unused parameter 'dst' [-Wunused-parameter] 70 | size_t ggml_bitnet_mul_mat_get_wsize(const struct ggml_tensor * src0, const struct ggml_tensor * src1, const struct ggml_tensor * dst) { | ^
I am getting this output in the compile.log file and no possible update to running the setup_env.py
(bitnet-cpp) (venv) vscode ➜ /workspaces/python/BitNet (main) $ clang --version clang version 19.1.7 (https://github.com/conda-forge/clangdev-feedstock 92082c0fc9898ebe2ce39f2f4b4266d8dbc4acd2) Target: aarch64-conda-linux-gnu Thread model: posix InstalledDir: /home/vscode/miniconda3/envs/bitnet-cpp/bin (bitnet-cpp) (venv) vscode ➜ /workspaces/python/BitNet (main) $ cmake --version cmake version 4.0.1
CMake suite maintained and supported by Kitware (kitware.com/cmake). (bitnet-cpp) (venv) vscode ➜ /workspaces/python/BitNet (main) $ python --version Python 3.9.22
I am getting similar errors, having issues running setup_env.py
(bitnet-cpp) (venv) vscode ➜ /workspaces/python/BitNet (main) $ python setup_env.py -md models/BitNet-b1.58-2B-4T -q i2_s INFO:root:Compiling the code using CMake. ERROR:root:Error occurred while running command: Command '['cmake', '-B', 'build', '-DBITNET_ARM_TL1=ON']' returned non-zero exit status 1., check details in logs/generate_build_files.log
generate_build_files.log
-- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): The CMAKE_CXX_COMPILER:
clang++-19
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
Ok so after a few intense hours, I have finally got it to run in a Dev Container successfully. I have also went further to create the scripts necessary to build the Dev Container which can be accessed here:
https://github.com/yhrchan/bitnet-dev-container.git
Just FYI, I am running this on a MacBook Pro M4 Pro and the BitNet-b1.58-2B-4T runs quite fast in the Dev Container. Hope this helps!
I'm also stuck at building the project (Windows 10).
What I already did: cmake -B build -DGGML_BITNET_ARM_TL1=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19
Is there some environment variable I need to configure for clang-19 on Windows?
compile.log below:
MSBuild version 17.14.4+fc19b0515 for .NET Framework
1>Checking Build System build_info.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\build_info.dir\Release\build_info.lib In file included from C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp:10: C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1127,54): warning : 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(585,9): message : 'backend' has been explicitly marked deprecated here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(194,52): message : expanded from macro 'GGML_DEPRECATED' [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp(137,15): warning : 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(585,9): message : 'backend' has been explicitly marked deprecated here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(194,52): message : expanded from macro 'GGML_DEPRECATED' [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] In file included from C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp:10: C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(279,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1046,17): message : in instantiation of function template specialization 'three_qgemm_lut_3200_8640<1>' requested here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(280,19): warning : unused variable 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(281,19): warning : unused variable 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(523,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1078,17): message : in instantiation of function template specialization 'three_qgemm_lut_3200_3200<1>' requested here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(524,19): warning : unused variable 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(525,19): warning : unused variable 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(767,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1110,17): message : in instantiation of function template specialization 'three_qgemm_lut_8640_3200<1>' requested here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(768,19): warning : unused variable 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(769,19): warning : unused variable 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(19,13): warning : unused function 'aligned_free' [-Wunused-function] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(276,13): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(657,16): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(520,13): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(901,16): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(764,13): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] Auto build dll exports ggml.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\ggml.dll Auto build dll exports llama.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama.dll llava.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\llava\llava.dir\Release\llava.lib sha1.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha1.dir\Release\sha1.lib sha256.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha256.dir\Release\sha256.lib xxhash.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\xxhash.dir\Release\xxhash.lib C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(445,32): error : no type named 'system_clock' in namespace 'std::chrono' [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(447,11): error : 'clock' is not a class, namespace, or enumeration [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(447,44): error : 'clock' is not a class, namespace, or enumeration [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(448,30): error : 'clock' is not a class, namespace, or enumeration [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] llama-gguf.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-gguf.exe llama-gguf-hash.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-gguf-hash.exe llama-quantize-stats.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-quantize-stats.exe llama-simple.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-simple.exe llava_shared.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llava_shared.dll llava_static.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\llava\Release\llava_static.lib
I'm also stuck at building the project (Windows 10).
What I already did: cmake -B build -DGGML_BITNET_ARM_TL1=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19
Is there some environment variable I need to configure for clang-19 on Windows?
compile.log below:
MSBuild version 17.14.4+fc19b0515 for .NET Framework
1>Checking Build System build_info.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\build_info.dir\Release\build_info.lib In file included from C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp:10: C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1127,54): warning : 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(585,9): message : 'backend' has been explicitly marked deprecated here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(194,52): message : expanded from macro 'GGML_DEPRECATED' [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp(137,15): warning : 'backend' is deprecated: use the buffer type to find the storage location of the tensor [-Wdeprecated-declarations] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(585,9): message : 'backend' has been explicitly marked deprecated here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(194,52): message : expanded from macro 'GGML_DEPRECATED' [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] In file included from C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp:10: C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(279,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1046,17): message : in instantiation of function template specialization 'three_qgemm_lut_3200_8640<1>' requested here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(280,19): warning : unused variable 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(281,19): warning : unused variable 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(523,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1078,17): message : in instantiation of function template specialization 'three_qgemm_lut_3200_3200<1>' requested here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(524,19): warning : unused variable 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(525,19): warning : unused variable 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(767,19): warning : unused variable 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1110,17): message : in instantiation of function template specialization 'three_qgemm_lut_8640_3200<1>' requested here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(768,19): warning : unused variable 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(769,19): warning : unused variable 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(19,13): warning : unused function 'aligned_free' [-Wunused-function] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(276,13): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(657,16): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(520,13): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(901,16): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(764,13): warning : loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] Auto build dll exports ggml.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\ggml.dll Auto build dll exports llama.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama.dll llava.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\llava\llava.dir\Release\llava.lib sha1.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha1.dir\Release\sha1.lib sha256.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha256.dir\Release\sha256.lib xxhash.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\xxhash.dir\Release\xxhash.lib C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(445,32): error : no type named 'system_clock' in namespace 'std::chrono' [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(447,11): error : 'clock' is not a class, namespace, or enumeration [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(447,44): error : 'clock' is not a class, namespace, or enumeration [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(448,30): error : 'clock' is not a class, namespace, or enumeration [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26): message : 'clock' declared here [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] llama-gguf.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-gguf.exe llama-gguf-hash.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-gguf-hash.exe llama-quantize-stats.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-quantize-stats.exe llama-simple.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-simple.exe llava_shared.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llava_shared.dll llava_static.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\llava\Release\llava_static.lib
in windows, if your cpu is x86, you should use the command: cmake -B build -DGGML_BITNET_X86_TL2=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19
我还陷入了构建项目 (Windows 10) 的困境。
我已经做了什么: cmake -B build -DGGML_BITNET_ARM_TL1=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19
我需要为 Windows 上的 clang-19 配置一些环境变量吗?
compile.log如下:
适用于 .NET Framework 的 MSBuild 版本 17.14.4+fc19b0515
1>检查构建系统build_info.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\build_info.dir\Release\build_info.lib 在 C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp:10 包含的文件中:C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1127,54):警告:“backend”已弃用:使用缓冲区类型查找张量 [-Wdeprecated-declarations] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(585,9):消息:“后端”已在此处明确标记为已弃用 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(194,52):消息:从宏“GGML_DEPRECATED”扩展 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp(137,15):警告:“后端”已弃用:使用缓冲区类型查找张量的存储位置 [-Wdeprecated-declarations] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(585,9):消息:“后端”已在此处明确标记为已弃用 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src..\include\ggml.h(194,52):消息:从宏“GGML_DEPRECATED”扩展 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] 在C:\Users\pstef\source\repos\bitnet\src\ggml-bitnet-lut.cpp:10包含的文件中:C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(279,19):警告:未使用的变量“vec_sign_mask”[-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1046,17):消息:在此处请求的函数模板专用化“three_qgemm_lut_3200_8640<1>”实例化中 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(280,19):警告:未使用的变量 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(281,19):警告:未使用的变量 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(523,19):警告:未使用的变量 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1078,17):消息:在函数模板 specializati 的实例化在此处请求的“three_qgemm_lut_3200_3200<1>”上 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(524,19):警告:未使用的变量 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(525,19):警告:未使用的变量 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(767,19):警告:未使用的变量 'vec_sign_mask' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(1110,17):消息:在函数模板专用化“three_qgemm_lut_8640_3200<1>”的实例化中,此处请求 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj]C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(768,19):警告:未使用的变量 'vec_zero' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(769,19):警告:未使用的变量 'vec_one' [-Wunused-variable] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(19,13):警告:未使用的函数 'aligned_free' [-Wunused-function] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(276,13):警告:循环未展开:优化器无法执行请求的转换;转换可能被禁用或指定为不受支持的转换顺序的一部分 [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(657,16):警告:循环未展开:优化器无法执行请求的转换;转换可能被禁用或指定为不受支持的转换顺序的一部分 [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(520,13):警告:循环未展开:优化器无法执行请求的转换;转换可能被禁用或指定为不受支持的转换顺序的一部分 [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(901,16):警告:循环未展开:优化器无法执行请求的转换;转换可能被禁用或指定为不受支持的转换顺序的一部分 [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\ggml\src........\include\bitnet-lut-kernels.h(764,13):警告:循环未展开:优化器无法执行请求的转换;转换可能被禁用或指定为不受支持的转换顺序的一部分 [-Wpass-failed=transform-warning] [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\ggml\src\ggml.vcxproj] 自动生成 dll 导出 ggml.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\ggml.dll 自动生成 dll 导出 llama.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama.dll llava.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\llava\llava.dir\Release\llava.lib sha1.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha1.dir\Release\sha1.lib sha256.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\sha256.dir\Release\sha256.libxxhash.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\gguf-hash\xxhash.dir\Release\xxhash.lib C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(445,32):错误:命名空间“std::chrono”中没有名为“system_clock”的类型 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(447,11):错误:“时钟”不是类、命名空间或枚举 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26):消息:此处声明了“时钟” [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(447,44):错误:“时钟”不是类、命名空间或枚举 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26):消息:此处声明了“时钟” [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]C:\Users\pstef\source\repos\bitnet\3rdparty\llama.cpp\common\common.cpp(448,30):错误:“时钟”不是类、命名空间或枚举 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\time.h(144,26):消息:“时钟”在此处声明 [C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\common\common.vcxproj]llama-gguf.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-gguf.exe llama-gguf-hash.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-gguf-hash.exe llama-quantize-stats.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-quantize-stats.exe llama-simple.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llama-simple.exe llava_shared.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\bin\Release\llava_shared.dll llava_static.vcxproj -> C:\Users\pstef\source\repos\BitNet\build\3rdparty\llama.cpp\examples\llava\Release\llava_static.lib
Hi,did you solve this issue?
Here's what worked for me(Windows):
Follow the instructions given in the installation section of the readme file:
For Windows users, install Visual Studio 2022. In the installer, toggle on at least the following options(this also automatically installs the required additional tools like CMake):
Desktop-development with C++ C++-CMake Tools for Windows Git for Windows C++-Clang Compiler for Windows MS-Build Support for LLVM-Toolset (clang)
Deleting the old build:
rmdir /s /q build
then run the following command:
cmake -G "Visual Studio 17 2022" -T ClangCL -DBITNET_X86_TL2=ON -B build
Let me know if this solves the problem.