vllm-project / vllm

A high-throughput and memory-efficient inference and serving engine for LLMs
https://docs.vllm.ai
Apache License 2.0
29.98k stars 4.53k forks source link

[Bug]: 0.4.2 error on H20 #5001

Open tohneecao opened 5 months ago

tohneecao commented 5 months ago

Your current environment

The output of `python collect_env.py`

root@9b33a89c3857:/workspace/vllm-0.4.2# python collect_env.py Collecting environment information... PyTorch version: 2.3.0+cu121 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 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: Could not collect CMake version: version 3.27.6 Libc version: glibc-2.35

Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (64-bit runtime) Python platform: Linux-5.10.134-13.al8.x86_64-x86_64-with-glibc2.35 Is CUDA available: True CUDA runtime version: 12.2.140 CUDA_MODULE_LOADING set to: LAZY GPU models and configuration: GPU 0: NVIDIA H20 GPU 1: NVIDIA H20 GPU 2: NVIDIA H20 GPU 3: NVIDIA H20 GPU 4: NVIDIA H20 GPU 5: NVIDIA H20 GPU 6: NVIDIA H20 GPU 7: NVIDIA H20

Nvidia driver version: 535.161.08 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.5 /usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.5 /usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.5 /usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.5 /usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.5 /usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.5 /usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.5 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: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 192 On-line CPU(s) list: 0-191 Vendor ID: GenuineIntel BIOS Vendor ID: Intel(R) Corporation Model name: Intel(R) Xeon(R) Platinum 8469C BIOS Model name: Intel(R) Xeon(R) Platinum 8469C CPU family: 6 Model: 143 Thread(s) per core: 2 Core(s) per socket: 48 Socket(s): 2 Stepping: 8 CPU max MHz: 3800.0000 CPU min MHz: 800.0000 BogoMIPS: 5200.00 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 art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq 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 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm uintr md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 4.5 MiB (96 instances) L1i cache: 3 MiB (96 instances) L2 cache: 192 MiB (96 instances) L3 cache: 195 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-47,96-143 NUMA node1 CPU(s): 48-95,144-191 Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: 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; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] mypy==0.991 [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.22.2 [pip3] nvidia-nccl-cu12==2.20.5 [pip3] onnx==1.14.0 [pip3] pytorch-quantization==2.1.2 [pip3] torch==2.3.0 [pip3] torch-tensorrt==0.0.0 [pip3] torchdata==0.7.0a0 [pip3] torchtext==0.16.0a0 [pip3] torchvision==0.16.0a0 [pip3] triton==2.3.0 [pip3] vllm-nccl-cu12==2.18.1.0.4.0 [conda] Could not collectROCM Version: Could not collect Neuron SDK Version: N/A vLLM Version: 0.4.2 vLLM Build Flags: CUDA Archs: 5.2 6.0 6.1 7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX; ROCm: Disabled; Neuron: Disabled GPU Topology: GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7 NIC0 NIC1 NIC2 NIC3 NIC4 CPU Affinity NUMA Affinity GPU NUMA ID GPU0 X NV18 NV18 NV18 NV18 NV18 NV18 NV18 NODE NODE NODE SYS SYS 0-47,96-143 0 N/A GPU1 NV18 X NV18 NV18 NV18 NV18 NV18 NV18 NODE PIX NODE SYS SYS 0-47,96-143 0 N/A GPU2 NV18 NV18 X NV18 NV18 NV18 NV18 NV18 NODE NODE NODE SYS SYS 0-47,96-143 0 N/A GPU3 NV18 NV18 NV18 X NV18 NV18 NV18 NV18 NODE NODE PIX SYS SYS 0-47,96-143 0 N/A GPU4 NV18 NV18 NV18 NV18 X NV18 NV18 NV18 SYS SYS SYS PIX NODE 48-95,144-191 1 N/A GPU5 NV18 NV18 NV18 NV18 NV18 X NV18 NV18 SYS SYS SYS NODE NODE 48-95,144-191 1 N/A GPU6 NV18 NV18 NV18 NV18 NV18 NV18 X NV18 SYS SYS SYS NODE PIX 48-95,144-191 1 N/A GPU7 NV18 NV18 NV18 NV18 NV18 NV18 NV18 X SYS SYS SYS NODE NODE 48-95,144-191 1 N/A NIC0 NODE NODE NODE NODE SYS SYS SYS SYS X NODE NODE SYS SYS NIC1 NODE PIX NODE NODE SYS SYS SYS SYS NODE X NODE SYS SYS NIC2 NODE NODE NODE PIX SYS SYS SYS SYS NODE NODE X SYS SYS NIC3 SYS SYS SYS SYS PIX NODE NODE NODE SYS SYS SYS X NODE NIC4 SYS SYS SYS SYS NODE NODE PIX NODE SYS SYS SYS NODE X

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

NIC Legend:

NIC0: mlx5_0 NIC1: mlx5_bond_0 NIC2: mlx5_bond_1 NIC3: mlx5_bond_2 NIC4: mlx5_bond_3

🐛 Describe the bug

root@9b33a89c3857:/workspace/vllm-0.4.2/benchmarks# python benchmark_throughput.py --model /local_model_root/model/qwen-7b-chat/qwen/Qwen-7B-Chat/ --dataset /local_model_root/model/datasets/ShareGPT_V3_unfiltered_cleaned_split.json --trust-remote-code Namespace(backend='vllm', dataset='/local_model_root/model/datasets/ShareGPT_V3_unfiltered_cleaned_split.json', input_len=None, output_len=None, model='/local_model_root/model/qwen-7b-chat/qwen/Qwen-7B-Chat/', tokenizer='/local_model_root/model/qwen-7b-chat/qwen/Qwen-7B-Chat/', quantization=None, tensor_parallel_size=1, n=1, use_beam_search=False, num_prompts=1000, seed=0, hf_max_batch_size=None, trust_remote_code=True, max_model_len=None, dtype='auto', gpu_memory_utilization=0.9, enforce_eager=False, kv_cache_dtype='auto', quantization_param_path=None, device='cuda', enable_prefix_caching=False, enable_chunked_prefill=False, max_num_batched_tokens=None, download_dir=None) INFO 05-23 15:56:01 llm_engine.py:100] Initializing an LLM engine (v0.4.2) with config: model='/local_model_root/model/qwen-7b-chat/qwen/Qwen-7B-Chat/', speculative_config=None, tokenizer='/local_model_root/model/qwen-7b-chat/qwen/Qwen-7B-Chat/', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=True, dtype=torch.float16, max_seq_len=8192, download_dir=None, load_format=LoadFormat.AUTO, tensor_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, quantization_param_path=None, device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend='outlines'), seed=0, served_model_name=/local_model_root/model/qwen-7b-chat/qwen/Qwen-7B-Chat/) WARNING 05-23 15:56:02 tokenizer.py:126] Using a slow tokenizer. This might cause a significant slowdown. Consider using a fast tokenizer instead. INFO 05-23 15:56:02 utils.py:660] Found nccl from library /root/.config/vllm/nccl/cu12/libnccl.so.2.18.1 INFO 05-23 15:56:05 selector.py:81] Cannot use FlashAttention-2 backend because the flash_attn package is not found. Please install it for better performance. INFO 05-23 15:56:05 selector.py:32] Using XFormers backend. INFO 05-23 15:56:13 model_runner.py:175] Loading model weights took 14.3860 GB INFO 05-23 15:56:14 gpu_executor.py:114] # GPU blocks: 8848, # CPU blocks: 512 INFO 05-23 15:56:16 model_runner.py:937] Capturing the model for CUDA graphs. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI. INFO 05-23 15:56:16 model_runner.py:941] CUDA graphs can take additional 1~3 GiB memory per GPU. If you are running out of memory, consider decreasing gpu_memory_utilization or enforcing eager mode. You can also reduce the max_num_seqs as needed to decrease memory usage. [9b33a89c3857:412 :0:412] Caught signal 8 (Floating point exception: integer divide by zero) ==== backtrace (tid: 412) ==== 0 0x0000000000042520 sigaction() ???:0 1 0x0000000000a0bc59 cublasLt_for_cublas_ZZZ() ???:0 2 0x0000000000814383 cublasLt_for_cublas_ZZZ() ???:0 3 0x00000000006ace72 cublasLtLegacyGemmUtilizationZZZ() ???:0 4 0x00000000007aa087 cublasLtMatmulAlgoCheck() ???:0 5 0x00000000007ab055 cublasLtMatmulAlgoCheck() ???:0 6 0x00000000007abd2e cublasLtMatmulAlgoCheck() ???:0 7 0x00000000007bd046 cublasLtHSHMatmulAlgoGetHeuristic() ???:0 8 0x000000000085d43a cublasXerbla() ???:0 9 0x000000000085deec cublasXerbla() ???:0 10 0x0000000000860122 cublasXerbla() ???:0 11 0x00000000008432ef cublasXerbla() ???:0 12 0x0000000000ac7ecf cublasUint8gemmBias() ???:0 13 0x0000000000ac83d8 cublasUint8gemmBias() ???:0 14 0x00000000003e1c7d cublasGemmEx() ???:0 15 0x0000000003593c91 at::cuda::blas::gemm_internal() :0 16 0x000000000359c6e7 at::cuda::blas::gemm() :0 17 0x00000000035fffa4 at::native::(anonymous namespace)::addmm_out_cuda_impl() Blas.cpp:0 18 0x000000000360048a at::native::structured_mm_out_cuda::impl() ???:0 19 0x000000000334a222 at::(anonymous namespace)::wrapper_CUDA_mm() RegisterCUDA.cpp:0 20 0x000000000334a2e0 c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, at::Tensor const&), &at::(anonymous namespace)::wrapper_CUDA_mm>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, at::Tensor const&> >, at::Tensor (at::Tensor const&, at::Tensor const&)>::call() RegisterCUDA.cpp:0 21 0x0000000002a1b2be at::_ops::mm::call() ???:0 22 0x0000000001d8c020 at::native::_matmul_impl() LinearAlgebra.cpp:0 23 0x0000000001d94d09 at::native::matmul() ???:0 24 0x0000000002fdd5e0 c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, at::Tensor const&), &at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeImplicitAutograd__matmul>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, at::Tensor const&> >, at::Tensor (at::Tensor const&, at::Tensor const&)>::call() RegisterCompositeImplicitAutograd.cpp:0 25 0x0000000002b4abde at::_ops::matmul::call() ???:0 26 0x0000000001d7b9c3 at::native::linear() ???:0 27 0x0000000002fdd373 c10::impl::wrap_kernel_functorunboxed<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, at::Tensor const&, std::optional const&), &at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeImplicitAutogradlinear>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, at::Tensor const&, std::optional const&> >, at::Tensor (at::Tensor const&, at::Tensor const&, std::optional const&)>::call() RegisterCompositeImplicitAutograd.cpp:0 28 0x000000000255af6c at::_ops::linear::call() ???:0 29 0x00000000006fe555 torch::autograd::THPVariable_linear() python_nn_functions.cpp:0 30 0x000000000015fe0e PyObject_CallFunctionObjArgs() ???:0 31 0x00000000001565eb _PyObject_MakeTpCall() ???:0 32 0x000000000014f1f1 _PyEval_EvalFrameDefault() ???:0 33 0x000000000016070c _PyFunction_Vectorcall() ???:0 34 0x0000000000148f52 _PyEval_EvalFrameDefault() ???:0 35 0x000000000016e62e PyMethod_New() ???:0 36 0x000000000014b2c1 _PyEval_EvalFrameDefault() ???:0 37 0x000000000016e62e PyMethod_New() ???:0 38 0x000000000014b2c1 _PyEval_EvalFrameDefault() ???:0 39 0x0000000000155784 _PyObject_FastCallDictTstate() ???:0 40 0x000000000016b54c _PyObject_Call_Prepend() ???:0 41 0x00000000002841e0 PyInit__datetime() ???:0 42 0x00000000001565eb _PyObject_MakeTpCall() ???:0 43 0x000000000014f1f1 _PyEval_EvalFrameDefault() ???:0 44 0x000000000016e62e PyMethod_New() ???:0 45 0x000000000014b2c1 _PyEval_EvalFrameDefault() ???:0 46 0x000000000016e62e PyMethod_New() ???:0 47 0x000000000014b2c1 _PyEval_EvalFrameDefault() ???:0 48 0x0000000000155784 _PyObject_FastCallDictTstate() ???:0 49 0x000000000016b54c _PyObject_Call_Prepend() ???:0 50 0x00000000002841e0 PyInit__datetime() ???:0 51 0x00000000001565eb _PyObject_MakeTpCall() ???:0 52 0x000000000014f1f1 _PyEval_EvalFrameDefault() ???:0 53 0x000000000016e62e PyMethod_New() ???:0 54 0x000000000014b2c1 _PyEval_EvalFrameDefault() ???:0 55 0x000000000016e62e PyMethod_New() ???:0 56 0x000000000014b2c1 _PyEval_EvalFrameDefault() ???:0

Floating point exception (core dumped)

fengyizhu commented 5 months ago

+1

deepindeed2022 commented 5 months ago

Encountered a similar issue when deploying Mixtral8x7B using vllm 0.4.2.

peixin-lin commented 5 months ago

Same issue happened to me when deploying with H20.

tohneecao commented 5 months ago

try using cuda-12.3 and cublas12.3.4.1,it works for me

Lzhang-hub commented 5 months ago

install nvidia-cublas-cu12==12.3.4.1 after install vllm, vllm default install nvidia-cublas-cu12==12.1.3.1

pip3 install vllm
pip3 install nvidia-cublas-cu12==12.3.4.1
DefTruth commented 4 months ago

same error in 0.5.0.post1

ywx217 commented 4 months ago

install nvidia-cublas-cu12==12.3.4.1 after install vllm, vllm default install nvidia-cublas-cu12==12.1.3.1

pip3 install vllm
pip3 install nvidia-cublas-cu12==12.3.4.1

This works for me when inferencing Qwen2-72B-Instruct on vLLM 0.5.0-post1 + H20. Thanks a lot! :rose::rose::rose:

zeroorhero commented 3 months ago

install nvidia-cublas-cu12==12.3.4.1 after install vllm, vllm default install nvidia-cublas-cu12==12.1.3.1

pip3 install vllm
pip3 install nvidia-cublas-cu12==12.3.4.1

cuda version is 12.3 or 12.4

hitzhu commented 2 months ago

install nvidia-cublas-cu12==12.3.4.1 after install vllm, vllm default install nvidia-cublas-cu12==12.1.3.1

pip3 install vllm
pip3 install nvidia-cublas-cu12==12.3.4.1

This works for me when inferencing Qwen2-72B-Instruct on vLLM 0.5.0-post1 + H20. Thanks a lot! 🌹🌹🌹

i try this,but faild because the conflict,what is the verson of torch you installed?

The conflict is caused by: The user requested nvidia-cublas-cu12==12.3.4.1 torch 2.4.0 depends on nvidia-cublas-cu12==12.1.3.1; platform_system == "Linux" and platform_machine == "x86_64"

hitzhu commented 2 months ago

install nvidia-cublas-cu12==12.3.4.1 after install vllm, vllm default install nvidia-cublas-cu12==12.1.3.1

pip3 install vllm
pip3 install nvidia-cublas-cu12==12.3.4.1

i try this,but faild because the conflict,what is the verson of torch you installed?

The conflict is caused by: The user requested nvidia-cublas-cu12==12.3.4.1 torch 2.4.0 depends on nvidia-cublas-cu12==12.1.3.1; platform_system == "Linux" and platform_machine == "x86_64"

danielhua23 commented 2 months ago

install nvidia-cublas-cu12==12.3.4.1 after install vllm, vllm default install nvidia-cublas-cu12==12.1.3.1

pip3 install vllm
pip3 install nvidia-cublas-cu12==12.3.4.1

i try this,but faild because the conflict,what is the verson of torch you installed?

The conflict is caused by: The user requested nvidia-cublas-cu12==12.3.4.1 torch 2.4.0 depends on nvidia-cublas-cu12==12.1.3.1; platform_system == "Linux" and platform_machine == "x86_64"

I also have this info, but the 12.3.4.1 pkg is successfully installed, and I rerun vllm, that works for me

hitzhu commented 2 months ago

install nvidia-cublas-cu12==12.3.4.1 after install vllm, vllm default install nvidia-cublas-cu12==12.1.3.1

pip3 install vllm
pip3 install nvidia-cublas-cu12==12.3.4.1

i try this,but faild because the conflict,what is the verson of torch you installed? The conflict is caused by: The user requested nvidia-cublas-cu12==12.3.4.1 torch 2.4.0 depends on nvidia-cublas-cu12==12.1.3.1; platform_system == "Linux" and platform_machine == "x86_64"

I also have this info, but the 12.3.4.1 pkg is successfully installed, and I rerun vllm, that works for me

can you give me more details about pkg installing ? Thanks very much

passerbythesun commented 2 months ago

I just met with this error. It seems it is specific to H20.