Skip to content

Commit

Permalink
#1849: tests: Skip the CUDA test if CUDA driver is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Jun 19, 2022
1 parent edb20e9 commit e674cff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/active/test_async_op_cuda.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ struct CUDAGroup {
};

TEST_F(TestAsyncOp, test_async_op_cuda) {
int driverVer;
if (
(cudaDriverGetVersion(&driverVer) == cudaErrorInvalidValue) or
(driverVer == 0)) {
vtWarn(
"Trying to run test_async_op_cuda but CUDA driver is not present!\n"
);

return;
}

auto const this_node = theContext()->getNode();
auto p = theObjGroup()->makeCollective<CUDAGroup>("test_async_op_cuda");
auto ep = theTerm()->makeEpochRooted(term::UseDS{true});
Expand Down

0 comments on commit e674cff

Please sign in to comment.