vllm
vllm copied to clipboard
[Installation]: Failed to build form source code. Python=3.9 CUDA=12.1
Your current environment
The output of `python collect_env.py`
Collecting environment information...
PyTorch version: 2.1.0
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35
Python version: 3.9.19 (main, Mar 21 2024, 17:11:28) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-102-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.1.66
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA GeForce RTX 3090
GPU 1: NVIDIA GeForce RTX 3090
GPU 2: NVIDIA GeForce RTX 3090
GPU 3: NVIDIA GeForce RTX 3090
GPU 4: NVIDIA GeForce RTX 3090
GPU 5: NVIDIA GeForce RTX 3090
GPU 6: NVIDIA GeForce RTX 3090
GPU 7: NVIDIA GeForce RTX 3090
Nvidia driver version: 530.41.03
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 56
On-line CPU(s) list: 0-55
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
CPU family: 6
Model: 79
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 2
Stepping: 1
CPU max MHz: 3300.0000
CPU min MHz: 1200.0000
BogoMIPS: 4800.34
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap intel_pt xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts md_clear flush_l1d
Virtualization: VT-x
L1d cache: 896 KiB (28 instances)
L1i cache: 896 KiB (28 instances)
L2 cache: 7 MiB (28 instances)
L3 cache: 70 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-13,28-41
NUMA node1 CPU(s): 14-27,42-55
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.1.0
[pip3] torchaudio==2.1.0
[pip3] torchvision==0.16.0
[pip3] triton==2.1.0
[conda] blas 1.0 mkl defaults
[conda] ffmpeg 4.3 hf484d3e_0 pytorch
[conda] libjpeg-turbo 2.0.0 h9bf148f_0 pytorch
[conda] mkl 2023.1.0 h213fc3f_46344 defaults
[conda] mkl-service 2.4.0 py39h5eee18b_1 defaults
[conda] mkl_fft 1.3.8 py39h5eee18b_0 defaults
[conda] mkl_random 1.2.4 py39hdb19cb5_0 defaults
[conda] numpy 1.26.4 py39h5f9d8c6_0 defaults
[conda] numpy-base 1.26.4 py39hb5e798b_0 defaults
[conda] pytorch 2.1.0 py3.9_cuda12.1_cudnn8.9.2_0 pytorch
[conda] pytorch-cuda 12.1 ha16c6d3_5 pytorch
[conda] pytorch-mutex 1.0 cuda pytorch
[conda] torchaudio 2.1.0 py39_cu121 pytorch
[conda] torchtriton 2.1.0 py39 pytorch
[conda] torchvision 0.16.0 py39_cu121 pytorchROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: N/A
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7 CPU Affinity NUMA Affinity
GPU0 X PIX PIX PIX PHB PHB PHB PHB 0-13,28-41 0
GPU1 PIX X PIX PIX PHB PHB PHB PHB 0-13,28-41 0
GPU2 PIX PIX X PIX PHB PHB PHB PHB 0-13,28-41 0
GPU3 PIX PIX PIX X PHB PHB PHB PHB 0-13,28-41 0
GPU4 PHB PHB PHB PHB X PIX PIX PIX 0-13,28-41 0
GPU5 PHB PHB PHB PHB PIX X PIX PIX 0-13,28-41 0
GPU6 PHB PHB PHB PHB PIX PIX X PIX 0-13,28-41 0
GPU7 PHB PHB PHB PHB PIX PIX PIX X 0-13,28-41 0
Legend:
X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks
How you are installing vllm
pip install --editable
Building wheels for collected packages: vllm
Building editable for vllm (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building editable for vllm (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [181 lines of output]
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
running editable_wheel
creating /tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info
writing /tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info/dependency_links.txt
writing requirements to /tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info/requires.txt
writing top-level names to /tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info/top_level.txt
writing manifest file '/tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm.egg-info/SOURCES.txt'
creating '/tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm-0.4.0.post1.dist-info'
creating /tmp/pip-wheel-meb37ahg/.tmp-1v6hoy9z/vllm-0.4.0.post1.dist-info/WHEEL
running build_py
running build_ext
Using MAX_JOBS=6 as the number of jobs.
-- The CXX compiler identification is GNU 12.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: RelWithDebInfo
-- Target device: cuda
-- Found Python: /home/jhwu/anaconda3/envs/myvllm/bin/python (found version "3.9.19") found components: Interpreter Development.Module
-- Found python matching: /home/jhwu/anaconda3/envs/myvllm/bin/python.
-- Found CUDA: /usr/local/cuda (found version "12.1")
-- The CUDA compiler identification is NVIDIA 12.1.66
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found CUDAToolkit: /usr/local/cuda/include (found version "12.1.66")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Caffe2: CUDA detected: 12.1
-- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda
-- Caffe2: Header version is: 12.1
-- /usr/local/cuda/lib64/libnvrtc.so shorthash is d540eb83
-- USE_CUDNN is set to 0. Compiling without cuDNN support
-- USE_CUSPARSELT is set to 0. Compiling without cuSPARSELt support
-- Autodetected CUDA architecture(s): 8.6
-- Added CUDA NVCC flags for: -gencode;arch=compute_86,code=sm_86
CMake Warning at /tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
CMakeLists.txt:67 (find_package)
-- Found Torch: /tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/lib/libtorch.so
-- CUDA supported arches: 7.0;7.5;8.0;8.6;8.9;9.0
-- CUDA target arches: 86-real
-- Punica target arches: 86-real
-- Enabling C extension.
-- Enabling moe extension.
-- Configuring done (10.5s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/tmp3bv_up2q.build-temp
Using MAX_JOBS=6 as the number of jobs.
[1/3] Building CXX object CMakeFiles/_moe_C.dir/csrc/moe/moe_ops.cpp.o
[2/3] Building CUDA object CMakeFiles/_moe_C.dir/csrc/moe/topk_softmax_kernels.cu.o
FAILED: CMakeFiles/_moe_C.dir/csrc/moe/topk_softmax_kernels.cu.o
/usr/local/cuda/bin/nvcc -forward-unknown-to-host-compiler -DTORCH_EXTENSION_NAME=_moe_C -DUSE_C10D_GLOO -DUSE_C10D_NCCL -DUSE_DISTRIBUTED -DUSE_RPC -DUSE_TENSORPIPE -D_moe_C_EXPORTS -I/home/jhwu/MiniCPM/vllm/csrc -isystem /home/jhwu/anaconda3/envs/myvllm/include/python3.9 -isystem /tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include -isystem /tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -isystem /usr/local/cuda/include -DONNX_NAMESPACE=onnx_c2 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -O2 -g -DNDEBUG -std=c++17 "--generate-code=arch=compute_86,code=[sm_86]" -Xcompiler=-fPIC --expt-relaxed-constexpr -DENABLE_FP8_E5M2 --threads=1 -D_GLIBCXX_USE_CXX11_ABI=0 -MD -MT CMakeFiles/_moe_C.dir/csrc/moe/topk_softmax_kernels.cu.o -MF CMakeFiles/_moe_C.dir/csrc/moe/topk_softmax_kernels.cu.o.d -x cu -c /home/jhwu/MiniCPM/vllm/csrc/moe/topk_softmax_kernels.cu -o CMakeFiles/_moe_C.dir/csrc/moe/topk_softmax_kernels.cu.o
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h: In function ‘typename pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type>::cast_op_type<T> pybind11::detail::cast_op(make_caster<T>&)’:
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:120: error: expected template-name before ‘<’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:120: error: expected identifier before ‘<’ token
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:123: error: expected primary-expression before ‘>’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:126: error: expected primary-expression before ‘)’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 155, in run
self._create_wheel_file(bdist_wheel)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 357, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 280, in _run_build_commands
self._run_build_subcommands()
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 307, in _run_build_subcommands
self.run_command(name)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 91, in run
_build_ext.run(self)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "<string>", line 187, in build_extensions
File "/home/jhwu/anaconda3/envs/myvllm/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', '_moe_C', '-j', '6']' returned non-zero exit status 1.
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py:988: _DebuggingTips: Problem in editable installation.
!!
********************************************************************************
An error happened while installing `vllm` in editable mode.
The following steps are recommended to help debug this problem:
- Try to install the project normally, without using the editable mode.
Does the error still persist?
(If it does, try fixing the problem before attempting the editable mode).
- If you are using binary extensions, make sure you have all OS-level
dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
- Try the latest version of setuptools (maybe the error was already fixed).
- If you (or your project dependencies) are using any setuptools extension
or customization, make sure they support the editable mode.
After following the steps above, if the problem still persists and
you think this is related to how setuptools handles editable installations,
please submit a reproducible example
(see https://stackoverflow.com/help/minimal-reproducible-example) to:
https://github.com/pypa/setuptools/issues
See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
********************************************************************************
!!
cmd_obj.run()
Traceback (most recent call last):
File "/home/jhwu/anaconda3/envs/myvllm/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/jhwu/anaconda3/envs/myvllm/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/jhwu/anaconda3/envs/myvllm/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 273, in build_editable
return hook(wheel_directory, config_settings, metadata_directory)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 443, in build_editable
return self._build_with_temp_dir(
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 382, in <module>
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 155, in run
self._create_wheel_file(bdist_wheel)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 357, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 280, in _run_build_commands
self._run_build_subcommands()
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/editable_wheel.py", line 307, in _run_build_subcommands
self.run_command(name)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 91, in run
_build_ext.run(self)
File "/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "<string>", line 187, in build_extensions
File "/home/jhwu/anaconda3/envs/myvllm/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', '_moe_C', '-j', '6']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building editable for vllm
Failed to build vllm
ERROR: Could not build wheels for vllm, which is required to install pyproject.toml-based projects
Can you try to follow pytorch and build a cuda extension? https://pytorch.org/tutorials/advanced/cpp_extension.html
Seems like your environment is broken.
/home/jhwu/anaconda3/envs/myvllm/bin/python
Your python interpreter is here
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/lib/libtorch.so
But it finds torch in some strange path.
Sorry, I'm not familar with CUDA and don't know how to compile /csrc/moe/topk_softmax_kernels.cu.o.
Initially, I thought the strange torch path is caused by not installing torch before building vlllm or the torch is installed with conda not pip. Therefor, I tried to install torch=2.2.1+cu121 with pip follwing the pytorch's official guidence in advance. However, it seeems the script still finds torch in a pip-build-env.
Same problem here.
The torch path CMake found is wired as Found Torch: /tmp/pip-build-env-6lfm8tt6/overlay/lib/python3.9/site-packages/torch/lib/libtorch.so
, but not the torch path inside my conda env.
BTW, the error when running the build of this wired torch is cause by the incompatible cuda-12.1 and pybind11
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:120: error: expected template-name before ‘<’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:120: error: expected identifier before ‘<’ token
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:123: error: expected primary-expression before ‘>’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
/tmp/pip-build-env-wpkamc65/overlay/lib/python3.9/site-packages/torch/include/pybind11/cast.h:45:126: error: expected primary-expression before ‘)’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
ninja: build stopped: subcommand failed.
#https://github.com/pybind/pybind11/issues/4606#issue-1653451462
moe seems to be the cultprint
- can confirm .. builds anything else .. but vllm has an issue with it .. a6k's archlinux latest drivers and cuda
Same here, occurring with the latest commits. Ubuntu 22.04.4, Python 3.10, CUDA 12.2, NVIDIA-SMI 535.171.04, torch-2.2.1, gcc 12.3.0
Just installed torch and cudatoolkit a few days ago with previous vLLM commit which worked. "pip install vllm" works too. Installing from latest commit fails:
pip install git+https://github.com/vllm-project/vllm.git@96e90fdeb3c4ebacfe24513556afccb918722b7c
->
File "/home/antti/anaconda3/envs/xx/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', '_moe_C', '-j', '32']' returned non-zero exit status 1
I am getting the same exact error and I have been able to build previous versions of vllm
using my current configuration.
same error, previous version of vllm is fine
yup same issue here
the same problem
I have a similar issue when using gcc-13.2 (manually compiled as Fedora 40 only ships gcc-14) and CUDA 12.4. WHen building vllm, one of the headers in pytorch (./ATen/core/boxing/impl/boxing.h
) caused template errors much like the error in this issue. I've build a workaround by downloading the fixed file from the PyTorch Git (wget https://raw.githubusercontent.com/pytorch/pytorch/main/aten/src/ATen/core/boxing/impl/boxing.h -O boxing.h
) and then adding to the CMakeLists.txt
after find_package(Torch REQUIRED)
:
list(GET TORCH_INCLUDE_DIRS 0 BASE_INCLUDE)
message("PATCHING: ${BASE_INCLUDE}/ATen/core/boxing/impl/boxing.h")
file(COPY ${CMAKE_SOURCE_DIR}/boxing.h DESTINATION ${BASE_INCLUDE}/ATen/core/boxing/impl/boxing.h)
I think, if you adapt the paths, you could use a similar fix to inject patched pybind header files.
try export MAX_JOBS=6
, may be helpful
same error
I have a similar issue when using gcc-13.2 (manually compiled as Fedora 40 only ships gcc-14) and CUDA 12.4. WHen building vllm, one of the headers in pytorch (
./ATen/core/boxing/impl/boxing.h
) caused template errors much like the error in this issue. I've build a workaround by downloading the fixed file from the PyTorch Git (wget https://raw.githubusercontent.com/pytorch/pytorch/main/aten/src/ATen/core/boxing/impl/boxing.h -O boxing.h
) and then adding to theCMakeLists.txt
afterfind_package(Torch REQUIRED)
:list(GET TORCH_INCLUDE_DIRS 0 BASE_INCLUDE) message("PATCHING: ${BASE_INCLUDE}/ATen/core/boxing/impl/boxing.h") file(COPY ${CMAKE_SOURCE_DIR}/boxing.h DESTINATION ${BASE_INCLUDE}/ATen/core/boxing/impl/boxing.h)
I think, if you adapt the paths, you could use a similar fix to inject patched pybind header files.
This issue with boxing_impl.h has been fixed by PyTorch v2.4.0. For 2.3.0 and below, you needed to monkeypatch this according to https://github.com/pytorch/pytorch/issues/122169#issuecomment-2146155541.
This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!
This issue has been automatically closed due to inactivity. Please feel free to reopen if you feel it is still relevant. Thank you!