-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Compile source code error for ROCM6.0 #2646
Comments
@lhcalibur Thanks for your feedback. Could you help me to verify it by appling pr #2648 ? |
It still has an error: FAILED: /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/cache_kernels.o I have tried to include the header file "attention/dtype_bfloat16.cuh" to "csrc/cache_kernels.cu":: |
@lhcalibur The error is caused by #ifdef USE_ROCM
#include <hip/hip_bf16.h>
typedef __hip_bfloat16 __nv_bfloat16;
#endif |
Not working. |
@zhaoyang-star I have reproduced this error in the release tag v0.2.7: void swap_blocks( |
@zhaoyang-star @cloudhan Can you help to verify? Thanks! This modification is based on your latest pull req #2648
|
No luck... |
@cloudhan |
I'm having the same issue when build the Docker image with ROCm 6.0 version. |
This is caused by The function in <hip/hip_bf16.h> is defined without static inline , which will cause multi definition error when using this header file in multi .cu/.hip files. The error will be fixed in future releases of ROCM, but till ROCM-6.0.2, this is not be fixed yet, maybe we need to find a way to bypass this. @zhaoyang-star |
Hi @lhcalibur is there any way to bypass this? |
I had the same issue on ROCM 5.7. just apply this patch for rocm as workaround: https://github.com/vllm-project/vllm/pull/2790/files |
The error maybe caused by commit #2279
ROCM Version: 6.0
@zhaoyang-star @zhuohan123
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/vllm
x86_64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/activation_kernels.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/attention/attention_kernels.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/cache_kernels.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/hip_utils_kernels.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/layernorm_kernels.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/pos_encoding_kernels.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/pybind.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/quantization/gptq/q_gemm.o /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/quantization/squeezellm/quant_hip_kernel.o -L/projects/vllm_master/venv_rocm-6.0/lib/python3.10/site-packages/torch/lib -L/opt/rocm-6.0.0/lib -L/opt/rocm-6.0.0/hip/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -lamdhip64 -lc10_hip -ltorch_hip -o build/lib.linux-x86_64-3.10/vllm/_C.cpython-310-x86_64-linux-gnu.so
/usr/bin/ld: /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/cache_kernels.o: in function
__float2bfloat16(float)': cache_kernels.hip:(.text+0x0): multiple definition of
__float2bfloat16(float)'; /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x0): first defined here/usr/bin/ld: /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/cache_kernels.o: in function
__bfloat1622float2(__hip_bfloat162)': cache_kernels.hip:(.text+0x40): multiple definition of
__bfloat1622float2(__hip_bfloat162)'; /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x40): first defined here/usr/bin/ld: /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/cache_kernels.o: in function
__double2bfloat16(double)': cache_kernels.hip:(.text+0x60): multiple definition of
__double2bfloat16(double)'; /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x60): first defined here/usr/bin/ld: /projects/vllm_master/build/temp.linux-x86_64-3.10/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>)'; /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0xa0): first defined here/usr/bin/ld: /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/cache_kernels.o: in function
__high2float(__hip_bfloat162)': cache_kernels.hip:(.text+0x110): multiple definition of
__high2float(__hip_bfloat162)'; /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x110): first defined here/usr/bin/ld: /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/cache_kernels.o: in function
__low2float(__hip_bfloat162)': cache_kernels.hip:(.text+0x120): multiple definition of
__low2float(__hip_bfloat162)'; /projects/vllm_master/build/temp.linux-x86_64-3.10/csrc/attention/attention_kernels.o:attention_kernels.hip:(.text+0x120): first defined herecollect2: error: ld returned 1 exit status
error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
The text was updated successfully, but these errors were encountered: