Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Binyang2014 committed Dec 3, 2024
1 parent fac8043 commit 29b799d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions apps/nccl/src/nccl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static std::vector<mscclpp::SmChannel> setupSmChannels(ncclComm_t comm,
return channels;
}

static std::pair<std::string, executionPlanInstance> loadExecutionPlan(const char* filename) {
static std::pair<std::string, executionPlanInstance> loadExecutionPlan(const std::string& filename) {
std::shared_ptr<mscclpp::ExecutionPlan> plan = std::make_shared<mscclpp::ExecutionPlan>(filename);
std::string collective = plan->collective();
planKey key{plan->minMessageSize(), plan->maxMessageSize(), plan->isInPlace()};
Expand Down Expand Up @@ -401,10 +401,13 @@ NCCL_API ncclResult_t ncclCommInitRank(ncclComm_t* comm, int nranks, ncclUniqueI

if (getenv("MSCCLPP_EXECUTION_PLAN_DIR")) {
std::string collectiveDir = getenv("MSCCLPP_EXECUTION_PLAN_DIR");
if (!std::filesystem::is_directory(collectiveDir)) {
return ncclInvalidArgument;
}
for (const auto& entry : std::filesystem::directory_iterator(collectiveDir)) {
if (entry.is_regular_file()) {
std::string filename = entry.path().filename().string();
auto plan = loadExecutionPlan(entry.path().c_str());
auto plan = loadExecutionPlan(entry.path());
commPtr->executionPlans[plan.first].push_back(plan.second);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/include/execution_plan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ struct ChannelInfo {

struct ExecutionPlan::Impl {
public:
Impl(const std::string name, const std::string planPath);
Impl(const std::string planPath);
~Impl() = default;

Expand Down

0 comments on commit 29b799d

Please sign in to comment.