Skip to content

Conversation

@Binyang2014
Copy link
Contributor

@Binyang2014 Binyang2014 commented Dec 24, 2025

Replacing most of checks for __HIP_PLATFORM_AMD__ with MSCCLPP_DEVICE_HIP for device and MSCCLPP_USE_ROCM for host source file.

@Binyang2014 Binyang2014 requested a review from Copilot December 24, 2025 04:27
@Binyang2014 Binyang2014 marked this pull request as ready for review December 24, 2025 04:27
Copy link
Contributor

Copilot AI left a 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 with MSCCLPP_DEVICE_HIP macro
  • Removed the unnecessary src/include/atomic.hpp wrapper 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

Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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.

@Binyang2014 Binyang2014 changed the title change to use macro MSCCLPP_DEVICE_HIP instead of __HIP_PLATFORM_AMD__ Replace __HIP_PLATFORM_AMD__ to use internal macro Dec 24, 2025
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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.

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.

2 participants