Skip to content

Commit

Permalink
Skip sequence parallel test when D=1 (#3451)
Browse files Browse the repository at this point in the history
Add gtest skip when for distributed transformer sequence parallel when
number of devices=1.
  • Loading branch information
cowanmeg authored and jacobhinkle committed Dec 3, 2024
1 parent 6cd1f2a commit 6b5b7b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/cpp/test_multidevice_transformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,9 @@ TEST_P(DistributedTransformerTest, MultiheadAttention_SP) {
GTEST_SKIP() << "Requires number of devices=" << D
<< " evenly divide H=" << H;
}
if (D == 1) {
GTEST_SKIP() << "Requires >1 devices, D=" << D;
}
auto dtype = GetParam();
auto fusion = std::make_unique<Fusion>();
FusionGuard fg(fusion.get());
Expand Down Expand Up @@ -1125,6 +1128,9 @@ TEST_P(DistributedTransformerTest, Forward_SP) {
GTEST_SKIP() << "Requires number of devices=" << D
<< " evenly divide H=" << H;
}
if (D == 1) {
GTEST_SKIP() << "Requires >1 devices, D=" << D;
}
auto dtype = GetParam();
at::ScalarType at_dtype = data_type_to_aten(dtype);
auto fusion = std::make_unique<Fusion>();
Expand Down

0 comments on commit 6b5b7b8

Please sign in to comment.