Execution Traits#
Execution traits can be retrieved directly from a Solver function descriptor, if the description is complete execution. The available execution traits may depend on the execution operator type used to build the descriptor, either Thread Operator or Block Operator.
Common Traits#
Common execution traits can be retrieved from descriptors built with either Thread Operator or Block Operator.
Trait |
Description |
|---|---|
|
|
|
|
Data type of input and output data |
|
Type of input and output data |
|
Precision of input and output data |
|
Type of status output, for functions that return status. |
|
Leading dimensions of matrices. |
|
Number of elements in |
|
Memory layout for matrices. |
|
Transpose flag for |
|
Fill mode for symmetric or Hermitian matrix |
|
Side of a matrix multiplication. |
|
Whether the diagonal elements of matrix |
|
Option for computing eigenvectors or singular vectors. |
|
Target architecture for the underlying computation. |
|
The size of the workspace in number of elements required to allocate temporary buffer space for Solver functions. |
Is Thread Execution Trait#
// bool
Solver::is_thread_execution
true if Description is a function description configured for thread execution, false otherwise.
Is Block Execution Trait#
// bool
Solver::is_block_execution
true if Description is a function description configured for block execution, false otherwise.
Data Type Trait#
Solver::a_data_type
Solver::b_data_type
Solver::x_data_type
Data type for matrices A, X, and B, determined by Precision Operator and Type Operator. The supported data types are float, double, cuFloatComplex, and cuDoubleComplex.
Important
cuSolverDx does not support mixed precision currently, so matrices A, B and X are required to be the same data type.
Type Trait#
// cusolverdx::type
Solver::type
Type of input and output data A, X, B, determined by Type Operator. The supported types are cusolverdx::type::real and cusolverdx::type::complex.
Precision Trait#
// Precision type
Solver::a_precision
Solver::b_precision
Solver::x_precision
Precision of input and output data A, X, and B, determined by Precision Operator. The supported precisions are float and double.
Note
cuSolverDx does not support mixed precision currently, so matrices A, B and X are required to be the same precision. The limitation may be lifted in the future release.
Status Type Trait#
// int
Solver::status_type
Type of status output is integer for functions that return status.
Leading Dimension Trait#
// unsigned int
Solver::lda
Solver::ldb
Solver::ldc
Leading dimensions of matrices in the function. See LeadingDimension Operator.
Matrix Size Trait#
// unsigned int
Solver::a_size
Solver::b_size
Number of elements in A and B matrices, determined by the padding determined by the leading dimensions and the arrangement operator. See Arrangement Operator and LeadingDimension Operator.
Arrangement Trait#
// cusolverdx::arrangement
Solver::a_arrangement
Solver::b_arrangement
Solver::c_arrangement
Memory layout for matrices in the function. See Arrangement Operator.
Transpose Trait#
// cusolverdx::transpose
Solver::transpose
Transpose mode for A matrix. See TransposeMode Operator.
Fill Mode Trait#
// cusolverdx::fill_mode
Solver::fill_mode
Fill Mode of A matrix. See FillMode Operator.
Side Trait#
// cusolverdx::side
Solver::side
Side of a matrix multiplication. See Side Operator.
Diag Trait#
// cusolverdx::diag
Solver::diag
Indicates whether the diagonal elements of matrix A are ones or not for trsm functions. See Diag Operator.
Job Trait#
// cusolverdx::job
Solver::job // returns eigenvectors or left singular vectors option
Solver::jobu // same as Solver::job
Solver::jobvt // returns right singular vectors option
Option for computing eigenvectors or singular vectors. See Job Operator.
SM Trait#
// unsigned int
Solver::sm
Target architecture for the underlying computation. See SM Operator.
Workspace Size Trait#
// unsigned int
Solver::workspace_size
The size of the workspace in number of elements required to allocate temporary buffer space for Solver functions. Currently only function heev and gesvd require nonzero workspace.
Note
Workspace size is in number of elements, therefore users need to allocate workspace memory with the size of (Solver::workspace_size * sizeof(Solver::a_data_type)).
Block Execution Traits#
Block execution traits can be retrieved from descriptors built with Block Operator only. Using these traits with Thread Operator will result in a compilation error.
Trait |
Description |
|---|---|
Number of batches to execute in parallel in a single CUDA thread block. |
|
Value of type |
|
Number of threads in |
|
The size of the shared memory in bytes required to allocate input and output matrices. |
Batches Per Block Trait#
// unsigned int
Solver::batches_per_block
Number of batches to execute in parallel in a single CUDA thread block. See BatchesPerBlock Operator. The default value is 1 if the operator is not used.
Note
If BatchesPerBlock operator is not used in a Solver description, the default value of Solver::batches_per_block is 1, not Solver::suggested_batches_per_block.
Block Dim Trait#
// dim3
Solver::block_dim
cusolverdx::block_dim<Solver>::value
cusolverdx::block_dim_v<Solver>
Value of type dim3 representing number of threads that will be used to perform requested Solver function. The default value is Solver::suggested_block_dim if BlockDim Operator is not set.
Note
If BlockDim is not used in Solver description, the default value of Solver::block_dim is equal to Solver::suggested_block_dim.
Max Threads Per Block Trait#
// unsigned int
Solver::max_threads_per_block
Number of threads in Description::block_dim. Max threads per block is the product of the number of threads in each dimension of Description::block_dim.