-
Notifications
You must be signed in to change notification settings - Fork 77
Replace __HIP_PLATFORM_AMD__ to use internal macro
#712
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR standardizes platform detection by replacing direct checks for __HIP_PLATFORM_AMD__ with the MSCCLPP_DEVICE_HIP macro defined in device.hpp. The changes improve code maintainability by centralizing platform detection logic and removing an unnecessary wrapper header.
- Replaced all instances of
__HIP_PLATFORM_AMD__checks withMSCCLPP_DEVICE_HIPmacro - Removed the unnecessary
src/include/atomic.hppwrapper file - Updated includes to use
<mscclpp/atomic_device.hpp>directly and added<mscclpp/device.hpp>where needed
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/semaphore.cc | Replaced atomic.hpp include with atomic_device.hpp, updated conditional checks to use MSCCLPP_DEVICE_HIP, added [[maybe_unused]] attribute |
| src/registered_memory.cc | Added device.hpp include and updated HIP platform check to use MSCCLPP_DEVICE_HIP |
| src/include/execution_kernel.hpp | Added device.hpp include and replaced all HIP_PLATFORM_AMD checks with MSCCLPP_DEVICE_HIP for FP8 operations |
| src/include/atomic.hpp | Removed entire file as it was an unnecessary wrapper around atomic_device.hpp |
| src/ib.cc | Added device.hpp include and replaced all HIP_PLATFORM_AMD checks with MSCCLPP_DEVICE_HIP |
| src/gpu_utils.cc | Added device.hpp include and updated conditional compilation checks to use MSCCLPP_DEVICE_HIP |
| src/fifo.cc | Replaced atomic.hpp include with atomic_device.hpp |
| src/executor/executor.cc | Added device.hpp include and updated NPKit-related conditional check to use MSCCLPP_DEVICE_HIP |
| python/csrc/gpu_utils_py.cpp | Added device.hpp include and updated device type detection to use MSCCLPP_DEVICE_HIP |
| include/mscclpp/gpu_utils.hpp | Added device.hpp include and replaced all HIP_PLATFORM_AMD checks with MSCCLPP_DEVICE_HIP |
| include/mscclpp/gpu_data_types.hpp | Moved device.hpp include to top of file (before conditional platform includes) and updated platform check to use MSCCLPP_DEVICE_HIP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
MSCCLPP_DEVICE_HIP instead of __HIP_PLATFORM_AMD____HIP_PLATFORM_AMD__ to use internal macro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Replacing most of checks for
__HIP_PLATFORM_AMD__withMSCCLPP_DEVICE_HIPfor device andMSCCLPP_USE_ROCMfor host source file.