-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structured spmv #365
Structured spmv #365
Conversation
The implementation hinges on the regularity of the sparsity pattern of the matrix. It is leveraged to access vector entries without using the view of column indices. The new kernel is faster for the 5 stencils implemented: 1D, 2D and 3D FD and FE. A unit test and a performance test are added to assess correctness and performance of the kernel. Three utility functions are implemented in: test_common/KokkosKernels_Test_Structured_Matrix.hpp They return matrices corresponding to the discretization of the Laplace operator on 1D, 2D and 3D grids for FD and FE discretization.
} | ||
} | ||
|
||
// Treat exterior points using unstructured algorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Treat all exteriors as one as it does unstructured anyway ?
It would be nicer to remove the unused or superfluous explicit instantiations, like CudaSpace and CudaUMVSpace, or HostSpace and HBWSpace. |
@mhoemmen I do not disagree with this idea but I think we should open a specific issue regarding automatic ETI in Kokkos-Kernels and decide what needs to stay and what can be removed. At the moment all I do is run a specific script that generates automatically all the ETI files for me... |
There was a bug in the matrix construction, the value of numEntries was not set. Also adding initial support for multivectors, so it only uses the unstructured spmv. It also does check for a multivector containing a single vector in which case it calls the vector implementation of spmv_struct.
Also adding a "dumb" first implementation of spmv_mv
This first implementation has a hard coded value for numVecs=8. But should be enough for initial testing of the algorithmic performance.
@lucbv Are you done with the changes you wanted to make ? I am checking if it is ok for me to review. |
btw. Nathan asked that we stop merging unless its super critical. Because he is close to getting done with the promotion. |
Alright, I won't merge. |
I'm closing this as this branch is now stale and I have refreshed this work in PR #446 |
This is an implementation of the algorithm outlined in issue #364. It performs well for all covered stencils for matrices larger than 25k rows.
A unit test and a performance test are added to assess correctness and performance, results have been obtained on white.