Closed byjlw closed 1 week ago
Same
please make sure that in your build environment cmake is installed+in the path. also assert that it matches the required version from readme (3.22)
there is a issue https://github.com/microsoft/BitNet/issues/34 + PR for this problem already.
installed latest version of cmake and Clang
(.venv) PS C:\Users\jesse\Documents\source\BitNet> python setup_env.py --hf-repo HF1BitLLM/Llama3-8B-1.58-100B-tokens -q i2_s
INFO:root:Compiling the code using CMake.
ERROR:root:Error occurred while running command: Command '['cmake', '-B', 'build', '-DBITNET_X86_TL2=ON', '-T', 'ClangCL']' returned non-zero exit status 1., check details in logs\generate_build_files.log
Log file entry
CMake Error at CMakeLists.txt:2 (project):
Generator
NMake Makefiles
does not support toolset specification, but toolset
ClangCL
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
i first start the Developer Command Prompt for VS 2022 then i check cmake and clang (see screenshot)
then i start conda conda activate bitnet-cpp
From your logoutput Command '['cmake', '-B', 'build', '-DBITNET_X86_TL2=ON', '-T', 'ClangCL']' I can see that you are using ClangCL ClangCL is the Clang compiler with a command-line interface compatible with Microsoft’s cl.exe (MSVC) compiler, which allows it to be used in environments typically meant for Visual Studio.
So please make sure that the Visual Studio clang compiler version is visible and installed:
(bitnet-cpp) C:\work\microsoft\BitNet>clang --version clang version 17.0.3 Target: i686-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\Llvm\bin
Hope you can resolve the error with this information
Wait this project only works if you are using Visual Studio 2022? It doesn't work at all outside of it, like VSCode?
it is C/C++ code. You have to build and compile it with a compiler (e.g. clang or clang from Visual Studio).
you should check the README :-) https://github.com/microsoft/BitNet?tab=readme-ov-file#installation
Let me clarify. Do i have to buy Visual studio Pro to use this library or can i use clang and CMAKE directly? I read the readme. I don't want to buy visual studio and have clang and CMAKE installed on my machine, so i can't follow the steps to the T.
I used the community version of visual studio, needed to add 2 extensions to enable building, then used conda and followed the readme.
I got similar errors to you when I tried using vs code insiders & venv
Now it works for me
(.venv) PS C:\Users\jesse\Documents\source\BitNet> python setup_env.py --hf-repo HF1BitLLM/Llama3-8B-1.58-100B-tokens -q i2_s