What does "level information" mean in cuSPARSE? (CUDA 11.0)

Hello everyone,

I want to upgrade my preconditioned conjugate gradient solver from CUDA 8.0 to CUDA 11.0.
But the functions (eg. csrsv2, csric02) require a variable “cusparseSolvePolicy_t” which is not defined in CUDA 8.0.

The documentation only says it is used to generate the level information, but I don’t quite understand what it means.
Does anyone know what does that mean?
Can you tell me what’s the difference between NO_LEVEL and USE_LEVEL ?

The CUSPARSE documentation has other information about these settings (search for the option names). I have never used CUSPARSE, but from the documentation it seems that when level information is enabled, some functions record additional information that can be used later to allow faster processing. There is a discussion in the documentation about specific functions that can make use of the information and applicable restrictions.

Since you state that this is a new feature, the backward compatible setting is very likely CUSPARSE_SOLVE_POLICY_NO_LEVEL. You could start out with that, and later examine whether it makes sense to change to CUSPARSE_SOLVE_POLICY_USE_LEVEL for your code, after digesting all relevant parts of the documentation.

1 Like