Skip to content

[ROCm]: Fix build from source failure with gcc14 and ROCm 6.3 #13779

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

arjunkathuria
Copy link
Contributor

@arjunkathuria arjunkathuria commented Feb 24, 2025

Fixes build from source failures when building for ROCm.

See #13777 for issue description
Solves #13777

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

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 either: Add ready label to the PR or enable auto-merge.

🚀

@arjunkathuria
Copy link
Contributor Author

[edit][force push] Incorporate pre-commit hooks' formatting suggestions.

@arjunkathuria
Copy link
Contributor Author

@houseroad
Copy link
Collaborator

Is this still needed?

@houseroad
Copy link
Collaborator

If so, can we rebase?

@paralin
Copy link

paralin commented May 6, 2025

This fixed the build for me against the current main branch w/o changes

@arjunkathuria
Copy link
Contributor Author

Thanks for confirming Christian ( @paralin ).

Seems it's still required Lu ( @houseroad ).
There seem no conflicts and the PR can be merged or would you need this rebased to latest master?

Solves vllm-project#13777
See vllm-project#13777

Fixes build from source failures when building for ROCm.

Signed-off-by: Arjun Kathuria <arjun.kathuria8@gmail.com>
@arjunkathuria arjunkathuria force-pushed the ROCm/source-build-fix branch from c041267 to 9862d40 Compare May 6, 2025 09:47
@arjunkathuria
Copy link
Contributor Author

Nevermind, had some time at hand, rebased.

@arjunkathuria
Copy link
Contributor Author

Hi Lu ( @houseroad ), can we merge this?

@hongxiayang hongxiayang added the ready ONLY add when PR is ready to merge/full CI is needed label May 9, 2025
@hongxiayang
Copy link
Collaborator

Looks fine to me. Let's check to see all the tests pass.

@hongxiayang hongxiayang self-requested a review May 9, 2025 13:32
// hip-clang std::clamp __glibcxx_assert_fail host function when building on
// Arch/gcc14. The following replaces std::clamp usage with similar logic
// dst = std::clamp(dst, i8_min, i8_max);
dst = (dst < i8_min) ? i8_min : (dst > i8_max) ? i8_max : dst;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: dst = std::min(i8_max, max(dst, i8_min))

Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: dst = std::min(i8_max, max(dst, i8_min))

Suggest not to change to use std::min and std::max, as this would leads more comparison in average, and is less efficient: I have commented/suggested the same in the PR ( pytorch/pytorch#127812 ) in PyTorch when we first addressed this type of issues:
image

This pure "<" with ">" comparison is also align with what the clamp's original's documentation.

Copy link
Collaborator

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Looks good.

@houseroad houseroad enabled auto-merge (squash) May 9, 2025 18:34
@vllm-bot vllm-bot merged commit d8487ef into vllm-project:main May 13, 2025
98 of 100 checks passed
mawong-amd pushed a commit to ROCm/vllm that referenced this pull request May 14, 2025
…roject#13779)

Signed-off-by: Arjun Kathuria <arjun.kathuria8@gmail.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.

5 participants