Disable cusparse bad args tests in spmat, spvec, dnmat, and dnvec as it is heavily dependent on cusparse version and is frequently inconsistent with rocsparse behaviour. In fact the entire cusparse verification IMHO requires that we tests every cusparse version in CI otherwise minor changes in edge case behaviour continually will result in failures and consume a lot of developer time (for example using cusparse 11.4 vs 12.4). Once I have added the hipsparse benchmarking tool, will start going over cusparse testing and try to refactor so that we can more easily test against all supported cusparse versions and have (where required) different edge case behaviour.
Even in the current code we constantly already ignore many cases because they fail with cusparse.
Also in sparse_to_dense and dense_to_sparse, cusparse does not support mixed index precision (at least in cusparse 12.4) so I made the tests just use int32.
Finally, move #endif to after INSTANTIATE_TEST_SUITE_P calls in test_xxx.cpp files. Otherwise if we have code like:
endif //<------------------- This should be moved to be after the call to INSTANTIATE_TEST_SUITE_P
INSTANTIATE_TEST_SUITE_P(...)
Then if using CUDART_VERSION >= 12000, there are no tests to instaniate but we are trying to. This causes googletest errors. By placing #endif after INSTANTIATE_TEST_SUITE_P, we only try and instantiate tests if we have some. This fix constitutes most of the file changes in this PR.
if(!defined(CUDART_VERSION) || (CUDART_VERSION >= 11010 && CUDART_VERSION < 12000))
TEST(axpyi_bad_arg, axpyi_float)
endif //<------------------- This should be moved to be after the call to INSTANTIATE_TEST_SUITE_P
INSTANTIATE_TEST_SUITE_P(...)
Then if using CUDART_VERSION >= 12000, there are no tests to instaniate but we are trying to. This causes googletest errors. By placing #endif after INSTANTIATE_TEST_SUITE_P, we only try and instantiate tests if we have some. This fix constitutes most of the file changes in this PR.