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

Add inline to nccl_sync_stream() #750

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions cpp/include/raft/comms/detail/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ namespace raft {
namespace comms {
namespace detail {

constexpr size_t

get_datatype_size(const datatype_t datatype)
constexpr size_t get_datatype_size(const datatype_t datatype)
{
switch (datatype) {
case datatype_t::CHAR: return sizeof(char);
Expand All @@ -82,9 +80,7 @@ get_datatype_size(const datatype_t datatype)
}
}

constexpr ncclDataType_t

get_nccl_datatype(const datatype_t datatype)
constexpr ncclDataType_t get_nccl_datatype(const datatype_t datatype)
{
switch (datatype) {
case datatype_t::CHAR: return ncclChar;
Expand All @@ -99,9 +95,7 @@ get_nccl_datatype(const datatype_t datatype)
}
}

constexpr ncclRedOp_t

get_nccl_op(const op_t op)
constexpr ncclRedOp_t get_nccl_op(const op_t op)
{
switch (op) {
case op_t::SUM: return ncclSum;
Expand All @@ -112,7 +106,7 @@ get_nccl_op(const op_t op)
}
}

status_t nccl_sync_stream(ncclComm_t comm, cudaStream_t stream)
inline status_t nccl_sync_stream(ncclComm_t comm, cudaStream_t stream)
{
cudaError_t cudaErr;
ncclResult_t ncclErr, ncclAsyncErr;
Expand Down