Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions resolve/hykkt/cholesky/CholeskySolverHip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ namespace ReSolve
mem_.allocateArrayOnDevice(&Q_, A_->getNumRows());
mem_.copyArrayHostToDevice(Q_, static_cast<index_type*>(factorization_->Perm), A_->getNumRows());

//tmp rhs for analysis
// tmp rhs for analysis
mem_.allocateArrayOnDevice(&rhs_tmp_, A_->getNumColumns());
mem_.setArrayToConstOnHost(rhs_tmp_, 1.0, A_->getNumColumns());

// Store analysis in rfinfo_
rocblas_status status = rocsolver_dcsrrf_analysis(handle_,
A_->getNumRows(),
Expand All @@ -130,12 +130,12 @@ namespace ReSolve
rhs_tmp_,
A_->getNumRows(),
rfinfo_);
mem_.deleteOnDevice(rhs_tmp_);
rhs_tmp_ = nullptr;
if (status != rocblas_status_success)
{
out::error() << "Analysis step failed with status: " << status << "\n";
}
mem_.deleteOnDevice(rhs_tmp_);
rhs_tmp_ = nullptr;
if (status != rocblas_status_success)
{
out::error() << "Analysis step failed with status: " << status << "\n";
}
}
else // re-factorize
{
Expand Down
4 changes: 2 additions & 2 deletions resolve/hykkt/cholesky/CholeskySolverHip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace ReSolve
matrix::Csr* L_;
index_type* Q_;

real_type* rhs_tmp_;// used during analysis
real_type* rhs_tmp_; // used during analysis

cholmod_sparse* convertToCholmod(matrix::Csr* A);
};
} // namespace hykkt
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/hykkt/runHykktCholeskyTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ void runTests(const std::string& backend, ReSolve::memory::MemorySpace memspace,
ReSolve::tests::HykktCholeskyTests test(memspace, handler);

result += test.minimalCorrectness();
handler.setValuesChanged(true, memspace);
workspace.resetLinAlgWorkspace(); // reset is necessary due to different sparsity.

for (int size : {3, 10, 100, 1000})
{
Expand Down