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 operator used to build the descriptor. Right now, Block Operator is the only available execution operator.

Block Traits#

Block traits can be retrieved from descriptors built with Block Operator.

Trait

Default value

Description

Description::<a>_data_type

float

Type of input and output data A, X, B.

Description::ld<a/b>

Determined by the problem size or set via LeadingDimension Operator

Leading dimensions of matrices A and B.

Description::<a/b>_size

Determined by the problem size and set leading dimensions.

Number of elements in A and B matrices. Includes padding determined by set leading dimensions.

Description::arrangement

Set via Arrangement Operator

Memory layout for A and B matrices.

Description::fill_mode

Set via FillMode Operator

Fill mode for symmetric or Hermitian matrix A.

Description::shared_memory_size

Determined by the problem size, leading dimensions, batches per block and function type.

The size of the shared memory in bytes required to allocate input and output matrices.

Description::block_dim

Base on heuristic or set via BlockDim Operator

Value of type dim3 representing number of threads computing Solver function. Set or recommended CUDA block dimensions.

Block traits can be retrieved from descriptors built with Block Operator.

Data Type Trait#

Solver::a_data_type

Data type for matrices A, X, and B. Determined by Precision Operator and Type Operator.

cuSolverDx does not support mixed data type currently, so matrices A, B and X are required to be the same data type. The limitation may be lifted in the future release.

Leading Dimension Trait#

// unsigned int
Solver::lda
Solver::ldb

Leading dimensions of matrices A and B. 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

Number of elements in A and B matrices. See Arrangement Operator.

Fill Mode Trait#

// cusolverdx::fill_mode
Solver::fill_mode

Fill Mode of A matrix. See FillMode Operator.

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.

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.

Shared Memory Size Trait#

// unsigned int
Solver::shared_memory_size = Solver::get_shared_memory_size()

unsigned int Solver::get_shared_memory_size()
// Calculates shared memory size for dynamic leading dimensions
unsigned int Solver::get_shared_memory_size(unsigned int lda,
                                            unsigned int ldb)

The size of the shared memory in bytes required to allocate input and output matrices, and perform computations.

The value is determined by Precision Operator, Type Operator, Size Operator, BatchesPerBlock Operator, and Function Operator.

Block Dim Trait#

// dim3
Solver::block_dim
cusolverdx::block_dim<Solver>::value
cusolverdx::block_dim_v<Sovler>

Value of type dim3 representing number of threads that will be used to perform requested Solver function. See BlockDim Operator.

Note

If BlockDim is not used in Solver description, the default value of Solver::block_dim is equal to Solver::suggested_block_dim.