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

Use IB transport flags only when an IB device exists #355

Merged
merged 3 commits into from
Sep 19, 2024
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
10 changes: 7 additions & 3 deletions test/mscclpp-test/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <fstream>
#include <iomanip>
#include <iostream>
#include <mscclpp/core.hpp>
#include <mscclpp/utils.hpp>
#include <nlohmann/json.hpp>
#include <sstream>
Expand Down Expand Up @@ -399,7 +400,8 @@ void BaseTestEngine::setupMeshConnectionsInternal(
void BaseTestEngine::setupMeshConnections(std::vector<DeviceHandle<mscclpp::SimpleProxyChannel>>& proxyChannels,
void* inputBuff, size_t inputBuffBytes, void* outputBuff,
size_t outputBuffBytes, SetupChannelFunc setupChannel) {
const mscclpp::TransportFlags allTransports = mscclpp::Transport::CudaIpc | IBs[args_.gpuNum];
mscclpp::TransportFlags allTransports = mscclpp::Transport::CudaIpc;
if (mscclpp::getIBDeviceCount() > 0) allTransports |= IBs[args_.gpuNum];
mscclpp::RegisteredMemory inputBufRegMem = comm_->registerMemory(inputBuff, inputBuffBytes, allTransports);
mscclpp::RegisteredMemory outputBufRegMem;
if (outputBuff) {
Expand Down Expand Up @@ -429,7 +431,8 @@ void BaseTestEngine::setupMeshConnections(std::vector<DeviceHandle<mscclpp::Simp
void BaseTestEngine::setupMeshConnections(std::vector<mscclpp::SmChannel>& smChannels, void* inputBuff,
size_t inputBuffBytes, void* outputBuff, size_t outputBuffBytes,
ChannelSemantic semantic, size_t nChannelPerConnection) {
const mscclpp::TransportFlags allTransports = mscclpp::Transport::CudaIpc | IBs[args_.gpuNum];
mscclpp::TransportFlags allTransports = mscclpp::Transport::CudaIpc;
if (mscclpp::getIBDeviceCount() > 0) allTransports |= IBs[args_.gpuNum];
mscclpp::RegisteredMemory inputBufRegMem = comm_->registerMemory(inputBuff, inputBuffBytes, allTransports);
mscclpp::RegisteredMemory getPacketBufRegMem;
mscclpp::RegisteredMemory outputBufRegMem;
Expand Down Expand Up @@ -469,7 +472,8 @@ void BaseTestEngine::setupMeshConnections(std::vector<mscclpp::SmChannel>& smCha
void* inputBuff, size_t inputBuffBytes, void* putPacketBuff,
size_t putPacketBuffBytes, void* getPacketBuff, size_t getPacketBuffBytes,
void* outputBuff, size_t outputBuffBytes) {
const mscclpp::TransportFlags allTransports = mscclpp::Transport::CudaIpc | IBs[args_.gpuNum];
mscclpp::TransportFlags allTransports = mscclpp::Transport::CudaIpc;
if (mscclpp::getIBDeviceCount() > 0) allTransports |= IBs[args_.gpuNum];
mscclpp::RegisteredMemory inputBufRegMem = comm_->registerMemory(inputBuff, inputBuffBytes, allTransports);
mscclpp::RegisteredMemory putPacketBufRegMem;
mscclpp::RegisteredMemory getPacketBufRegMem;
Expand Down
Loading