Skip to content

[Bug]: Running Llama-2-70b inference on MI300x getting OOM #397

@PurvangL

Description

@PurvangL

Your current environment

The output of `python collect_env.py`
root@dell-gpu-mi300:/lab-mlperf-inference/code/llama2-70b-99.9/test_VllmFp8# python collect_env.py                                                    
/opt/conda/envs/py_3.9/lib/python3.9/site-packages/vllm/__init__.py:15: RuntimeWarning: Failed to read commit hash:                                   
No module named 'vllm._version'                                                                                                                       
  from .version import __version__, __version_tuple__                                                                                                 
Collecting environment information...                                                                                                                 
PyTorch version: 2.3.0a0+git2e4abc8                                                                                                                   
Is debug build: False                                                                                                                                 
CUDA used to build PyTorch: N/A                                                                                                                       
ROCM used to build PyTorch: 6.1.40093-bd86f1708                                                                                                       
                                                                                                                                                      
OS: Ubuntu 20.04.6 LTS (x86_64)                                                                                                                       
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0                                                                                                    
Clang version: 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-6.1.2 24193 669db884972e769450470020c06a6f132a8a065b)                    
CMake version: version 3.30.2                                                                                                                         
Libc version: glibc-2.31                                                                                                                              
                                                                                                                                                      
Python version: 3.9.19 (main, May  6 2024, 19:43:03)  [GCC 11.2.0] (64-bit runtime)                                                                   
Python platform: Linux-5.15.0-130-generic-x86_64-with-glibc2.31                                                                                       
Is CUDA available: True                                                                                                                               
CUDA runtime version: Could not collect                                                                                                               
CUDA_MODULE_LOADING set to: LAZY                                                                                                                      
GPU models and configuration: AMD Instinct MI300X (gfx942:sramecc+:xnack-)                                                                            
Nvidia driver version: Could not collect                                                                                                              
cuDNN version: Could not collect                                                                                                                      
HIP runtime version: 6.1.40093                                                                                                                        
MIOpen runtime version: 3.1.0                                                                                                                         
Is XNNPACK available: True                                                                                                                            
                                                                                                                                                      
CPU:                                                                                                                                                  
Architecture:                         x86_64                                                                                                          
CPU op-mode(s):                       32-bit, 64-bit                                                                                                  
Byte Order:                           Little Endian                                                                                                   
Address sizes:                        46 bits physical, 57 bits virtual                                                                               
CPU(s):                               208                                                                                                             
On-line CPU(s) list:                  0-207                                                                                                           
Thread(s) per core:                   2                                                                                                               
Core(s) per socket:                   52                                                                                                              
Socket(s):                            2                                                                                                               
NUMA node(s):                         2                                                                                                               
Vendor ID:                            GenuineIntel
CPU family:                           6
Model:                                143
Model name:                           Intel(R) Xeon(R) Platinum 8470
Stepping:                             8
CPU MHz:                              2000.000
BogoMIPS:                             4000.00
Virtualization:                       VT-x
L1d cache:                            4.9 MiB
L1i cache:                            3.3 MiB
L2 cache:                             208 MiB
L3 cache:                             210 MiB
NUMA node0 CPU(s):                    0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,
78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,1
58,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206
NUMA node1 CPU(s):                    1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,
79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,1
59,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207
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 BHI_DIS_S
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 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 pc
lmulqdq 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 av
x f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow v
nmi 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 av
x_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts 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 a
mx_tile amx_int8 flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] mypy==1.7.0                                                                                                                           [35/1601]
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.4
[pip3] optree==0.9.1
[pip3] torch==2.3.0a0+git2e4abc8
[pip3] torchvision==0.18.0a0+6f0deb9
[pip3] transformers==4.37.2
[pip3] triton==3.0.0
[conda] No relevant packages
ROCM Version: 6.1.40093-bd86f1708
Neuron SDK Version: N/A
vLLM Version: 0.4.3
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
============================ ROCm System Management Interface ============================
================================ Weight between two GPUs =================================
       GPU0         GPU1         GPU2         GPU3         GPU4         GPU5         GPU6         GPU7         
GPU0   0            15           15           15           15           15           15           15           
GPU1   15           0            15           15           15           15           15           15           
GPU2   15           15           0            15           15           15           15           15           
GPU3   15           15           15           0            15           15           15           15           
GPU4   15           15           15           15           0            15           15           15           
GPU5   15           15           15           15           15           0            15           15           
GPU6   15           15           15           15           15           15           0            15           
GPU7   15           15           15           15           15           15           15           0            

================================= Hops between two GPUs ==================================
       GPU0         GPU1         GPU2         GPU3         GPU4         GPU5         GPU6         GPU7         
GPU0   0            1            1            1            1            1            1            1            
GPU1   1            0            1            1            1            1            1            1            
GPU2   1            1            0            1            1            1            1            1            
GPU3   1            1            1            0            1            1            1            1            
GPU4   1            1            1            1            0            1            1            1            
GPU5   1            1            1            1            1            0            1            1            
GPU6   1            1            1            1            1            1            0            1            
GPU7   1            1            1            1            1            1            1            0            

=============================== Link Type between two GPUs ===============================
       GPU0         GPU1         GPU2         GPU3         GPU4         GPU5         GPU6         GPU7         
GPU0   0            XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         
GPU1   XGMI         0            XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         
GPU2   XGMI         XGMI         0            XGMI         XGMI         XGMI         XGMI         XGMI
GPU3   XGMI         XGMI         XGMI         0            XGMI         XGMI         XGMI         XGMI         
GPU4   XGMI         XGMI         XGMI         XGMI         0            XGMI         XGMI         XGMI         
GPU5   XGMI         XGMI         XGMI         XGMI         XGMI         0            XGMI         XGMI         
GPU6   XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         0            XGMI         
GPU7   XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         0            

======================================= Numa Nodes =======================================
GPU[0]          : (Topology) Numa Node: 0
GPU[0]          : (Topology) Numa Affinity: 0
GPU[1]          : (Topology) Numa Node: 0
GPU[1]          : (Topology) Numa Affinity: 0
GPU[2]          : (Topology) Numa Node: 0
GPU[2]          : (Topology) Numa Affinity: 0
GPU[3]          : (Topology) Numa Node: 0
GPU[3]          : (Topology) Numa Affinity: 0
GPU[4]          : (Topology) Numa Node: 1
GPU[4]          : (Topology) Numa Affinity: 1
GPU[5]          : (Topology) Numa Node: 1
GPU[5]          : (Topology) Numa Affinity: 1
GPU[6]          : (Topology) Numa Node: 1
GPU[6]          : (Topology) Numa Affinity: 1
GPU[7]          : (Topology) Numa Node: 1
GPU[7]          : (Topology) Numa Affinity: 1
================================== End of ROCm SMI Log ===================================

PYTORCH_TESTING_DEVICE_ONLY_FOR=cuda
VLLM_INSTALL_PUNICA_KERNELS=1
PYTORCH_TEST_WITH_ROCM=1
PYTORCH_HIP_ALLOC_CONF=expandable_segments:True
PYTORCH_ROCM_ARCH=gfx90a;gfx942
MAX_JOBS=8
LD_LIBRARY_PATH=/opt/ompi/lib:/opt/rocm/lib:/usr/local/lib::/opt/rocm/lib/:/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/lib:
CUDA_MODULE_LOADING=LAZY

Model Input Dumps

No response

🐛 Describe the bug

I am following document to reproduce llama-2-70b inference on 8xMI300x system.

running offline benchmark terminates without any output as seems like no input item is received from code below. and eventually all llm instances printing stopping criteria.

    while True:
        try:
            item = qdata_in.recv()
            if item is None:
                log.info(f"LLM is stopping")
                qdata_out.send(LLM_DONE)
                break

for server mode, getting OOM.

Could you please help me running Llama2-70b inference on 8xMI300x?

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions