vllm icon indicating copy to clipboard operation
vllm copied to clipboard

[Bug]: Not picking up Neuron on instance (AssertionError: CUDA_HOME is not set)

Open milo157 opened this issue 1 year ago • 0 comments

Your current environment

Collecting environment information...
/opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py:124: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
WARNING 05-06 16:56:29 ray_utils.py:46] Failed to import Ray with ModuleNotFoundError("No module named 'ray'"). For distributed inference, please install Ray with `pip install ray`.
PyTorch version: 2.1.2+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Clang version: Could not collect
CMake version: version 3.29.2
Libc version: glibc-2.31

Python version: 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0] (64-bit runtime)
Python platform: Linux-5.10.214-202.855.amzn2.x86_64-x86_64-with-glibc2.31
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
Byte Order:                         Little Endian
Address sizes:                      48 bits physical, 48 bits virtual
CPU(s):                             32
On-line CPU(s) list:                0-31
Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          1
NUMA node(s):                       2
Vendor ID:                          AuthenticAMD
CPU family:                         25
Model:                              1
Model name:                         AMD EPYC 7R13 Processor
Stepping:                           1
CPU MHz:                            1839.214
BogoMIPS:                           5299.99
Hypervisor vendor:                  KVM
Virtualization type:                full
L1d cache:                          512 KiB
L1i cache:                          512 KiB
L2 cache:                           8 MiB
L3 cache:                           64 MiB
NUMA node0 CPU(s):                  0-7,16-23
NUMA node1 CPU(s):                  8-15,24-31
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 Retbleed:             Not affected
Vulnerability Spec rstack overflow: Mitigation; safe RET, no microcode
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 always-on, RSB filling
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch topoext invpcid_single ssbd ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr rdpru wbnoinvd arat npt nrip_save vaes vpclmulqdq rdpid

Versions of relevant libraries:
[pip3] numpy==1.25.2
[pip3] nvidia-nccl-cu12==2.18.1
[pip3] sagemaker_pytorch_inference==2.0.21
[pip3] torch==2.1.2
[pip3] torch-model-archiver==0.10.0
[pip3] torch-neuronx==2.1.2.2.1.0
[pip3] torch-xla==2.1.2
[pip3] torchserve==0.10.0
[pip3] torchvision==0.16.2
[pip3] triton==2.1.0
[conda] mkl                       2024.1.0           ha957f24_692    conda-forge
[conda] mkl-include               2024.1.0           ha957f24_692    conda-forge
[conda] numpy                     1.25.2                   pypi_0    pypi
[conda] nvidia-nccl-cu12          2.18.1                   pypi_0    pypi
[conda] sagemaker-pytorch-inference 2.0.21                   pypi_0    pypi
[conda] torch                     2.1.2                    pypi_0    pypi
[conda] torch-model-archiver      0.10.0                   pypi_0    pypi
[conda] torch-neuronx             2.1.2.2.1.0              pypi_0    pypi
[conda] torch-xla                 2.1.2                    pypi_0    pypi
[conda] torchserve                0.10.0                   pypi_0    pypi
[conda] torchvision               0.16.2                   pypi_0    pypi
[conda] triton                    2.1.0                    pypi_0    pypiROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.4.2
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
Could not collect

🐛 Describe the bug

I ran the commands from here

The base image I am using for my Inferentia 2 instance is here

All the commands run successfully however when I run the command: pip install . in the vllm folder then I get the following error:

`root@dev-p-3c3c2df6-11-inferentia-dev-build-30b0d324-w5ht7:~/vllm# pip install . --extra-index-url https://pip.repos.neuron.amazonaws.com Looking in indexes: http://172.20.227.41/root/pypi, https://pypi.org/simple, https://pip.repos.neuron.amazonaws.com Processing /persistent-storage/.resources/cortex/11-inferentia/build_resources/vllm Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/home/model-server/tmp/pip-build-env-0f9mgy6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel return self.get_build_requires(config_settings, requirements=['wheel']) File "/home/model-server/tmp/pip-build-env-0f9mgy6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in get_build_requires self.run_setup() File "/home/model-server/tmp/pip-build-env-0f9mgy6/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 399, in File "", line 309, in get_vllm_version File "", line 279, in get_nvcc_cuda_version AssertionError: CUDA_HOME is not set [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. `

The fact its looking for CUDA makes me think that its not picking up the Neuron packages? However, I did see you are looking for the NEURON_CORES env var so I set that but it didn't make a difference

milo157 avatar May 06 '24 21:05 milo157