Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

Replaces int and ncclDataType_t parameters with strongly-typed mscclpp::DataType enum throughout the API to improve type safety and reduce ambiguity.

Changes

  • Core API: Define DataType enum in gpu_data_types.hpp with standard GPU data types (Int8, Uint8, Int32, Uint32, Int64, Uint64, Float16, Float32, BFloat16)
  • Algorithm interfaces: Update all algorithm APIs (AllReduce, AllGather, AllToAll, ReduceScatter) to accept DataType instead of int
  • NCCL interop: Add ncclDataTypeToMscclpp() conversion in apps/nccl/src/datatype_conversion.hpp with getDataTypeSize() helper
  • GPU kernels: Add mscclppDataType type alias in gpu.hpp for device-side usage

Example

// Before
AllReduce allreduce(/* ... */, int dtype);

// After  
AllReduce allreduce(/* ... */, mscclpp::DataType dtype);

// NCCL conversion
auto msccl_dtype = ncclDataTypeToMscclpp(nccl_dtype);
size_t elem_size = getDataTypeSize(msccl_dtype);

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Revise the mscclpp datatype Refactor data type handling to use mscclpp::DataType enum Nov 17, 2025
Copilot AI requested a review from seagater November 17, 2025 18:57
Copilot finished work on behalf of seagater November 17, 2025 18:57
@seagater seagater closed this Nov 17, 2025
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