Developer Reference for Intel® oneAPI Math Kernel Library for C
cblas_gemm_f16f16f32
Computes a matrix-matrix product with general matrices of half precision data type.
Syntax
void cblas_gemm_f16f16f32 (const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE transa, const CBLAS_TRANSPOSE transb, const MKL_INT m, const MKL_INT n, const MKL_INT k, const float alpha, const MKL_F16 *a, const MKL_INT lda, const MKL_F16 *b, const MKL_INT ldb, const float beta, float *c, const MKL_INT ldc);
Include Files
- mkl.h
 
Description
The cblas_gemm_f16f16f32 routines compute a scalar-matrix-matrix product and add the result to a scalar-matrix product. The operation is defined as:
C := alpha*op(A) *op(B) + beta*C
where :
- op(X) is one of op(X) = X or op(X) = XT,
 - alpha and beta are scalars,
 - A, B, and C are matrices
 - op(A) is m-by-k matrix,
 - op(B) is k-by-n matrix,
 - C is an m-by-n matrix.
 
Input Parameters
Layout  |  
      Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).  |  
     |||||||||
transa  |  
      Specifies the form of op(A) used in the matrix multiplication: if transa=CblasNoTrans, then op(A) = A; if transa=CblasTrans, then op(A) = AT.  |  
     |||||||||
transb  |  
      Specifies the form of op(B) used in the matrix multiplication: if transb=CblasNoTrans, then op(B) = B; if transb=CblasTrans, then op(B) = BT.  |  
     |||||||||
m  |  
      Specifies the number of rows of the matrix op(A) and of the matrix C. The value of m must be at least zero.  |  
     |||||||||
n  |  
      Specifies the number of columns of the matrix op(B) and the number of columns of the matrix C. The value of n must be at least zero.  |  
     |||||||||
k  |  
      Specifies the number of columns of the matrix op(A) and the number of rows of the matrix op(B). The value of k must be at least zero.  |  
     |||||||||
alpha  |  
      Specifies the scalar alpha.  |  
     |||||||||
a  |  
       
       
  |  
     |||||||||
lda  |  
      Specifies the leading dimension of a as declared in the calling (sub)program. 
  |  
     |||||||||
b  |  
       
       
  |  
     |||||||||
ldb  |  
      Specifies the leading dimension of b as declared in the calling (sub)program. 
  |  
     |||||||||
beta  |  
      Specifies the scalar beta. When beta is equal to zero, then c need not be set on input.  |  
     |||||||||
c  |  
       
       
  |  
     |||||||||
ldc  |  
      Specifies the leading dimension of c as declared in the calling (sub)program. 
  |  
     
Output Parameters
c  |  
      Overwritten by alpha* op(A) * op(B) + beta*C.  |  
     
Example
For examples of routine usage, see these code examples in the Intel® oneAPI Math Kernel Library (oneMKL) installation directory:
cblas_gemm_f16f16f32: examples\cblas\source\cblas_gemm_f16f16f32x.c
Application Notes
On architectures without native half-precision hardware instructions, matrix A and B are upconverted to single precision and SGEMM is called to compute matrix multiplication operation.