Skip to content

Fix compile error when using rocm#2648

Merged
zhuohan123 merged 2 commits intovllm-project:mainfrom
zhaoyang-star:fix_rocm
Feb 1, 2024
Merged

Fix compile error when using rocm#2648
zhuohan123 merged 2 commits intovllm-project:mainfrom
zhaoyang-star:fix_rocm

Conversation

@zhaoyang-star
Copy link
Copy Markdown
Contributor

fix #2646

@WoosukKwon WoosukKwon added the rocm Related to AMD ROCm label Jan 29, 2024
Copy link
Copy Markdown
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix!

@zhuohan123 zhuohan123 merged commit 923797f into vllm-project:main Feb 1, 2024
@zhaoyang-star zhaoyang-star deleted the fix_rocm branch February 2, 2024 00:47
@hongxiayang
Copy link
Copy Markdown
Collaborator

hongxiayang commented Feb 5, 2024

Thanks for the effort.
I still got error. Can you continue working on fixing below errors?

g++ -pthread -B /opt/conda/envs/py_3.8/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /opt/conda/envs/py_3.8/compiler_compat -L/opt/conda/envs/py_3.8/lib -Wl,-rpath=/opt/conda/envs/py_3.8/lib -Wl,--no-as-needed -Wl,--sysroot=/ /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/activation_kernels.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/attention/attention_kernels.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/cache_kernels.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/hip_utils_kernels.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/layernorm_kernels.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/moe_align_block_size_kernels.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/pos_encoding_kernels.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/pybind.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/quantization/gptq/q_gemm.o /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/quantization/squeezellm/quant_hip_kernel.o -L/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/lib -L/opt/rocm/lib -L/opt/rocm/hip/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -lamdhip64 -lc10_hip -ltorch_hip -o build/lib.linux-x86_64-cpython-38/vllm/_C.cpython-38-x86_64-linux-gnu.so
/opt/conda/envs/py_3.8/compiler_compat/ld: /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/cache_kernels.o: in function `__float2bfloat16(float)':
cache_kernels.hip:(.text+0x0): multiple definition of `__float2bfloat16(float)'; /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x0): first defined here
/opt/conda/envs/py_3.8/compiler_compat/ld: /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/cache_kernels.o: in function `__bfloat1622float2(__hip_bfloat162)':
cache_kernels.hip:(.text+0x40): multiple definition of `__bfloat1622float2(__hip_bfloat162)'; /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x40): first defined here
/opt/conda/envs/py_3.8/compiler_compat/ld: /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/cache_kernels.o: in function `__double2bfloat16(double)':
cache_kernels.hip:(.text+0x60): multiple definition of `__double2bfloat16(double)'; /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x60): first defined here
/opt/conda/envs/py_3.8/compiler_compat/ld: /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/cache_kernels.o: in function `__float22bfloat162_rn(HIP_vector_type<float, 2u>)':
cache_kernels.hip:(.text+0xa0): multiple definition of `__float22bfloat162_rn(HIP_vector_type<float, 2u>)'; /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0xa0): first defined here
/opt/conda/envs/py_3.8/compiler_compat/ld: /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/cache_kernels.o: in function `__high2float(__hip_bfloat162)':
cache_kernels.hip:(.text+0x110): multiple definition of `__high2float(__hip_bfloat162)'; /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x110): first defined here
/opt/conda/envs/py_3.8/compiler_compat/ld: /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/cache_kernels.o: in function `__low2float(__hip_bfloat162)':
cache_kernels.hip:(.text+0x120): multiple definition of `__low2float(__hip_bfloat162)'; /app/vllm/build/temp.linux-x86_64-cpython-38/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x120): first defined here
collect2: error: ld returned 1 exit status
error: command '/usr/bin/g++' failed with exit code 1

@jamestwhedbee
Copy link
Copy Markdown
Contributor

I am also still running into this

@hongxiayang
Copy link
Copy Markdown
Collaborator

My pull request to fix this: #2790

hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
alexm-redhat pushed a commit to neuralmagic/nm-vllm that referenced this pull request Feb 13, 2024
xjpang pushed a commit to xjpang/vllm that referenced this pull request Feb 20, 2024
xjpang pushed a commit to xjpang/vllm that referenced this pull request Feb 22, 2024
xjpang pushed a commit to xjpang/vllm that referenced this pull request Mar 4, 2024
amy-why-3459 pushed a commit to amy-why-3459/vllm that referenced this pull request Sep 15, 2025
Refresh doc for 0.9.1 release

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rocm Related to AMD ROCm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Compile source code error for ROCM6.0

5 participants