rocblas_gemm_ex Interface Reference

rocblas_gemm_ex Interface Reference#

hipFORT API Reference: hipfort_rocblas::rocblas_gemm_ex Interface Reference
hipfort_rocblas::rocblas_gemm_ex Interface Reference

BLAS EX API. More...

Public Member Functions

integer(kind(rocblas_status_success)) function rocblas_gemm_ex_ (handle, transa, transb, m, n, k, alpha, a, a_type, lda, b, b_type, ldb, beta, c, c_type, ldc, d, d_type, ldd, compute_type, algo, solution_index, flags)
 

Detailed Description

BLAS EX API.

The gemm_ex functions perform one of the matrix-matrix operations:

D = alpha*op( A )*op( B ) + beta*C,

where op( X ) is one of

op( X ) = X      or
op( X ) = X**T   or
op( X ) = X**H,

alpha and beta are scalars, and A, B, C, and D are matrices, with op( A ) an m by k matrix, op( B ) a k by n matrix, and C and D both m by n matrices. C and D can point to the same matrix if their parameters are identical.

Supported types are as follows:

  • rocblas_datatype_f64_r = a_type = b_type = c_type = d_type = compute_type
  • rocblas_datatype_f32_r = a_type = b_type = c_type = d_type = compute_type
  • rocblas_datatype_f16_r = a_type = b_type = c_type = d_type = compute_type
  • rocblas_datatype_f16_r = a_type = b_type = c_type = d_type; rocblas_datatype_f32_r = compute_type
  • rocblas_datatype_f16_r = a_type = b_type; rocblas_datatype_f32_r = c_type = d_type = compute_type
  • rocblas_datatype_bf16_r = a_type = b_type = c_type = d_type; rocblas_datatype_f32_r = compute_type
  • rocblas_datatype_bf16_r = a_type = b_type; rocblas_datatype_f32_r = c_type = d_type = compute_type
  • rocblas_datatype_i8_r = a_type = b_type; rocblas_datatype_i32_r = c_type = d_type = compute_type
  • rocblas_datatype_f32_c = a_type = b_type = c_type = d_type = compute_type
  • rocblas_datatype_f64_c = a_type = b_type = c_type = d_type = compute_type

Although not widespread, some gemm kernels used by gemm_ex might use atomic operations. See Atomic Operations in the API Reference Guide for more information.

Parameters
[in]handle- [rocblas_handle] handle to the rocBLAS library context queue.
[in]transA- [rocblas_operation] specifies the form of op( A ).
[in]transB- [rocblas_operation] specifies the form of op( B ).
[in]m- [rocblas_int] matrix dimension m.
[in]n- [rocblas_int] matrix dimension n.
[in]k- [rocblas_int] matrix dimension k.
[in]alpha- [const void *] device pointer or host pointer specifying the scalar alpha. Same datatype as compute_type.
[in]a- [void *] device pointer storing matrix A.
[in]a_type- [rocblas_datatype] specifies the datatype of matrix A.
[in]lda- [rocblas_int] specifies the leading dimension of A.
[in]b- [void *] device pointer storing matrix B.
[in]b_type- [rocblas_datatype] specifies the datatype of matrix B.
[in]ldb- [rocblas_int] specifies the leading dimension of B.
[in]beta- [const void *] device pointer or host pointer specifying the scalar beta. Same datatype as compute_type.
[in]c- [void *] device pointer storing matrix C.
[in]c_type- [rocblas_datatype] specifies the datatype of matrix C.
[in]ldc- [rocblas_int] specifies the leading dimension of C.
[out]d- [void *] device pointer storing matrix D. If d and c pointers are to the same matrix, then d_type must equal c_type and ldd must equal ldc or the respective invalid status will be returned.
[in]d_type- [rocblas_datatype] specifies the datatype of matrix D.
[in]ldd- [rocblas_int] specifies the leading dimension of D.
[in]compute_type[rocblas_datatype] specifies the datatype of computation.
[in]algo- [rocblas_gemm_algo] enumerant specifying the algorithm type.
[in]solution_index[int32_t] if algo is rocblas_gemm_algo_solution_index, this controls which solution is used. When algo is not rocblas_gemm_algo_solution_index, or if solution_index = 0, the default solution is used. Passing rocblas_gemm_algo_solution_index and solution_index < 0 to use the default solution is deprecated.
[in]flags- [uint32_t] optional gemm flags.

Member Function/Subroutine Documentation

◆ rocblas_gemm_ex_()

integer(kind(rocblas_status_success)) function hipfort_rocblas::rocblas_gemm_ex::rocblas_gemm_ex_ ( type(c_ptr), value  handle,
integer(kind(rocblas_operation_none)), value  transa,
integer(kind(rocblas_operation_none)), value  transb,
integer(c_int), value  m,
integer(c_int), value  n,
integer(c_int), value  k,
type(c_ptr), value  alpha,
type(c_ptr), value  a,
integer(kind(rocblas_datatype_f16_r)), value  a_type,
integer(c_int), value  lda,
type(c_ptr), value  b,
integer(kind(rocblas_datatype_f16_r)), value  b_type,
integer(c_int), value  ldb,
type(c_ptr), value  beta,
type(c_ptr), value  c,
integer(kind(rocblas_datatype_f16_r)), value  c_type,
integer(c_int), value  ldc,
type(c_ptr), value  d,
integer(kind(rocblas_datatype_f16_r)), value  d_type,
integer(c_int), value  ldd,
integer(kind(rocblas_datatype_f16_r)), value  compute_type,
integer(kind(rocblas_gemm_algo_standard)), value  algo,
integer(c_int32_t), value  solution_index,
integer(c_int32_t), value  flags 
)

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