Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Structured spmv #365

wants to merge 8 commits into from

Conversation

lucbv
Copy link
Contributor

@lucbv lucbv commented Dec 20, 2018

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.

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.
@lucbv lucbv self-assigned this Dec 20, 2018
@lucbv lucbv changed the base branch from master to develop December 20, 2018 18:17
}
}

// Treat exterior points using unstructured algorithm
Copy link
Contributor

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 ?

@mhoemmen
Copy link
Contributor

It would be nicer to remove the unused or superfluous explicit instantiations, like CudaSpace and CudaUMVSpace, or HostSpace and HBWSpace.

@lucbv
Copy link
Contributor Author

lucbv commented Jan 22, 2019

@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...

lucbv added 6 commits January 24, 2019 11:34
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.
@srajama1
Copy link
Contributor

srajama1 commented Feb 1, 2019

@lucbv Are you done with the changes you wanted to make ? I am checking if it is ok for me to review.

@crtrott
Copy link
Member

crtrott commented Feb 1, 2019

btw. Nathan asked that we stop merging unless its super critical. Because he is close to getting done with the promotion.

@srajama1
Copy link
Contributor

srajama1 commented Feb 1, 2019

Alright, I won't merge.

@lucbv
Copy link
Contributor Author

lucbv commented Jul 1, 2019

I'm closing this as this branch is now stale and I have refreshed this work in PR #446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants