diff --git a/tests/unit/active/test_async_op_cuda.cc b/tests/unit/active/test_async_op_cuda.cc index 83fe38ccc5..3b27b85222 100644 --- a/tests/unit/active/test_async_op_cuda.cc +++ b/tests/unit/active/test_async_op_cuda.cc @@ -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("test_async_op_cuda"); auto ep = theTerm()->makeEpochRooted(term::UseDS{true});