Skip to content
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

using PyTorch WARP_SHFL_DOWN macro for half support #2843

Merged
merged 2 commits into from
Sep 3, 2023

Conversation

zstreet87
Copy link
Contributor

@zstreet87 zstreet87 commented Jun 20, 2023

Motivation

In preparation for ROCm5.6, this is required for successful compilation. Using AMD's intrinsic resulted in an "ambiguous-type" error. TLDR; some hip-header migration it seems.

This PR will require tests against ROCm5.6 once it is released and the CI is using it.

Modification

Using Pytorch's macro to handle the shfl_down intrinsic for functionality and portability.

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with some of those projects, like MMDet or MMCls.
  • CLA has been signed and all committers have signed the CLA in this PR.

@zstreet87
Copy link
Contributor Author

May I have an ETA for the CI to complete? I appreciate it!

@zstreet87
Copy link
Contributor Author

We are needing this for rocm

@zstreet87
Copy link
Contributor Author

@grimoire can you take a look please?

Copy link
Member

@grimoire grimoire left a comment

Choose a reason for hiding this comment

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

LGTM @zhouzaida

@zstreet87
Copy link
Contributor Author

thanks @grimoire!

Anyone else, please review

@zstreet87
Copy link
Contributor Author

@zhouzaida can you take a look please?

@zhouzaida
Copy link
Member

@zhouzaida can you take a look please?

Hi @zstreet87 , sorry for my late reply.

@zhouzaida zhouzaida merged commit c8a9ae7 into open-mmlab:main Sep 3, 2023
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Failed to build mmcv in rocm/pytorch docker image: call to '__shfl_down' is ambiguous
3 participants