In cuSPARSE, you can solve a sparse triangular linear system by calling cusparse<t>csrsv2_solve(). However, you need to call cusparse<t>csrsv2_bufferSize() and cusparse<t>csrsv2_analysis() first.

From what I read in the doc, it seems:

  • csrsv2 might need additional memory, and csrsv2_bufferSize() tells you how much that should be.
  • csrsv2_analysis() analyze the sparsity pattern of the coefficient matrix. It may or may not improve the performance of csrsv2_solve().

The documentation says:

  • csrsv2_analysis() reports a structural zero and computes level information.
  • The level information may not improve the performance. For example, a tridiagonal matrix has no parallelism.
  • csrsv2_solve() reports the first numerical zero, including a structural zero.

So here is what I don't understand:

  • What are those things: structural zero, numerical zero, level information?
  • And why tridiagonal matrices have no parallellism? What does parallelism mean here?

I guess structural zero and numerical zero have something to do with the singularity of the matrix, but I need clarification on that.


1 Answer 1


Structural and numerical zeros describe how zero values in your matrix are stored. Structural zeros are zeros that are implied to be zero because they are not present in the data structure. Numerical zeros are zeros that are explicitly stored. For example, the matrix \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} can be stored in coordinate format as

i  j  value
1  2  1
2  2  0

Then, the value at (2, 2) would be a numerical zero, because it is numerically stored as zero, while the values at (1, 1) and (2, 1) are structural zeros because they aren't explicitly stored.

A GPU's performance comes from having a lot of arithmetic units. However, being able to use it's full power requires having many arithmetic operations that can be done simultaneously (in parallel) so that all of those arithmetic units are being used. However, triangular solves have various dependencies that complicate this. My impression is that the level information is used to find the available parallelism in the solve, but I've yet to find any specifics.

For tridiagonal matrices, a triangular solve only uses the diagonal and one of the off-diagonals. Each diagonal depends on the previous off-diagonal, and each off-diagonal depends on the previous diagonal. So, there's a strict, sequential order that the arithmetic happens in.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.