Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions tests/cpp/multidevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// clang-format on
#include <sys/types.h>
#include <unistd.h>
#include <mutex>

#ifdef NVFUSER_DISTRIBUTED
#include <torch/csrc/distributed/c10d/debug.h>
Expand Down Expand Up @@ -42,7 +41,6 @@ MultiDeviceTest::MultiDeviceTest() {
tensor_options_ =
at::TensorOptions().dtype(at::kFloat).device(communicator_->device());
debug_print = getNvFuserEnv("MULTIDEVICE_DEBUG_PRINT") != nullptr;
disable_skip = getNvFuserEnv("MULTIDEVICE_DISABLE_SKIP") != nullptr;
}

MultiDeviceTest::~MultiDeviceTest() {
Expand All @@ -56,10 +54,9 @@ MultiDeviceTest::~MultiDeviceTest() {
}

void MultiDeviceTest::SetUp() {
// Set the same random seed for all processes.
NVFuserTest::SetUp();

if (!disable_skip && !communicator_->is_available()) {
if (!communicator_->is_available()) {
GTEST_SKIP() << "This test needs an available communicator.";
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/cpp/multidevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class MultiDeviceTest : public NVFuserTest {
Communicator* communicator_;
c10::TensorOptions tensor_options_;
bool debug_print;
bool disable_skip;
};

// This macro is supposed to be used in a test case of a MultiDeviceTest or its
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/test_multidevice_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ TEST_P(PipelineTestTwoStages, Communication) {
do_reduction,
sharded_dim,
use_fusion_executor_cache] = GetParam();
if (!disable_skip && !communicator_->isBackendAvailable(backend)) {
if (!communicator_->isBackendAvailable(backend)) {
GTEST_SKIP() << "Backend not available";
}
communicator_->setDefaultBackend(backend);
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/test_multidevice_sharding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

namespace nvfuser {

using testing::Contains;
using testing::Each;
using testing::ElementsAre;
using testing::Not;
Expand Down Expand Up @@ -1283,4 +1282,5 @@ TEST_F(MultiDeviceTest, MultipleIncompatibleReshapes) {
EXPECT_FALSE(runtime->isSegmented());
}
}

} // namespace nvfuser
Loading