Skip to content

Commit 0af5afb

Browse files
authored
Skip gtests for new lanczos solver when CUDA version is 11.4 or below. (#2520)
Medium- to longer term, we plan to fix this issue (ref: #2519).
1 parent 4ecd925 commit 0af5afb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

cpp/test/sparse/solver/lanczos.cu

+13
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <raft/spectral/matrix_wrappers.hpp>
3737
#include <raft/util/cudart_utils.hpp>
3838

39+
#include <cuda_runtime.h>
3940
#include <driver_types.h>
4041

4142
#include <gtest/gtest.h>
@@ -265,6 +266,18 @@ class lanczos_tests : public ::testing::TestWithParam<lanczos_inputs<IndexType,
265266

266267
void Run()
267268
{
269+
int runtimeVersion;
270+
cudaError_t result = cudaRuntimeGetVersion(&runtimeVersion);
271+
272+
if (result == cudaSuccess) {
273+
int major = runtimeVersion / 1000;
274+
int minor = (runtimeVersion % 1000) / 10;
275+
276+
// Skip gtests for CUDA 11.4.x and below because hard-coded results are causing issues.
277+
// See https://github.com/rapidsai/raft/issues/2519 for more information.
278+
if (major == 11 && minor <= 4) { GTEST_SKIP(); }
279+
}
280+
268281
raft::random::uniform<ValueType>(handle, rng, v0.view(), 0, 1);
269282
std::tuple<IndexType, ValueType, IndexType> stats;
270283

0 commit comments

Comments
 (0)