mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-11 08:50:21 +00:00
Revert env/core changes superseded by main
main already provides MSCCLPP_IB_GID_INDEX env override and MSCCLPP_FORCE_DISABLE_GDR, so drop the now-redundant divergences in include/mscclpp/core.hpp, include/mscclpp/env.hpp, and src/core/env.cpp. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include <bitset>
|
||||
#include <future>
|
||||
#include <memory>
|
||||
#include <mscclpp/env.hpp>
|
||||
#include <mscclpp/errors.hpp>
|
||||
#include <mscclpp/gpu_data_types.hpp>
|
||||
#include <mscclpp/version.hpp>
|
||||
@@ -431,7 +430,7 @@ struct EndpointConfig {
|
||||
int maxWrPerSend = DefaultMaxWrPerSend, Mode mode = Mode::Default)
|
||||
: deviceIndex(deviceIndex),
|
||||
port(port),
|
||||
gidIndex(env()->ibGidIndex >= 0 ? env()->ibGidIndex : gidIndex),
|
||||
gidIndex(gidIndex),
|
||||
maxCqSize(maxCqSize),
|
||||
maxCqPollNum(maxCqPollNum),
|
||||
maxSendWr(maxSendWr),
|
||||
|
||||
@@ -116,8 +116,7 @@ class Env {
|
||||
const bool forceDisableGdr;
|
||||
|
||||
/// Env name: `MSCCLPP_IB_GID_INDEX`. The GID index to use for IB transport.
|
||||
/// When set to a non-negative value, overrides the `gidIndex` parameter passed to `EndpointConfig::Ib`.
|
||||
/// Default is -1 (unset, uses the constructor argument which defaults to `EndpointConfig::Ib::DefaultGidIndex`).
|
||||
/// Default is 0. Used when `EndpointConfig::Ib::gidIndex` is -1 (unspecified).
|
||||
const int ibGidIndex;
|
||||
|
||||
private:
|
||||
|
||||
@@ -67,7 +67,7 @@ Env::Env()
|
||||
ncclSymmetricMemory(readEnv<bool>("MSCCLPP_NCCL_SYMMETRIC_MEMORY", false)),
|
||||
forceDisableNvls(readEnv<bool>("MSCCLPP_FORCE_DISABLE_NVLS", false)),
|
||||
forceDisableGdr(readEnv<bool>("MSCCLPP_FORCE_DISABLE_GDR", false)),
|
||||
ibGidIndex(readEnv<int>("MSCCLPP_IB_GID_INDEX", -1)) {}
|
||||
ibGidIndex(readEnv<int>("MSCCLPP_IB_GID_INDEX", 0)) {}
|
||||
|
||||
std::shared_ptr<Env> env() {
|
||||
static std::shared_ptr<Env> globalEnv = std::shared_ptr<Env>(new Env());
|
||||
|
||||
Reference in New Issue
Block a user