Replace __HIP_PLATFORM_AMD__ to use internal macro (#712)

Replacing most of checks for `__HIP_PLATFORM_AMD__` with
`MSCCLPP_DEVICE_HIP` for device and `MSCCLPP_USE_ROCM` for host source
file.
This commit is contained in:
Binyang Li
2026-01-04 20:47:58 +08:00
committed by GitHub
parent b2d96e8ba5
commit ca6a4a3274
9 changed files with 44 additions and 39 deletions

View File

@@ -16,7 +16,7 @@ using namespace mscclpp;
constexpr int BYTE_BITS = 8;
static DLDeviceType getDeviceType() {
#if defined(__HIP_PLATFORM_AMD__)
#if defined(MSCCLPP_USE_ROCM)
return kDLROCM;
#else
return kDLCUDA;