Expand description
Raw FFI bindings for cuSOLVER.
Prefer the safe singe-cusolver crate unless direct NVIDIA ABI access is required.
Structs§
- CUstream_
st - _IO_
FILE - _IO_
codecvt - _IO_
marker - _IO_
wide_ data - __
Bindgen Bitfield Unit - cusolver
DnContext - cusolver
DnIRS Infos - cusolver
DnIRS Params - cusolver
DnParams - double2
- float2
- gesvdj
Info - syevj
Info
Enums§
- cublas
Diag Type_ t - cublas
Fill Mode_ t - The type indicates which part (lower or upper) of the dense matrix was filled and consequently should be used by the function.
- cublas
Operation_ t - The
cublasOperation_ttype indicates which operation needs to be performed with the dense matrix. - cublas
Side Mode_ t - cusolver
AlgMode_ t - The
cusolverAlgMode_ttype indicates which algorithm is selected bycusolverDnSetAdvOptions. The set of algorithms supported for each routine is described in detail along with the routine’s documentation. - cusolver
Deterministic Mode_ t - The
cusolverDeterministicMode_ttype indicates whether multiple cuSolver function executions with the same input have the same bitwise equal result (deterministic) or might have bitwise different results (non-deterministic). In comparison to cublasAtomicsMode_t, which only includes the usage of atomic functions,cusolverDeterministicMode_tincludes all non-deterministic programming patterns. The deterministic mode can be set and queried usingcusolverDnSetDeterministicModeandcusolverDnGetDeterministicModeroutines, respectively. - cusolver
Direct Mode_ t - Specifies the order in which the elementary reflectors are multiplied to form the block reflector.
- cusolver
DnFunction_ t - The
cusolverDnFunction_ttype indicates which routine needs to be configured bycusolverDnSetAdvOptions. The valuecusolverDnFunction_t::CUSOLVERDN_GETRFcorresponds to the routineGetrf. - cusolver
EigMode_ t - The
cusolverEigMode_ttype indicates whether or not eigenvectors are computed. - cusolver
EigRange_ t - cusolver
EigType_ t - The
cusolverEigType_ttype indicates which type of eigenvalue the solver is. - cusolverIRS
Refinement_ t - The
cusolverIRSRefinement_ttype indicates which solver type would be used for the specific cusolver function. Most of our experimentation shows thatcusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRESis the best option. - cusolver
Math Mode_ t - The
cusolverMathMode_ttype is used incusolverDnSetMathModeto choose compute precision modes as defined in the following table: - cusolver
Norm_ t - cusolver
Prec Type_ t - cusolver
Status_ t - This is a status type returned by the library functions and it can have the following values.
- cusolver
Storev Mode_ t - Specifies how the vectors which define the elementary reflectors are stored.
Constants§
Functions§
- cusolver
DnCCgels ⚠ - cusolver
DnCCgels_ ⚠buffer Size - cusolver
DnCCgesv ⚠ - cusolver
DnCCgesv_ ⚠buffer Size - cusolver
DnCEgels ⚠ - cusolver
DnCEgels_ ⚠buffer Size - cusolver
DnCEgesv ⚠ - cusolver
DnCEgesv_ ⚠buffer Size - cusolver
DnCKgels ⚠ - cusolver
DnCKgels_ ⚠buffer Size - cusolver
DnCKgesv ⚠ - cusolver
DnCKgesv_ ⚠buffer Size - cusolver
DnCYgels ⚠ - cusolver
DnCYgels_ ⚠buffer Size - cusolver
DnCYgesv ⚠ - cusolver
DnCYgesv_ ⚠buffer Size - cusolver
DnCgebrd ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnCgebrd_ ⚠buffer Size - cusolver
DnCgeqrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnCgeqrf_ ⚠buffer Size - cusolver
DnCgesvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnCgesvd_ ⚠buffer Size - cusolver
DnCgesvda ⚠Strided Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnCgesvda ⚠Strided Batched_ buffer Size - cusolver
DnCgesvdj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnCgesvdj ⚠Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnCgesvdj ⚠Batched_ buffer Size - cusolver
DnCgesvdj_ ⚠buffer Size - cusolver
DnCgetrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnCgetrf_ ⚠buffer Size - cusolver
DnCgetrs ⚠ - Please visit cuSOLVER Library Samples - getrf for a code example.
- cusolver
DnCheevd ⚠ - cusolver
DnCheevd_ ⚠buffer Size - cusolver
DnCheevdx ⚠ - cusolver
DnCheevdx_ ⚠buffer Size - cusolver
DnCheevj ⚠ - cusolver
DnCheevj ⚠Batched - cusolver
DnCheevj ⚠Batched_ buffer Size - cusolver
DnCheevj_ ⚠buffer Size - cusolver
DnChegvd ⚠ - cusolver
DnChegvd_ ⚠buffer Size - cusolver
DnChegvdx ⚠ - cusolver
DnChegvdx_ ⚠buffer Size - cusolver
DnChegvj ⚠ - cusolver
DnChegvj_ ⚠buffer Size - cusolver
DnChetrd ⚠ - cusolver
DnChetrd_ ⚠buffer Size - cusolver
DnClaswp ⚠ - cusolver
DnClauum ⚠ - cusolver
DnClauum_ ⚠buffer Size - cusolver
DnCpotrf ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnCpotrf ⚠Batched - The S and D data types are real valued single and double precision, respectively. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- cusolver
DnCpotrf_ ⚠buffer Size - cusolver
DnCpotri ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnCpotri_ ⚠buffer Size - cusolver
DnCpotrs ⚠ - This function solves a system of linear equations: $$ A\*X = B $$
- cusolver
DnCpotrs ⚠Batched - This function solves a sequence of linear systems: $$ {A\lbrack i\rbrack}\*{X\lbrack i\rbrack} = {B\lbrack i\rbrack} $$
- cusolver
DnCreate ⚠ - This function initializes the cuSolverDN library and creates a handle on the cuSolverDN context. It must be called before any other cuSolverDN API function is invoked. It allocates hardware resources necessary for accessing the GPU.
This function allocates 4 MiB or 32 MiB of memory (for GPUs with Compute Capability of 9.0 and higher), which will be used as the cuBLAS workspace for the first user-defined stream on which
cusolverDnSetStreamis called. For the default stream and in all the other cases, cuBLAS will manage its own workspace. - cusolver
DnCreate ⚠Gesvdj Info - This function creates and initializes the structure of
gesvdjandgesvdjBatchedto default values. - cusolver
DnCreate ⚠Params - This function creates and initializes the structure of
64-bit APIto default values. - cusolver
DnCreate ⚠Syevj Info - This function creates and initializes the structure of
syevj,syevjBatchedandsygvjto default values. - cusolver
DnCsytrf ⚠ - These helper functions calculate the size of the needed buffers.
- cusolver
DnCsytrf_ ⚠buffer Size - cusolver
DnCsytri ⚠ - cusolver
DnCsytri_ ⚠buffer Size - cusolver
DnCungbr ⚠ - cusolver
DnCungbr_ ⚠buffer Size - cusolver
DnCungqr ⚠ - cusolver
DnCungqr_ ⚠buffer Size - cusolver
DnCungtr ⚠ - cusolver
DnCungtr_ ⚠buffer Size - cusolver
DnCunmqr ⚠ - cusolver
DnCunmqr_ ⚠buffer Size - cusolver
DnCunmtr ⚠ - cusolver
DnCunmtr_ ⚠buffer Size - cusolver
DnDBgels ⚠ - cusolver
DnDBgels_ ⚠buffer Size - cusolver
DnDBgesv ⚠ - cusolver
DnDBgesv_ ⚠buffer Size - cusolver
DnDDgels ⚠ - cusolver
DnDDgels_ ⚠buffer Size - cusolver
DnDDgesv ⚠ - cusolver
DnDDgesv_ ⚠buffer Size - cusolver
DnDHgels ⚠ - cusolver
DnDHgels_ ⚠buffer Size - cusolver
DnDHgesv ⚠ - cusolver
DnDHgesv_ ⚠buffer Size - cusolver
DnDSgels ⚠ - cusolver
DnDSgels_ ⚠buffer Size - cusolver
DnDSgesv ⚠ - cusolver
DnDSgesv_ ⚠buffer Size - cusolver
DnDXgels ⚠ - cusolver
DnDXgels_ ⚠buffer Size - cusolver
DnDXgesv ⚠ - cusolver
DnDXgesv_ ⚠buffer Size - cusolver
DnDestroy ⚠ - This function releases CPU-side resources used by the cuSolverDN library.
- cusolver
DnDestroy ⚠Gesvdj Info - This function destroys and releases any memory required by the structure.
- cusolver
DnDestroy ⚠Params - This function destroys and releases any memory required by the structure.
- cusolver
DnDestroy ⚠Syevj Info - This function destroys and releases any memory required by the structure.
- cusolver
DnDgebrd ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnDgebrd_ ⚠buffer Size - cusolver
DnDgeqrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnDgeqrf_ ⚠buffer Size - cusolver
DnDgesvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDgesvd_ ⚠buffer Size - cusolver
DnDgesvda ⚠Strided Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDgesvda ⚠Strided Batched_ buffer Size - cusolver
DnDgesvdj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDgesvdj ⚠Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDgesvdj ⚠Batched_ buffer Size - cusolver
DnDgesvdj_ ⚠buffer Size - cusolver
DnDgetrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnDgetrf_ ⚠buffer Size - cusolver
DnDgetrs ⚠ - Please visit cuSOLVER Library Samples - getrf for a code example.
- cusolver
DnDlaswp ⚠ - cusolver
DnDlauum ⚠ - cusolver
DnDlauum_ ⚠buffer Size - cusolver
DnDorgbr ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnDorgbr_ ⚠buffer Size - cusolver
DnDorgqr ⚠ - These helper functions calculate the size of work buffers needed. Please visit cuSOLVER Library Samples - orgqr for a code example.
- cusolver
DnDorgqr_ ⚠buffer Size - cusolver
DnDorgtr ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnDorgtr_ ⚠buffer Size - cusolver
DnDormqr ⚠ - These helper functions calculate the size of work buffers needed. Please visit cuSOLVER Library Samples - ormqr for a code example.
- cusolver
DnDormqr_ ⚠buffer Size - cusolver
DnDormtr ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnDormtr_ ⚠buffer Size - cusolver
DnDpotrf ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnDpotrf ⚠Batched - The S and D data types are real valued single and double precision, respectively. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- cusolver
DnDpotrf_ ⚠buffer Size - cusolver
DnDpotri ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnDpotri_ ⚠buffer Size - cusolver
DnDpotrs ⚠ - This function solves a system of linear equations: $$ A\*X = B $$
- cusolver
DnDpotrs ⚠Batched - This function solves a sequence of linear systems: $$ {A\lbrack i\rbrack}\*{X\lbrack i\rbrack} = {B\lbrack i\rbrack} $$
- cusolver
DnDsyevd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDsyevd_ ⚠buffer Size - cusolver
DnDsyevdx ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDsyevdx_ ⚠buffer Size - cusolver
DnDsyevj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDsyevj ⚠Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDsyevj ⚠Batched_ buffer Size - cusolver
DnDsyevj_ ⚠buffer Size - cusolver
DnDsygvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDsygvd_ ⚠buffer Size - cusolver
DnDsygvdx ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDsygvdx_ ⚠buffer Size - cusolver
DnDsygvj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnDsygvj_ ⚠buffer Size - cusolver
DnDsytrd ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnDsytrd_ ⚠buffer Size - cusolver
DnDsytrf ⚠ - These helper functions calculate the size of the needed buffers.
- cusolver
DnDsytrf_ ⚠buffer Size - cusolver
DnDsytri ⚠ - cusolver
DnDsytri_ ⚠buffer Size - cusolver
DnGet ⚠Deterministic Mode - This function queries the deterministic mode which is set for
handle. - cusolver
DnGet ⚠Emulation Special Values Support - This function queries the special floating point value support which is set for
handleif floating point emulation is allowed. - cusolver
DnGet ⚠Emulation Strategy - This function queries the emulation strategy which is set for
handle. - cusolver
DnGet ⚠Fixed Point Emulation Mantissa BitOffset - This function queries the mantissa bit offset for fixed point FP64 emulation in case of dynamic mantissa control mode.
- cusolver
DnGet ⚠Fixed Point Emulation Mantissa Control - This function queries how the number of mantissa bits is determined for fixed point FP64 emulation.
- cusolver
DnGet ⚠Fixed Point Emulation MaxMantissa BitCount - This function queries the maximum number of mantissa bits used for fixed point FP64 emulation.
- cusolver
DnGet ⚠Math Mode - This function queries the math modes which are set for
handle. Note that math modes can be combined, e.g.,cusolverDnSetMathMode(handle, CUSOLVER_FP32_EMULATED_BF16X9_MATH | CUSOLVER_FP64_EMULATED_FIXEDPOINT_MATH). Please seecusolverMathMode_tfor allowed combinations. - cusolver
DnGet ⚠Stream - This function queries the stream to be used by the cuSolverDN library to execute its routines.
- cusolver
DnIRS ⚠Infos Create - This function creates and initializes the
Infosstructure that will hold the refinement information of an Iterative Refinement Solver (IRS) call. Such information includes the total number of iterations that was needed to converge (Niters), the outer number of iterations (meaningful when two-levels preconditioner such ascusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRESis used ), the maximal number of iterations that was allowed for that call, and a pointer to the matrix of the convergence history residual norms. TheInfosstructure needs to be created before a call to an IRS solver. TheInfosstructure is valid for only one call to an IRS solver, since it holds info about that solve and thus each solve will requires its ownInfosstructure. - cusolver
DnIRS ⚠Infos Destroy - This function destroys and releases any memory required by the
Infosstructure. This function destroys all the information (for example, Niters performed, OuterNiters performed, residual history etc.) about a solver call; thus, this function should only be called after the user is finished with the information. - cusolver
DnIRS ⚠Infos GetMax Iters - This function returns the maximal allowed number of iterations that was set for the corresponding call to the IRS solver. Note that this function returns the setting that was set when that call happened and is not to be confused with the
cusolverDnIRSParamsGetMaxIterswhich returns the current setting in theparamsconfiguration structure. To be clearer, theparamsstructure can be used for many calls to an IRS solver. A user can change the allowedMaxItersbetween calls while theInfosstructure incusolverDnIRSInfosGetMaxIterscontains information about a particular call and cannot be reused for different calls, thuscusolverDnIRSInfosGetMaxItersreturns the allowedMaxItersfor that call. - cusolver
DnIRS ⚠Infos GetNiters - This function returns the total number of iterations performed by the IRS solver. If it was negative, it means that the IRS solver did not converge and if the user did not disable the fallback to full precision, then the fallback to a full precision solution happened and solution is good. Please refer to the description of negative
nitersvalues in the corresponding IRS linear solver functions such ascusolverDnXgesv()orcusolverDnXgels(). - cusolver
DnIRS ⚠Infos GetOuter Niters - This function returns the number of iterations performed by the outer refinement loop of the IRS solver. When the refinement solver consists of a one-level solver such as
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICALorcusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES, it is the same asNiters. When the refinement solver consists of a two-levels solver such ascusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRESorcusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES_GMRES, it is the number of iterations of the outer loop. Refer to the description of thecusolverIRSRefinement_tfor more details. - cusolver
DnIRS ⚠Infos GetResidual History - If the user called
cusolverDnIRSInfosRequestResidualbefore the call to the IRS function, then the IRS solver will store the convergence history (residual norms) of the refinement phase in a matrix that can be accessed via a pointer returned by this function. The datatype of the residual norms depends on the input and output data type. If the Inputs/Outputs datatype is double precision real or complex (CUSOLVER_R_FP64 or CUSOLVER_C_FP64), this residual will be of type real double precision (FP64)double, otherwise if the Inputs/Outputs datatype is single precision real or complex (CUSOLVER_R_FP32 or CUSOLVER_C_FP32), this residual will be real single precision FP32float. - cusolver
DnIRS ⚠Infos Request Residual - This function tells the IRS solver to store the convergence history (residual norms) of the refinement phase in a matrix that can be accessed via a pointer returned by the
cusolverDnIRSInfosGetResidualHistoryfunction. - cusolver
DnIRS ⚠Params Create - This function creates and initializes the structure of parameters for an IRS solver such as the
cusolverDnIRSXgesvor thecusolverDnIRSXgelsfunctions to default values. The params structure created by this function can be used by one or more call to the same or to a different IRS solver. Note that in CUDA 10.2, the behavior was different and a newparamsstructure was needed to be created per each call to an IRS solver. Also note that the user can also change configurations of the params and then call a new IRS instance, but be careful that the previous call was done because any change to the configuration before the previous call was done could affect it. - cusolver
DnIRS ⚠Params Destroy - This function destroys and releases any memory required by the Params structure.
- cusolver
DnIRS ⚠Params Disable Fallback - This function disables the fallback to the main precision in case the Iterative Refinement Solver (IRS) failed to converge. In other term, if the IRS solver failed to converge, the solver will return a no convergence code (e.g.,
niter< 0), but can either return the non-convergent solution as it is (e.g., disable fallback) or can fallback (e.g., enable fallback) to the main precision (which is the precision of the Inputs/Outputs data) and solve the problem from scratch returning the good solution. This function disables the fallback and the returned solution is whatever the refinement solver was able to reach before it returns. Disabling fallback does not guarantee that the solution is the good one. However, if users want to keep getting the solution of the lower precision in case the IRS did not converge after certain number of iterations, they need to disable the fallback. The user can re-enable it by callingcusolverDnIRSParamsEnableFallback. - cusolver
DnIRS ⚠Params Enable Fallback - This function enable the fallback to the main precision in case the Iterative Refinement Solver (IRS) failed to converge. In other term, if the IRS solver failed to converge, the solver will return a no convergence code (e.g.,
niter< 0), but can either return the non-convergent solution as it is (e.g., disable fallback) or can fallback (e.g., enable fallback) to the main precision (which is the precision of the Inputs/Outputs data) and solve the problem from scratch returning the good solution. This is the behavior by default, and it will guarantee that the IRS solver always provide the good solution. This function is provided because we providedcusolverDnIRSParamsDisableFallbackwhich allows the user to disable the fallback and thus this function allow the user to re-enable it. - cusolver
DnIRS ⚠Params GetMax Iters - This function returns the current setting in the
paramsstructure for the maximal allowed number of iterations (for example, either the defaultMaxIters, or the one set by the user in case he set it usingcusolverDnIRSParamsSetMaxIters). Note that this function returns the current setting in theparamsconfiguration and not to be confused with thecusolverDnIRSInfosGetMaxIterswhich return the maximal allowed number of iterations for a particular call to an IRS solver. To be clearer, theparamsstructure can be used for many calls to an IRS solver. A user can change the allowedMaxItersbetween calls while theInfosstructure incusolverDnIRSInfosGetMaxIterscontains information about a particular call and cannot be reused for different calls, and thus,cusolverDnIRSInfosGetMaxItersreturns the allowedMaxItersfor that call. - cusolver
DnIRS ⚠Params SetMax Iters - This function sets the total number of allowed refinement iterations after which the solver will stop. Total means any iteration which means the sum of the outer and the inner iterations (inner is meaningful when two-levels refinement solver is set). Default value is set to 50. Our goal is to give the user more control such a way he can investigate and control every detail of the IRS solver.
- cusolver
DnIRS ⚠Params SetMax Iters Inner - This function sets the maximal number of iterations allowed for the inner refinement solver. It is not referenced in case of one level refinement solver such as
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICALorcusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES. The inner refinement solver will stop after reaching either the inner tolerance or the MaxItersInner value. By default, it is set to 50. Note that this value could not be larger than the MaxIters since MaxIters is the total number of allowed iterations. Note that if the user callscusolverDnIRSParamsSetMaxItersafter calling this function,SetMaxItershas priority and will overwriteMaxItersInnerto the minimum value of(MaxIters, MaxItersInner). - cusolver
DnIRS ⚠Params SetRefinement Solver - This function sets the refinement solver to be used in the Iterative Refinement Solver functions such as the
cusolverDnIRSXgesvor thecusolverDnIRSXgelsfunctions. Note that the user has to set the refinement algorithm before a first call to the IRS solver because it is NOT set by default with the creating of params. Details about values that can be set to and theirs meaning are described in the table below. - cusolver
DnIRS ⚠Params SetSolver Lowest Precision - This function sets the lowest precision that will be used by Iterative Refinement Solver. By lowest precision, we mean the solver is allowed to use as lowest computational precision during the LU factorization process. Note that the user has to set both the main and lowest precision before a first call to the IRS solver because they are NOT set by default with the
paramsstructure creation, as it depends on the Input Output data type and user request. Usually the lowest precision defines the speedup that can be achieved. The ratio of the performance of the lowest precision over the main precision (e.g., Inputs/Outputs datatype) define somehow the upper bound of the speedup that could be obtained. More precisely, it depends on many factors, but for large matrices sizes, it is the ratio of the matrix-matrix rank-k product (e.g., GEMM where K is 256 and M=N=size of the matrix) that define the possible speedup. For instance, if the inout precision is real double precision CUSOLVER_R_64F and the lowest precision is CUSOLVER_R_32F, then we can expect a speedup of at most 2X for large problem sizes. If the lowest precision was CUSOLVER_R_16F, then we can expect 3X-4X. A reasonable strategy should take the number of right-hand sides, the size of the matrix as well as the convergence rate into account. - cusolver
DnIRS ⚠Params SetSolver Main Precision - This function sets the main precision for the Iterative Refinement Solver (IRS). By main precision, we mean, the type of the Input and Output data. Note that the user has to set both the main and lowest precision before a first call to the IRS solver because they are NOT set by default with the
paramsstructure creation, as it depends on the Input Output data type and user request. user can set it by either calling this function or by callingcusolverDnIRSParamsSetSolverPrecisionswhich set both the main and the lowest precision together. All possible combinations of main/lowest precision are described in the table in thecusolverDnIRSParamsSetSolverPrecisionssection above. - cusolver
DnIRS ⚠Params SetSolver Precisions - This function sets both the main and the lowest precision for the Iterative Refinement Solver (IRS). By main precision, we mean the precision of the Input and Output datatype. By lowest precision, we mean the solver is allowed to use as lowest computational precision during the LU factorization process. Note that the user has to set both the main and lowest precision before the first call to the IRS solver because they are NOT set by default with the
paramsstructure creation, as it depends on the Input Output data type and user request. It is a wrapper to bothcusolverDnIRSParamsSetSolverMainPrecisionandcusolverDnIRSParamsSetSolverLowestPrecision. All possible combinations of main/lowest precision are described in the table below. Usually the lowest precision defines the speedup that can be achieved. The ratio of the performance of the lowest precision over the main precision (e.g., Inputs/Outputs datatype) define the upper bound of the speedup that could be obtained. More precisely, it depends on many factors, but for large matrices sizes, it is the ratio of the matrix-matrix rank-k product (e.g., GEMM where K is 256 and M=N=size of the matrix) that define the possible speedup. For instance, if the inout precision is real double precision CUSOLVER_R_64F and the lowest precision is CUSOLVER_R_32F, then we can expect a speedup of at most 2X for large problem sizes. If the lowest precision was CUSOLVER_R_16F, then we can expect 3X-4X. A reasonable strategy should take the number of right-hand sides, the size of the matrix as well as the convergence rate into account. - cusolver
DnIRS ⚠Params SetTol - This function sets the tolerance for the refinement solver. By default it is such that all the RHS satisfy:
- cusolver
DnIRS ⚠Params SetTol Inner - This function sets the tolerance for the inner refinement solver when the refinement solver consists of two-levels solver (for example,
cusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRESorcusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES_GMREScases). It is not referenced in case of one level refinement solver such ascusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICALorcusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_GMRES. It is set to 1e-4 by default. This function sets the tolerance for the inner solver (e.g. the inner GMRES). For example, if the Refinement Solver was set tocusolverIRSRefinement_t::CUSOLVER_IRS_REFINE_CLASSICAL_GMRES, setting this tolerance mean that the inner GMRES solver will converge to that tolerance at each outer iteration of the classical refinement solver. Our goal is to give the user more control such a way he can investigate and control every detail of the IRS solver. Note the, the tolerance value is always in real double precision whatever the Inputs/Outputs datatype is. - cusolver
DnIRS ⚠Xgels - This function is designed to perform same functionality as
cusolverDn<T1><T2>gels()functions, but wrapped in a more generic and expert interface that gives user more control to parametrize the function as well as it provides more information on output.cusolverDnIRSXgelsallows additional control of the solver parameters such as setting: - cusolver
DnIRS ⚠Xgels_ buffer Size - cusolver
DnIRS ⚠Xgesv - This function is designed to perform same functionality as
cusolverDn<T1><T2>gesv()functions, but wrapped in a more generic and expert interface that gives user more control to parametrize the function as well as it provides more information on output.cusolverDnIRSXgesvallows additional control of the solver parameters such as setting: - cusolver
DnIRS ⚠Xgesv_ buffer Size - cusolver
DnLogger ⚠Force Disable - This function disables logging for the entire run.
- cusolver
DnLogger ⚠Open File - This function opens a logging output file in the given path.
- cusolver
DnLogger ⚠SetCallback - This function sets the logging callback function.
- cusolver
DnLogger ⚠SetFile - This function sets the logging output file. Note: once registered using this function call, the provided file handle must not be closed unless the function is called again to switch to a different file handle.
- cusolver
DnLogger ⚠SetLevel - This function sets the value of the logging level.
- cusolver
DnLogger ⚠SetMask - This function sets the value of the logging mask.
- cusolver
DnSBgels ⚠ - cusolver
DnSBgels_ ⚠buffer Size - cusolver
DnSBgesv ⚠ - cusolver
DnSBgesv_ ⚠buffer Size - cusolver
DnSHgels ⚠ - cusolver
DnSHgels_ ⚠buffer Size - cusolver
DnSHgesv ⚠ - cusolver
DnSHgesv_ ⚠buffer Size - cusolver
DnSSgels ⚠ - cusolver
DnSSgels_ ⚠buffer Size - cusolver
DnSSgesv ⚠ - cusolver
DnSSgesv_ ⚠buffer Size - cusolver
DnSXgels ⚠ - cusolver
DnSXgels_ ⚠buffer Size - cusolver
DnSXgesv ⚠ - cusolver
DnSXgesv_ ⚠buffer Size - cusolver
DnSet ⚠AdvOptions - This function configures algorithm
algooffunction, a64-bit APIroutine. - cusolver
DnSet ⚠Deterministic Mode - This function sets the deterministic mode of all cuSolverDN functions for
handle. For improved performance, non-deterministic results can be allowed. Affected functions arecusolverDn<t>geqrf(),cusolverDn<t>syevd(),cusolverDn<t>syevdx(),cusolverDn<t>gesvd()(ifm > n),cusolverDn<t>gesvdj(),cusolverDnXgeqrf,cusolverDnXsyevd,cusolverDnXsyevdx,cusolverDnXgesvd(ifm > n),cusolverDnXgesvdrandcusolverDnXgesvdp. - cusolver
DnSet ⚠Emulation Special Values Support - This function sets the handling of special floating point values for
handle, which is used once floating point emulation is allowed. - cusolver
DnSet ⚠Emulation Strategy - This function sets the emulation strategy of all cuSolverDN functions for
handle. For more information about the effects of the corresponding strategies, please refer to the analogous definition of cublasEmulationStrategy_t. - cusolver
DnSet ⚠Fixed Point Emulation Mantissa BitOffset - This function sets the mantissa bit offset for fixed point FP64 emulation in case of dynamic mantissa control mode.
- cusolver
DnSet ⚠Fixed Point Emulation Mantissa Control - This function sets how the number of mantissa bits is determined for fixed point FP64 emulation. For more information about the effects of the corresponding control modes, please refer to
cudaEmulationMantissaControl_t. - cusolver
DnSet ⚠Fixed Point Emulation MaxMantissa BitCount - This function sets the maximum number of mantissa bits for fixed point FP64 emulation.
- cusolver
DnSet ⚠Math Mode - This function sets the math modes of all cuSolverDN functions for
handle. For more information about the effects of the corresponding math modes, please refer tocusolverMathMode_t. Note that math modes can be combined, e.g.,cusolverDnSetMathMode(handle, CUSOLVER_FP32_EMULATED_BF16X9_MATH | CUSOLVER_FP64_EMULATED_FIXEDPOINT_MATH). Please seecusolverMathMode_tfor allowed combinations. - cusolver
DnSet ⚠Stream - This function sets the stream to be used by the cuSolverDN library to execute its routines.
- cusolver
DnSgebrd ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnSgebrd_ ⚠buffer Size - cusolver
DnSgeqrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnSgeqrf_ ⚠buffer Size - cusolver
DnSgesvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSgesvd_ ⚠buffer Size - cusolver
DnSgesvda ⚠Strided Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSgesvda ⚠Strided Batched_ buffer Size - cusolver
DnSgesvdj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSgesvdj ⚠Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSgesvdj ⚠Batched_ buffer Size - cusolver
DnSgesvdj_ ⚠buffer Size - cusolver
DnSgetrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnSgetrf_ ⚠buffer Size - cusolver
DnSgetrs ⚠ - Please visit cuSOLVER Library Samples - getrf for a code example.
- cusolver
DnSlaswp ⚠ - cusolver
DnSlauum ⚠ - cusolver
DnSlauum_ ⚠buffer Size - cusolver
DnSorgbr ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnSorgbr_ ⚠buffer Size - cusolver
DnSorgqr ⚠ - These helper functions calculate the size of work buffers needed. Please visit cuSOLVER Library Samples - orgqr for a code example.
- cusolver
DnSorgqr_ ⚠buffer Size - cusolver
DnSorgtr ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnSorgtr_ ⚠buffer Size - cusolver
DnSormqr ⚠ - These helper functions calculate the size of work buffers needed. Please visit cuSOLVER Library Samples - ormqr for a code example.
- cusolver
DnSormqr_ ⚠buffer Size - cusolver
DnSormtr ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnSormtr_ ⚠buffer Size - cusolver
DnSpotrf ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnSpotrf ⚠Batched - The S and D data types are real valued single and double precision, respectively. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- cusolver
DnSpotrf_ ⚠buffer Size - cusolver
DnSpotri ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnSpotri_ ⚠buffer Size - cusolver
DnSpotrs ⚠ - This function solves a system of linear equations: $$ A\*X = B $$
- cusolver
DnSpotrs ⚠Batched - This function solves a sequence of linear systems: $$ {A\lbrack i\rbrack}\*{X\lbrack i\rbrack} = {B\lbrack i\rbrack} $$
- cusolver
DnSsyevd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSsyevd_ ⚠buffer Size - cusolver
DnSsyevdx ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSsyevdx_ ⚠buffer Size - cusolver
DnSsyevj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSsyevj ⚠Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSsyevj ⚠Batched_ buffer Size - cusolver
DnSsyevj_ ⚠buffer Size - cusolver
DnSsygvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSsygvd_ ⚠buffer Size - cusolver
DnSsygvdx ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSsygvdx_ ⚠buffer Size - cusolver
DnSsygvj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnSsygvj_ ⚠buffer Size - cusolver
DnSsytrd ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnSsytrd_ ⚠buffer Size - cusolver
DnSsytrf ⚠ - These helper functions calculate the size of the needed buffers.
- cusolver
DnSsytrf_ ⚠buffer Size - cusolver
DnSsytri ⚠ - cusolver
DnSsytri_ ⚠buffer Size - cusolver
DnXgeev ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXgeev_ ⚠buffer Size - cusolver
DnXgeqrf ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXgeqrf_ ⚠buffer Size - cusolver
DnXgesvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXgesvd_ ⚠buffer Size - cusolver
DnXgesvdj ⚠GetResidual - This function reports the Frobenius norm of the internal residual returned by
gesvdj. Note that this isnotthe Frobenious norm of the exact residual calculated as: $$ {\|{S} - {U}^{H}\{A}\{V}\|}_{F} $$ - cusolver
DnXgesvdj ⚠GetSweeps - This function reports number of executed sweeps of
gesvdj. It does not supportgesvdjBatched. If the user calls this function aftergesvdjBatched, the errorcusolverStatus_t::CUSOLVER_STATUS_NOT_SUPPORTEDis returned. - cusolver
DnXgesvdj ⚠SetMax Sweeps - This function configures the maximum number of sweeps in
gesvdj. The default value is 100. - cusolver
DnXgesvdj ⚠SetSort Eig - If
sort_svdis zero, the singular values are not sorted. This function only works forgesvdjBatched.gesvdjalways sorts singular values in descending order. By default, singular values are always sorted in descending order. - cusolver
DnXgesvdj ⚠SetTolerance - This function configures tolerance of
gesvdj. - cusolver
DnXgesvdp ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXgesvdp_ ⚠buffer Size - cusolver
DnXgesvdr ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXgesvdr_ ⚠buffer Size - cusolver
DnXgetrf ⚠ - The helper function below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXgetrf_ ⚠buffer Size - cusolver
DnXgetrs ⚠ - This function solves a linear system of multiple right-hand sides: $$ op(A)\*X = B $$
- cusolver
DnXlarft ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXlarft_ ⚠buffer Size - cusolver
DnXpotrf ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXpotrf_ ⚠buffer Size - cusolver
DnXpotrs ⚠ - This function solves a system of linear equations: $$ A\*X = B $$
- cusolver
DnXsyev ⚠Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXsyev ⚠Batched_ buffer Size - cusolver
DnXsyevd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXsyevd_ ⚠buffer Size - cusolver
DnXsyevdx ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXsyevdx_ ⚠buffer Size - cusolver
DnXsyevj ⚠GetResidual - This function reports residual of
syevjorsygvj. It does not supportsyevjBatched. If the user calls this function aftersyevjBatched, the errorcusolverStatus_t::CUSOLVER_STATUS_NOT_SUPPORTEDis returned. - cusolver
DnXsyevj ⚠GetSweeps - This function reports number of executed sweeps of
syevjorsygvj. It does not supportsyevjBatched. If the user calls this function aftersyevjBatched, the errorcusolverStatus_t::CUSOLVER_STATUS_NOT_SUPPORTEDis returned. - cusolver
DnXsyevj ⚠SetMax Sweeps - This function configures maximum number of sweeps in
syevj. The default value is 100. - cusolver
DnXsyevj ⚠SetSort Eig - If
sort_eigis zero, the eigenvalues are not sorted. This function only works forsyevjBatched.syevjandsygvjalways sort eigenvalues in ascending order. By default, eigenvalues are always sorted in ascending order. - cusolver
DnXsyevj ⚠SetTolerance - This function configures tolerance of
syevj. - cusolver
DnXsygvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXsygvd_ ⚠buffer Size - cusolver
DnXsygvdx ⚠ - The helper function below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnXsygvdx_ ⚠buffer Size - cusolver
DnXsytrs ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffers.
- cusolver
DnXsytrs_ ⚠buffer Size - cusolver
DnXtrtri ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffers.
- cusolver
DnXtrtri_ ⚠buffer Size - cusolver
DnZCgels ⚠ - cusolver
DnZCgels_ ⚠buffer Size - cusolver
DnZCgesv ⚠ - cusolver
DnZCgesv_ ⚠buffer Size - cusolver
DnZEgels ⚠ - cusolver
DnZEgels_ ⚠buffer Size - cusolver
DnZEgesv ⚠ - cusolver
DnZEgesv_ ⚠buffer Size - cusolver
DnZKgels ⚠ - cusolver
DnZKgels_ ⚠buffer Size - cusolver
DnZKgesv ⚠ - cusolver
DnZKgesv_ ⚠buffer Size - cusolver
DnZYgels ⚠ - cusolver
DnZYgels_ ⚠buffer Size - cusolver
DnZYgesv ⚠ - cusolver
DnZYgesv_ ⚠buffer Size - cusolver
DnZZgels ⚠ - cusolver
DnZZgels_ ⚠buffer Size - cusolver
DnZZgesv ⚠ - cusolver
DnZZgesv_ ⚠buffer Size - cusolver
DnZgebrd ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnZgebrd_ ⚠buffer Size - cusolver
DnZgeqrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnZgeqrf_ ⚠buffer Size - cusolver
DnZgesvd ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnZgesvd_ ⚠buffer Size - cusolver
DnZgesvda ⚠Strided Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnZgesvda ⚠Strided Batched_ buffer Size - cusolver
DnZgesvdj ⚠ - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnZgesvdj ⚠Batched - The helper functions below can calculate the sizes needed for pre-allocated buffer.
- cusolver
DnZgesvdj ⚠Batched_ buffer Size - cusolver
DnZgesvdj_ ⚠buffer Size - cusolver
DnZgetrf ⚠ - These helper functions calculate the size of work buffers needed.
- cusolver
DnZgetrf_ ⚠buffer Size - cusolver
DnZgetrs ⚠ - Please visit cuSOLVER Library Samples - getrf for a code example.
- cusolver
DnZheevd ⚠ - cusolver
DnZheevd_ ⚠buffer Size - cusolver
DnZheevdx ⚠ - cusolver
DnZheevdx_ ⚠buffer Size - cusolver
DnZheevj ⚠ - cusolver
DnZheevj ⚠Batched - cusolver
DnZheevj ⚠Batched_ buffer Size - cusolver
DnZheevj_ ⚠buffer Size - cusolver
DnZhegvd ⚠ - cusolver
DnZhegvd_ ⚠buffer Size - cusolver
DnZhegvdx ⚠ - cusolver
DnZhegvdx_ ⚠buffer Size - cusolver
DnZhegvj ⚠ - cusolver
DnZhegvj_ ⚠buffer Size - cusolver
DnZhetrd ⚠ - cusolver
DnZhetrd_ ⚠buffer Size - cusolver
DnZlaswp ⚠ - cusolver
DnZlauum ⚠ - cusolver
DnZlauum_ ⚠buffer Size - cusolver
DnZpotrf ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnZpotrf ⚠Batched - The S and D data types are real valued single and double precision, respectively. Please visit cuSOLVER Library Samples - potrfBatched for a code example.
- cusolver
DnZpotrf_ ⚠buffer Size - cusolver
DnZpotri ⚠ - These helper functions calculate the necessary size of work buffers.
- cusolver
DnZpotri_ ⚠buffer Size - cusolver
DnZpotrs ⚠ - This function solves a system of linear equations: $$ A\*X = B $$
- cusolver
DnZpotrs ⚠Batched - This function solves a sequence of linear systems: $$ {A\lbrack i\rbrack}\*{X\lbrack i\rbrack} = {B\lbrack i\rbrack} $$
- cusolver
DnZsytrf ⚠ - These helper functions calculate the size of the needed buffers.
- cusolver
DnZsytrf_ ⚠buffer Size - cusolver
DnZsytri ⚠ - cusolver
DnZsytri_ ⚠buffer Size - cusolver
DnZungbr ⚠ - cusolver
DnZungbr_ ⚠buffer Size - cusolver
DnZungqr ⚠ - cusolver
DnZungqr_ ⚠buffer Size - cusolver
DnZungtr ⚠ - cusolver
DnZungtr_ ⚠buffer Size - cusolver
DnZunmqr ⚠ - cusolver
DnZunmqr_ ⚠buffer Size - cusolver
DnZunmtr ⚠ - cusolver
DnZunmtr_ ⚠buffer Size - cusolver
GetProperty ⚠ - cusolver
GetVersion ⚠
Type Aliases§
- FILE
- _IO_
lock_ t - __
off64_ t - __off_t
- __
uint64_ t - cuComplex
- cuDouble
Complex - cuFloat
Complex - cusolver
DnHandle_ t - This is a pointer type to an opaque cuSolverDN context, which the user must initialize by calling
cusolverDnCreateprior to calling any other library function. An uninitialized Handle object will lead to unexpected behavior, including crashes of cuSolverDN. The handle created and returned bycusolverDnCreatemust be passed to every cuSolverDN function. - cusolver
DnIRS Infos_ t - This is a pointer type to an opaque
cusolverDnIRSInfos_tstructure, which holds information about the performed call to an iterative refinement linear solver (such ascusolverDnXgesv()). Use corresponding helper functions described below to either Create/Destroy this structure or retrieve solve information. - cusolver
DnIRS Params_ t - This is a pointer type to an opaque
cusolverDnIRSParams_tstructure, which holds parameters for the iterative refinement linear solvers such ascusolverDnXgesv(). Use corresponding helper functions described below to either Create/Destroy this structure or Set/Get solver parameters. - cusolver
DnLogger Callback_ t - cusolverDnLoggerCallback_t is a callback function pointer type.
- cusolver
DnParams_ t - cusolver_
int_ t - gesvdj
Info_ t - size_t
- syevj
Info_ t