Skip to content

Commit d7febe5

Browse files
test: skip cuBLASMp tests when unsupported (#3433)
Signed-off-by: Vladimir Cherepanov <vcherepanov@nvidia.com>
1 parent 242d2e8 commit d7febe5

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎tests/cpp_distributed/test_comm_gemm.cu‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <mpi.h>
1111
#include <nccl.h>
1212
#include <transformer_engine/comm_gemm.h>
13+
#include <transformer_engine/comm_gemm_overlap.h>
1314
#include <transformer_engine/gemm.h>
1415
#include <transformer_engine/transformer_engine.h>
1516

@@ -56,9 +57,20 @@ using transformer_engine::TypeInfo;
5657
} \
5758
} while (false)
5859

60+
class CublasMpEnvironment final : public ::testing::Environment {
61+
public:
62+
void SetUp() override {
63+
if (!nvte_built_with_cublasmp()) {
64+
GTEST_SKIP() << "test_comm_gemm requires TE/Common to be built with "
65+
"NVTE_WITH_CUBLASMP=1.";
66+
}
67+
}
68+
};
69+
5970
int main(int argc, char* argv[]) {
6071
::testing::InitGoogleTest(&argc, argv);
6172
CHECK_MPI(MPI_Init(&argc, &argv));
73+
::testing::AddGlobalTestEnvironment(new CublasMpEnvironment);
6274
auto ret = RUN_ALL_TESTS();
6375
CHECK_MPI(MPI_Finalize());
6476
return ret;

0 commit comments

Comments
 (0)