Skip to content

Conversation

@yewentao256
Copy link
Member

@yewentao256 yewentao256 commented Sep 23, 2025

Purpose

Fix AMD Compile Error in MI300

Originally

/mnt/nvme5n1p1/wentao/vllm/cmake-build-release/csrc/rocm/attention.hip:131:33: error: use of undeclared identifier '__hip_fp8_e4m3'
  131 |   if constexpr (std::is_same<T, __hip_fp8_e4m3>::value) {
      |                                 ^
/mnt/nvme5n1p1/wentao/vllm/cmake-build-release/csrc/rocm/attention.hip:134:40: error: use of undeclared identifier '__hip_fp8_e5m2'
  134 |   } else if constexpr (std::is_same<T, __hip_fp8_e5m2>::value) {
      |                                        ^
/mnt/nvme5n1p1/wentao/vllm/cmake-build-release/csrc/rocm/attention.hip:647:40: error: use of undeclared identifier '__hip_fp8_e4m3'
  647 |                 gcn_mfma16x16x32_instr<__hip_fp8_e4m3, 0, 0, 0>(
      |                                        ^
/mnt/nvme5n1p1/wentao/vllm/cmake-build-release/csrc/rocm/attention.hip:848:50: error: use of undeclared identifier '__hip_fp8_e4m3'
  848 |                 tmp_out = gcn_mfma16x16x32_instr<__hip_fp8_e4m3, 0, 0, 0>(
      |                                                  ^
4 errors generated when compiling for gfx942

Now

[7/8] Install the project...
-- Install configuration: "Release"
-- Installing: /mnt/nvme5n1p1/wentao/vllm/vllm/_C.abi3.so
-- Set non-toolchain portion of runtime path of "/mnt/nvme5n1p1/wentao/vllm/vllm/_C.abi3.so" to ""
-- Installing: /mnt/nvme5n1p1/wentao/vllm/vllm/_moe_C.abi3.so
-- Set non-toolchain portion of runtime path of "/mnt/nvme5n1p1/wentao/vllm/vllm/_moe_C.abi3.so" to ""
-- Installing: /mnt/nvme5n1p1/wentao/vllm/vllm/_rocm_C.abi3.so
-- Set non-toolchain portion of runtime path of "/mnt/nvme5n1p1/wentao/vllm/vllm/_rocm_C.abi3.so" to ""

@mergify mergify bot added the rocm Related to AMD ROCm label Sep 23, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
@yewentao256 yewentao256 force-pushed the wye-fix-amd-compile-error branch from 9f8ae87 to 48b3f69 Compare September 23, 2025 21:32
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes a compilation error on AMD MI300 devices by adding compatibility layers for different ROCm versions, specifically for FP8 data types. The changes correctly address the issue by defining missing FP8 type aliases for older ROCm versions. However, this compatibility logic is now fragmented across multiple files. I've added comments suggesting to centralize this logic into a common header to improve code maintainability and consistency.

Signed-off-by: yewentao256 <zhyanwentao@126.com>
@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 23, 2025
@mgoin mgoin enabled auto-merge (squash) September 24, 2025 00:05
@mgoin mgoin merged commit bf68fd7 into main Sep 24, 2025
92 checks passed
@mgoin mgoin deleted the wye-fix-amd-compile-error branch September 24, 2025 00:42
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
yewentao256 added a commit that referenced this pull request Oct 3, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
gjc0824 pushed a commit to gjc0824/vllm that referenced this pull request Oct 10, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: gaojc <1055866782@qq.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants