Closed tao-began closed 11 months ago
D:\a\package\package\tvm\src\tir\schedule./concrete_schedule.h:285: ValueError: The block no longer exists in the IRModule Stack trace not available when DMLC_LOG_STACK_TRACE is disabled at compile time. Traceback (most recent call last): File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\contrib\cc.py", line 323, in _windows_compile proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) File "D:\Program\Anaconda3\envs\mcl-win\lib\subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "D:\Program\Anaconda3\envs\mcl-win\lib\subprocess.py", line 1456, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Program\Anaconda3\envs\mcl-win\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Program\Anaconda3\envs\mcl-win\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\build.py", line 47, in main() File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\build.py", line 43, in main core.build_model_from_args(parsed_args) File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\core.py", line 923, in build_model_from_args build(mod, args) File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\core.py", line 762, in build ex.export_library(args.lib_path, args.export_kwargs) File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\relax\vm_build.py", line 146, in export_library return self.mod.export_library( File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\runtime\module.py", line 624, in export_library return fcompile(file_name, files, kwargs) File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\contrib\cc.py", line 89, in create_shared _windows_compile(output, objects, options) File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\contrib\cc.py", line 326, in _windows_compile raise RuntimeError( RuntimeError: Can not find the LLVM clang for Windows clang.exe).Make sure it's installed and the installation directory is in the %PATH% environment variable. Prebuilt binaries can be found at: https://llvm.org/
上面的报错,通过指定llvm和打开windows的WSL已解决 运行指令如下 python -m mlc_llm.build --model Llama-2-7b-chat-hf --target vulkan --quantization q4f16_1 --llvm-mingw llvm-mingw-20231114-ucrt-x86_64/x86_64-w64-mingw32
The actual error message is:
RuntimeError: Can not find the LLVM clang for Windows clang.exe)
Alternatively if you don’t like WSL, in CMD with conda, you may install clang via:
conda install -c conda-forge clangdev
@Tao-begd Feel free to close it if the problem is solved
🐛 Bug
ValueError: The block no longer exists in the IRModule Stack trace not available when DMLC_LOG_STACK_TRACE is disabled at compile time.
To Reproduce
Steps to reproduce the behavior: python -m mlc_llm.build --model Llama-2-7b-chat-hf --target vulkan --quantization q4f16_1
D:\a\package\package\tvm\src\tir\schedule./concrete_schedule.h:285: ValueError: The block no longer exists in the IRModule Stack trace not available when DMLC_LOG_STACK_TRACE is disabled at compile time. Traceback (most recent call last): File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\contrib\cc.py", line 323, in _windows_compile proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) File "D:\Program\Anaconda3\envs\mcl-win\lib\subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "D:\Program\Anaconda3\envs\mcl-win\lib\subprocess.py", line 1456, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Program\Anaconda3\envs\mcl-win\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Program\Anaconda3\envs\mcl-win\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\build.py", line 47, in
main()
File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\build.py", line 43, in main
core.build_model_from_args(parsed_args)
File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\core.py", line 923, in build_model_from_args
build(mod, args)
File "E:\code\mlc-llm-win\mlc-llm\mlc_llm\core.py", line 762, in build
ex.export_library(args.lib_path, args.export_kwargs)
File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\relax\vm_build.py", line 146, in export_library
return self.mod.export_library(
File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\runtime\module.py", line 624, in export_library
return fcompile(file_name, files, kwargs)
File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\contrib\cc.py", line 89, in create_shared
_windows_compile(output, objects, options)
File "D:\Program\Anaconda3\envs\mcl-win\lib\site-packages\tvm\contrib\cc.py", line 326, in _windows_compile
raise RuntimeError(
RuntimeError: Can not find the LLVM clang for Windows clang.exe).Make sure it's installed and the installation directory is in the %PATH% environment variable. Prebuilt binaries can be found at: https://llvm.org/
Expected behavior
Environment
conda
, source): condapip
, source): pippython -c "import tvm; print('\n'.join(f'{k}: {v}' for k, v in tvm.support.libinfo().items()))"
, applicable if you compile models): USE_NVTX: OFF USE_GTEST: AUTO SUMMARIZE: OFF USE_IOS_RPC: OFF USE_MSC: OFF USE_ETHOSU: CUDA_VERSION: NOT-FOUND USE_LIBBACKTRACE: AUTO DLPACK_PATH: 3rdparty/dlpack/include USE_TENSORRT_CODEGEN: OFF USE_THRUST: OFF USE_TARGET_ONNX: OFF USE_AOT_EXECUTOR: ON BUILD_DUMMY_LIBTVM: OFF USE_CUDNN: OFF USE_TENSORRT_RUNTIME: OFF USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR: OFF USE_CCACHE: AUTO USE_ARM_COMPUTE_LIB: OFF USE_CPP_RTVM: USE_OPENCL_GTEST: /path/to/opencl/gtest USE_MKL: OFF USE_PT_TVMDSOOP: OFF MLIR_VERSION: NOT-FOUND USE_CLML: OFF USE_STACKVM_RUNTIME: OFF USE_GRAPH_EXECUTOR_CUDA_GRAPH: OFF ROCM_PATH: /opt/rocm USE_DNNL: OFF USE_VITIS_AI: OFF USE_MLIR: OFF USE_RCCL: OFF USE_LLVM: llvm-config --link-static USE_VERILATOR: OFF USE_TF_TVMDSOOP: OFF USE_THREADS: ON USE_MSVC_MT: OFF BACKTRACE_ON_SEGFAULT: OFF USE_GRAPH_EXECUTOR: ON USE_NCCL: OFF USE_ROCBLAS: OFF GIT_COMMIT_HASH: 0c5a56a5408215b01c756cbbaa8336421a992a6a USE_VULKAN: ON USE_RUST_EXT: OFF USE_CUTLASS: OFF USE_CPP_RPC: OFF USE_HEXAGON: OFF USE_CUSTOM_LOGGING: OFF USE_UMA: OFF USE_FALLBACK_STL_MAP: OFF USE_SORT: ON USE_RTTI: ON GIT_COMMIT_TIME: 2023-11-16 19:18:47 -0500 USE_HEXAGON_SDK: /path/to/sdk USE_BLAS: none USE_ETHOSN: OFF USE_LIBTORCH: OFF USE_RANDOM: ON USE_CUDA: OFF USE_COREML: OFF USE_AMX: OFF BUILD_STATIC_RUNTIME: OFF USE_CMSISNN: OFF USE_KHRONOS_SPIRV: OFF USE_CLML_GRAPH_EXECUTOR: OFF USE_TFLITE: OFF USE_HEXAGON_GTEST: /path/to/hexagon/gtest PICOJSON_PATH: 3rdparty/picojson USE_OPENCL_ENABLE_HOST_PTR: OFF INSTALL_DEV: OFF USE_PROFILER: ON USE_NNPACK: OFF LLVM_VERSION: 17.0.5 USE_OPENCL: OFF COMPILER_RT_PATH: 3rdparty/compiler-rt RANG_PATH: 3rdparty/rang/include USE_SPIRV_KHR_INTEGER_DOT_PRODUCT: OFF USE_OPENMP: OFF USE_BNNS: OFF USE_CUBLAS: OFF USE_METAL: OFF USE_MICRO_STANDALONE_RUNTIME: OFF USE_HEXAGON_EXTERNAL_LIBS: OFF USE_ALTERNATIVE_LINKER: AUTO USE_BYODT_POSIT: OFF USE_HEXAGON_RPC: OFF USE_MICRO: OFF DMLC_PATH: 3rdparty/dmlc-core/include INDEX_DEFAULT_I64: ON USE_RELAY_DEBUG: OFF USE_RPC: ON USE_TENSORFLOW_PATH: none TVM_CLML_VERSION: USE_MIOPEN: OFF USE_ROCM: OFF USE_PAPI: OFF USE_CURAND: OFF TVM_CXX_COMPILER_PATH: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/bin/HostX64/x64/cl.exe HIDE_PRIVATE_SYMBOLS: OFFAdditional context