hipblastrsmbatchedex Interface Reference

hipblastrsmbatchedex Interface Reference#

HIPFORT API Reference: hipfort_hipblas::hipblastrsmbatchedex Interface Reference
hipfort_hipblas::hipblastrsmbatchedex Interface Reference

BLAS EX API. More...

Public Member Functions

integer(kind(hipblas_status_success)) function hipblastrsmbatchedex_ (handle, side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb, batchcount, inva, invasize, computetype)
 

Detailed Description

BLAS EX API.

The trsmBatchedEx functions solve:

op(A_i)*X_i = alpha*B_i or X_i*op(A_i) = alpha*B_i,

for i = 1, ..., batchCount, where alpha is a scalar, X and B are arrays of m by n matrices, A is an array of triangular matrices, and each op(A_i) is one of:

op( A_i ) = A_i   or   op( A_i ) = A_i^T   or   op( A_i ) = A_i^H.

Each matrix X_i is overwritten on B_i.

This function gives the user the ability to reuse the invA matrix between runs. If invA == NULL, hipblasTrsmBatchedEx will automatically calculate each invA_i on every run.

Setting up invA: Each accepted invA_i matrix consists of the packed 128x128 inverses of the diagonal blocks of matrix A_i, followed by any smaller diagonal block that remains. To set up each invA_i, it is recommended that hipblasTrtriBatched be used with matrix A_i as the input. invA is an array of pointers of batchCount length holding each invA_i.

Device memory of size 128 x k should be allocated for each invA_i ahead of time, where k is m when HIPBLAS_SIDE_LEFT and is n when HIPBLAS_SIDE_RIGHT. The actual number of elements in each invA_i should be passed as invAsize.

To begin, hipblasTrtriBatched must be called on the full 128x128 sized diagonal blocks of each matrix A_i. Below are the restricted parameters:

  • n = 128
  • ldinvA = 128
  • stride_invA = 128x128
  • batchCount = k / 128,

Then any remaining block can be added:

  • n = k % 128
  • invA = invA + stride_invA * previousBatchCount
  • ldinvA = 128
  • batchCount = 1
Parameters
[in]handle- [hipblasHandle_t] handle to the hipBLAS library context queue.
[in]side- [hipblasSideMode_t]
  • HIPBLAS_SIDE_LEFT: op(A)*X = alpha*B.
  • HIPBLAS_SIDE_RIGHT: X*op(A) = alpha*B.
[in]uplo- [hipblasFillMode_t]
  • HIPBLAS_FILL_MODE_UPPER: each A_i is an upper triangular matrix.
  • HIPBLAS_FILL_MODE_LOWER: each A_i is a lower triangular matrix.
[in]transA- [hipblasOperation_t]
  • HIPBLAS_OP_N: op(A) = A.
  • HIPBLAS_OP_T: op(A) = A^T.
  • HIPBLAS_OP_C: op(A) = A^H.
[in]diag- [hipblasDiagType_t]
  • HIPBLAS_DIAG_UNIT: each A_i is assumed to be unit triangular.
  • HIPBLAS_DIAG_NON_UNIT: each A_i is not assumed to be unit triangular.
[in]m- [int] m specifies the number of rows of each B_i. m >= 0.
[in]n- [int] n specifies the number of columns of each B_i. n >= 0.
[in]alpha- [void *] device pointer or host pointer alpha specifying the scalar alpha. When alpha is &zero, then A is not referenced, and B does not need to be set before entry.
[in]A- [void *] device array of device pointers storing each matrix A_i. Each A_i is of dimension ( lda, k ), where k is m when HIPBLAS_SIDE_LEFT and is n when HIPBLAS_SIDE_RIGHT. Only the upper/lower triangular part is accessed.
[in]lda- [int] lda specifies the first dimension of each A_i.
  • If side = HIPBLAS_SIDE_LEFT, lda >= max( 1, m ).
  • If side = HIPBLAS_SIDE_RIGHT, lda >= max( 1, n ).
[in,out]B- [void *] device array of device pointers storing each matrix B_i. Each B_i is of dimension ( ldb, n ). Before entry, the leading m by n part of the array B_i must contain the right-hand side matrix B_i, and on exit is overwritten by the solution matrix X_i.
[in]ldb- [int] ldb specifies the first dimension of each B_i. ldb >= max( 1, m ).
[in]batchCount- [int] specifies how many batches.
[in]invA- [void *] device array of device pointers storing the inverse diagonal blocks of each A_i. Each invA_i is of dimension ( ld_invA, k ), where k is m when HIPBLAS_SIDE_LEFT and is n when HIPBLAS_SIDE_RIGHT. ld_invA must be equal to 128.
[in]invAsize- [int] invAsize specifies the number of elements of device memory in each invA_i.
[in]computeType[hipDataType] specifies the datatype of computation.

Member Function/Subroutine Documentation

◆ hipblastrsmbatchedex_()

integer(kind(hipblas_status_success)) function hipfort_hipblas::hipblastrsmbatchedex::hipblastrsmbatchedex_ ( type(c_ptr), value  handle,
integer(kind(hipblas_side_left)), value  side,
integer(kind(hipblas_fill_mode_upper)), value  uplo,
integer(kind(hipblas_op_n)), value  transa,
integer(kind(hipblas_diag_non_unit)), value  diag,
integer(c_int), value  m,
integer(c_int), value  n,
type(c_ptr), value  alpha,
type(c_ptr), value  a,
integer(c_int), value  lda,
type(c_ptr), value  b,
integer(c_int), value  ldb,
integer(c_int), value  batchcount,
type(c_ptr), value  inva,
integer(c_int), value  invasize,
integer(kind(hip_r_32f)), value  computetype 
)

The documentation for this interface was generated from the following file: