Skip to content

Commit

Permalink
review updates and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj committed Sep 23, 2022
1 parent ef2b32f commit a02d707
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 865 deletions.
2 changes: 1 addition & 1 deletion dev_tools/scripts/config
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- PathPrefix: "ginkgo/core"
- PathIgnore: "0"
- RemoveTest: "true"
- "^test/matric/csr_kernels2.cpp"
- "^test/matrix/csr_kernels2.cpp"
- CoreSuffix: "_kernels2"
- PathPrefix: "ginkgo/core"
- PathIgnore: "0"
Expand Down
709 changes: 0 additions & 709 deletions omp/test/stop/residual_norm_kernels.cpp

This file was deleted.

10 changes: 6 additions & 4 deletions reference/test/matrix/csr_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,9 @@ TYPED_TEST(Csr, ConvertsToPrecision)
tmp->convert_to(res.get());

GKO_ASSERT_MTX_NEAR(this->mtx2, res, residual);
ASSERT_EQ(typeid(*this->mtx2->get_strategy()),
typeid(*res->get_strategy()));
auto first_strategy = this->mtx2->get_strategy();
auto second_strategy = res->get_strategy();
ASSERT_EQ(typeid(*first_strategy), typeid(*second_strategy));
}


Expand All @@ -624,8 +625,9 @@ TYPED_TEST(Csr, MovesToPrecision)
tmp->move_to(res.get());

GKO_ASSERT_MTX_NEAR(this->mtx2, res, residual);
ASSERT_EQ(typeid(*this->mtx2->get_strategy()),
typeid(*res->get_strategy()));
auto first_strategy = this->mtx2->get_strategy();
auto second_strategy = res->get_strategy();
ASSERT_EQ(typeid(*first_strategy), typeid(*second_strategy));
}


Expand Down
2 changes: 1 addition & 1 deletion test/components/prefix_sum_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ TYPED_TEST(PrefixSum, EqualsReference)
{
using gko::size_type;
for (auto size :
{size_type{0}, size_type{1}, size_type{100}, this->total_size}) {
{size_type{0}, size_type{1}, size_type{131}, this->total_size}) {
SCOPED_TRACE(size);
gko::kernels::reference::components::prefix_sum(
this->ref, this->vals.get_data(), size);
Expand Down
6 changes: 2 additions & 4 deletions test/factorization/par_ilu_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ class ParIlu : public CommonTestFixture {
std::string file_name(gko::matrices::location_ani4_mtx);
auto input_file = std::ifstream(file_name, std::ios::in);
auto mtx_temp = gko::read<Csr>(input_file, ref);
auto dmtx_temp = gko::clone(exec, mtx_temp);
// Make sure there are diagonal elements present
gko::kernels::reference::factorization::add_diagonal_elements(
ref, mtx_temp.get(), false);
gko::kernels::EXEC_NAMESPACE::factorization::add_diagonal_elements(
exec, dmtx_temp.get(), false);
auto dmtx_temp = gko::clone(exec, mtx_temp);
mtx = gko::give(mtx_temp);
dmtx = gko::give(dmtx_temp);
}
Expand Down Expand Up @@ -143,7 +141,7 @@ class ParIlu : public CommonTestFixture {
initialize_row_ptrs(l_row_ptrs.get_data(), u_row_ptrs.get_data(),
dl_row_ptrs.get_data(), du_row_ptrs.get_data());
// Since `initialize_row_ptrs` was already tested, it is expected that
// `*` and `*d` contain identical values
// `*` and `d*` contain identical values
auto l_nnz = l_row_ptrs.get_const_data()[num_row_ptrs - 1];
auto u_nnz = u_row_ptrs.get_const_data()[num_row_ptrs - 1];

Expand Down
8 changes: 7 additions & 1 deletion test/matrix/csr_kernels2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,10 @@ TEST_F(Csr, SimpleApplySparseToSparseCsrMatrixIsEquivalentToRef)
}


// TODO: broken in ROCm <= 4.5
#ifndef GKO_COMPILING_HIP


TEST_F(Csr, SimpleApplyToEmptyCsrMatrixIsEquivalentToRef)
{
set_up_apply_data<Mtx::classical>();
Expand All @@ -573,6 +577,9 @@ TEST_F(Csr, SimpleApplyToEmptyCsrMatrixIsEquivalentToRef)
}


#endif


TEST_F(Csr, AdvancedApplyToIdentityMatrixIsEquivalentToRef)
{
set_up_apply_data<Mtx::classical>();
Expand Down Expand Up @@ -1223,7 +1230,6 @@ TEST_F(Csr, CanDetectMissingDiagonalEntry)

TEST_F(Csr, CanDetectWhenAllDiagonalEntriesArePresent)
{
using T = double;
using Csr = Mtx;
auto ref_mtx = gen_mtx<Csr>(103, 98, 10);
gko::utils::ensure_all_diagonal_entries(ref_mtx.get());
Expand Down
6 changes: 0 additions & 6 deletions test/matrix/ell_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,6 @@ TEST_F(Ell, MixedAdvancedApplyWithStrideToDenseMatrixIsEquivalentToRef3)
}


#ifndef GKO_COMPILING_OMP


TEST_F(Ell, SimpleApplyByAtomicIsEquivalentToRef)
{
set_up_apply_data(10, 10000);
Expand Down Expand Up @@ -459,9 +456,6 @@ TEST_F(Ell, AdvancedByAtomicToDenseMatrixApplyIsEquivalentToRef)
}


#endif // !defined(GKO_COMPILING_OMP)


TEST_F(Ell, SimpleApplyOnSmallMatrixIsEquivalentToRef)
{
set_up_apply_data(1, 10);
Expand Down
Loading

0 comments on commit a02d707

Please sign in to comment.