Skip to content

Conversation

@gshtras
Copy link
Collaborator

@gshtras gshtras commented Jan 30, 2025

Using the official hip fp8 header supplied with ROCm instead of a custom one. The header exists since ROCm6.2
It abstracts away the usage of either hardware instructions, or software emulation for fp8 conversions, as well as both NANOO and OCP types

…tom one. The header exists since ROCm6.2

Signed-off-by: Gregory Shtrasberg <[email protected]>
Signed-off-by: Gregory Shtrasberg <[email protected]>
Signed-off-by: Gregory Shtrasberg <[email protected]>
@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@mergify mergify bot added the ci/build label Jan 30, 2025
@SageMoore
Copy link
Contributor

This looks like a good change to me. We love to see lots of deleted code :). Thanks for the contribution.

CMakeLists.txt Outdated
#
if(VLLM_GPU_LANG STREQUAL "HIP")
#
# Setting up debug flags for pleasant debug experience.
Copy link
Collaborator

@ProExpertProg ProExpertProg Feb 11, 2025

Choose a reason for hiding this comment

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

Nit: typo, also is there a reason -ggdb3 is used specifically? And I thought -O0 was there by default already

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ggdb3 produces more debug information, it doesn't hurt to have it all
By default the current build will add -O, so appending this will turn it to "-O -O0" with the latter overriding the former

CMakeLists.txt Outdated


#
# Suppress the noisy warning
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: could you add a more detailed comment along the lines of "Both CUDA and HIP device calls return an error code but they are marked [[noreturn]] only in HIP. This warning can be reenabled once we handle error codes from all device calls".

*/

// fp8 -> half
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason these were moved? I don't feel strongly either way

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The conversions are now better grouped by type than before, also certain things may be reordered due to internal dependencies

Signed-off-by: Gregory Shtrasberg <[email protected]>
Copy link
Collaborator

@ProExpertProg ProExpertProg left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comments!

@mgoin mgoin added ready ONLY add when PR is ready to merge/full CI is needed AMD GPU labels Feb 19, 2025
@mgoin mgoin enabled auto-merge (squash) February 19, 2025 17:07
auto-merge was automatically disabled February 20, 2025 15:58

Head branch was pushed to by a user without write access

@robertgshaw2-redhat
Copy link
Collaborator

I am rerunning the CI, not sure why it blew up.

@robertgshaw2-redhat
Copy link
Collaborator

PR needs to be merged with main to pass CI (apologies, we had some issues with our S3 buckets)

@mgoin mgoin enabled auto-merge (squash) February 24, 2025 23:22
@mgoin
Copy link
Member

mgoin commented Feb 24, 2025

Retrying last test for merge

@DarkLight1337
Copy link
Member

The failure is unrelated to this PR, merging.

@simon-mo simon-mo merged commit aabeb26 into vllm-project:main Feb 25, 2025
68 of 70 checks passed
HollowMan6 added a commit to HollowMan6/vllm that referenced this pull request Feb 25, 2025
…ined

Related to vllm-project#12593

In older versions of "hip/hip_fp8.h" header
(before ROCm/clr@353f15a),
both `HIP_FP8_TYPE_OCP` and `HIP_FP8_TYPE_FNUZ` are not defined, and the
code implementation is in FNUZ, so it's better to write it in this way,
such that we don't check if `HIP_FP8_TYPE_FNUZ` is there or not, and
we just use FP8 FNUZ when `HIP_FP8_TYPE_OCP` is 0 or undefined.

Signed-off-by: Hollow Man <[email protected]>
@hmellor hmellor added rocm Related to AMD ROCm and removed AMD GPU labels Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build 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.

8 participants