vllm-project / vllm

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

[Bug]: [Usage]: is_xpu should return true when the torch.xpu.is_available is true even w/o IPEX #8655

Open liangan1 opened 1 month ago

liangan1 commented 1 month ago

Your current environment

Collecting environment information... /home/sdp/miniforge3/envs/liangan1/lib/python3.10/site-packages/transformers/utils/hub.py:128: FutureWarning: Using TRANSFORMERS_CACHE is deprecated and will be removed in v5 of Transformers. Use HF_HOME instead. warnings.warn( WARNING 09-20 00:31:48 _custom_ops.py:18] Failed to import from vllm._C with ModuleNotFoundError("No module named 'vllm._C'") PyTorch version: 2.5.0a0+git136e28f Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 LTS (x86_64) GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: 20.0.0 (++20240812042341+3176f255c9dd-1~exp1~20240812162447.1861) CMake version: version 3.30.3 Libc version: glibc-2.35

Python version: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0] (64-bit runtime) Python platform: Linux-5.15.0-121-generic-x86_64-with-glibc2.35 Is CUDA available: False CUDA runtime version: No CUDA CUDA_MODULE_LOADING set to: N/A GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA 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): 224 On-line CPU(s) list: 0-223 Vendor ID: GenuineIntel Model name: Genuine Intel(R) CPU 0000%@ CPU family: 6 Model: 143 Thread(s) per core: 2 Core(s) per socket: 56 Socket(s): 2 Stepping: 5 CPU max MHz: 4000.0000 CPU min MHz: 800.0000 BogoMIPS: 3600.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 avx2 smep bmi2 erms invpcid 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_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities Virtualization: VT-x L1d cache: 5.3 MiB (112 instances) L1i cache: 3.5 MiB (112 instances) L2 cache: 224 MiB (112 instances) L3 cache: 210 MiB (2 instances) NUMA node(s): 2 NUMA node0 CPU(s): 0-55,112-167 NUMA node1 CPU(s): 56-111,168-223 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected 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; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] numpy==1.26.4 [pip3] optree==0.12.1 [pip3] pytorch-triton-xpu==3.0.0+cc981feba1 [pip3] pyzmq==26.2.0 [pip3] torch==2.5.0a0+git136e28f [pip3] torchao==0.5.0 [pip3] transformers==4.45.0.dev0 [pip3] zmq==0.0.0 [conda] mkl-include 2024.2.1 pypi_0 pypi [conda] mkl-static 2024.2.1 pypi_0 pypi [conda] numpy 1.26.4 pypi_0 pypi [conda] optree 0.12.1 pypi_0 pypi [conda] pytorch-triton-xpu 3.0.0+cc981feba1 pypi_0 pypi [conda] pyzmq 26.2.0 pypi_0 pypi [conda] torch 2.5.0a0+git136e28f dev_0 [conda] torchao 0.5.0 pypi_0 pypi [conda] transformers 4.45.0.dev0 pypi_0 pypi [conda] zmq 0.0.0 pypi_0 pypi ROCM Version: Could not collect Neuron SDK Version: N/A vLLM Version: 0.6.1.post2@855c8ae2c9a4085b1ebd66d9a978fb23f47f822c vLLM Build Flags: CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled GPU Topology: Could not collect

Model Input Dumps

The XPU has been upstreamed to the stock pytorch. The is_xpu should return true when the torch.xpu.is_available.

🐛 Describe the bug

Nothing.

Before submitting a new issue...

liangan1 commented 1 month ago

@bigPYJ1151

bigPYJ1151 commented 1 month ago

cc @jikunshang

jikunshang commented 1 month ago

offline discussed with @liangan1 , here is summary:

  1. current torch(2.4) doesn't provide a xpu wheel/binary. it would be a great burden for user to build/setup torch-xpu binary. we can evaluate on pytorch 2.5 which could provide xpu binary.
  2. ipex provides some high performance kernels(like paged_attn, varlen_attn), which are not in pytorch. for page attention kernel, we could leverage triton to impl. perf may be not good as native kernel for varlen_attn, we could use sdpa instead. perf is also concern here. for other ops, we could leverage pytorch native impl. for further quant API, I am afraid ipex is necessary.

cc @zhouyuan @jgong5