Closed karingijs2727 closed 1 year ago
How to build in Linux: export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH Run train.py
How to build in win: Install VS2022 build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe select Desktop C++). Reinstall CUDA 11.7 (install VC++ extensions). Run train.py in "x64 native tools command prompt" (in your start menu)
Hello i have this error below and i don't know why and how to fix when i try to run train file to train the model this error comes im using VSC and local env
Using C:\Users\hayda\AppData\Local\torch_extensions\torch_extensions\Cache\py311_cu117 as PyTorch extensions root... d:\VSC_PROJECTS\RWKV-3.venv\Lib\site-packages\torch\utils\cpp_extension.py:359: UserWarning: Error checking compiler version for cl: [WinError 2] Het systeem kan het opgegeven bestand niet vinden warnings.warn(f'Error checking compiler version for {compiler}: {error}') Detected CUDA files, patching ldflags Emitting ninja build file C:\Users\hayda\AppData\Local\torch_extensions\torch_extensions\Cache\py311_cu117\wkv\build.ninja... INFO: Could not find files for the given pattern(s). Traceback (most recent call last): File "d:\VSC_PROJECTS\RWKV-3.venv\train.py", line 194, in
from src.model import GPT, GPTConfig
File "d:\VSC_PROJECTS\RWKV-3.venv\src\model.py", line 44, in
wkv_cuda = load(name="wkv", sources=["cuda/wkv_op.cpp", "cuda/wkv_cuda.cu"],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\VSC_PROJECTS\RWKV-3.venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1284, in load
return _jit_compile(
^^^^^^^^^^^^^
File "d:\VSC_PROJECTS\RWKV-3.venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1509, in _jit_compile
_write_ninja_file_and_build_library(
File "d:\VSC_PROJECTS\RWKV-3.venv\Lib\site-packages\torch\utils\cpp_extension.py", line 1611, in _write_ninja_file_and_build_library
_write_ninja_file_to_build_library(
File "d:\VSC_PROJECTS\RWKV-3.venv\Lib\site-packages\torch\utils\cpp_extension.py", line 2048, in _write_ninja_file_to_build_library
_write_ninja_file(
File "d:\VSC_PROJECTS\RWKV-3.venv\Lib\site-packages\torch\utils\cpp_extension.py", line 2188, in _write_ninja_file
cl_paths = subprocess.check_output(['where',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python.3.11.3\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python.3.11.3\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.
from src.trainer import Trainer, TrainerConfig File "d:\VSC_PROJECTS\RWKV-3.venv\src\trainer.py", line 51, in