Merge pull request #4637 from akva2/gpu_tests_add_labels

GPU tests: add a label and make missing device a failure
This commit is contained in:
Arne Morten Kvarving 2023-05-09 12:47:10 +02:00 committed by GitHub
commit 0196259537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 4 deletions

View File

@ -540,19 +540,24 @@ add_custom_target(extra_test ${CMAKE_CTEST_COMMAND} -C ExtraTests)
if(CUDA_FOUND)
target_link_libraries( opmsimulators PUBLIC ${CUDA_cusparse_LIBRARY} )
target_link_libraries( opmsimulators PUBLIC ${CUDA_cublas_LIBRARY} )
set_tests_properties(cusparseSolver PROPERTIES LABELS gpu_cuda)
endif()
if(OpenCL_FOUND)
target_link_libraries( opmsimulators PUBLIC ${OpenCL_LIBRARIES} )
set_tests_properties(openclSolver solvetransposed3x3 csrToCscOffsetMap
PROPERTIES LABELS gpu_opencl)
endif()
if(ROCALUTION_FOUND)
target_include_directories(opmsimulators PUBLIC ${rocalution_INCLUDE_DIR}/rocalution)
set_tests_properties(rocalutionSolver PROPERTIES LABELS gpu_rocm)
endif()
if(rocsparse_FOUND AND rocblas_FOUND)
target_link_libraries( opmsimulators PUBLIC roc::rocsparse )
target_link_libraries( opmsimulators PUBLIC roc::rocblas )
set_tests_properties(rocsparseSolver PROPERTIES LABELS gpu_rocm)
endif()
if(VexCL_FOUND)

View File

@ -198,6 +198,6 @@ BOOST_AUTO_TEST_CASE(TestCusparseSolver)
// Test with 3x3 block solvers.
test3(prm);
} catch(const DeviceInitException& ) {
BOOST_WARN_MESSAGE(true, "Problem with initializing a device. skipping test");
BOOST_ERROR("Problem with initializing a device.");
}
}

View File

@ -195,6 +195,6 @@ BOOST_AUTO_TEST_CASE(TestOpenclSolver)
// Test with 3x3 block solvers.
test3(prm);
} catch(const PlatformInitException& ) {
BOOST_WARN_MESSAGE(true, "Problem with initializing Platform. skipping test");
BOOST_ERROR("Problem with initializing Platform.");
}
}

View File

@ -156,6 +156,6 @@ BOOST_AUTO_TEST_CASE(TestRocalutionSolver)
// test rocalution with 3x3 blocks
test3(prm);
} else {
BOOST_WARN_MESSAGE(true, "Problem with initializing a device. skipping test");
BOOST_ERROR("Problem with initializing a device.");
}
}

View File

@ -212,6 +212,6 @@ BOOST_AUTO_TEST_CASE(TestRocsparseSolver)
// Test with 3x3 block solvers.
test3(prm);
} catch(const HIPInitException& ) {
BOOST_WARN_MESSAGE(true, "Problem with initializing HIP, skipping test");
BOOST_ERROR("Problem with initializing HIP.");
}
}