Skip to content

Commit

Permalink
fix(build): tuner: prefer ncclInvalidArgument
Browse files Browse the repository at this point in the history
ncclInvalidArgument is present both in neuron and nvidia whereas
ncclInvalidUsage is only present in neuron headers. Callsite just wraps
the value in ncclcheck and the meaning isn't meaningfully changed, so
prefer the portable one.
  • Loading branch information
aws-nslick committed Mar 15, 2024
1 parent 9e4e2e9 commit d127fa8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tuner/nccl_ofi_tuner.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ ncclResult_t nccl_ofi_tuner_init(size_t nRanks, size_t nNodes, ncclDebugLogger_t
*/
if (getenv("NCCL_ALGO") || getenv("NCCL_PROTO")) {
NCCL_OFI_WARN("The tuner plugin can not be loaded when explicitly choosing an algorithm or protocol with NCCL_ALGO/NCCL_PROTO");
return ncclInvalidUsage;
// FIXME: "ncclInvalidUsage should be returned when the error is
// most likely a user error" per nccl docs, which arguably makes
// it a better return code here than ncclInvalidArgument, but
// the former is currently not vended in ext-net headers, so
// we're returning ncclInvalidArgument instead.
return ncclInvalidArgument;
}

struct nccl_ofi_tuner_model_params params = {
Expand Down

0 comments on commit d127fa8

Please sign in to comment.