Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

mkl_jit_get_?gemm_ptr

Return the GEMM kernel associated with a jitter previously created with
mkl_jit_create_?gemm
.

Syntax

sgemm_jit_kernel_t
mkl_jit_get_sgemm_ptr
(
const
void*
jitter
);
dgemm_jit_kernel_t
mkl_jit_get_dgemm_ptr
(
const
void*
jitter
);
cgemm_jit_kernel_t
mkl_jit_get_cgemm_ptr
(
const
void*
jitter
);
zgemm_jit_kernel_t
mkl_jit_get_zgemm_ptr
(
const
void*
jitter
);
Include Files
  • mkl.h
Description
The
mkl_jit_get_?gemm_ptr
functions belong to a set of related routines that enable use of just-in-time code generation.
The
mkl_jit_get_?gemm_ptr
functions take as input a jitter previously created with
mkl_jit_create_?gemm
, and return the GEMM kernel associated with that jitter. The returned GEMM kernel computes a scalar-matrix-matrix product and adds the result to a scalar-matrix product, with general matrices. The operation is defined as follows:
C := 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
  • A
    ,
    B
    , and
    C
    are matrices
  • op(A)
    is an
    m
    -by-
    k
    matrix
  • op(B)
    is a
    k
    -by-
    n
    matrix
  • C is an
    m
    -by-
    n
    matrix
Generating a new kernel with
mkl_jit_create_?gemm
involves moderate runtime overhead. To benefit from JIT code generation, use this feature when you need to call the generated kernel many times (for example, several hundred calls).
Input Parameter
jitter
Handle to the code generator.
Return Values
func
  • sgemm_jit_kernel_t
    – A function pointer type expecting four inputs of type
    void*
    ,
    float*
    ,
    float*
    , and
    float*
    typedef void (*sgemm_jit_kernel_t)(void*,float*,float*,float*);
  • dgemm_jit_kernel_t
    – A function pointer type expecting four inputs of type
    void*
    ,
    double*
    ,
    double*
    , and
    double*
    typedef void(*dgemm_jit_kernel_t)(void*,double*,double*,double*);
  • cgemm_jit_kernel_t
    – A function pointer type expecting four inputs of type
    void*
    ,
    MKL_Complex8*
    ,
    MKL_Complex8*
    , and
    MKL_Complex8*
    typedef void(*cgemm_jit_kernel_t)(void*,MKL_Complex8*,MKL_Complex8*,MKL_Complex8*);
  • zgemm_jit_kernel_t
    – A function pointer type expecting four inputs of type
    void*
    ,
    MKL_Complex16*
    ,
    MKL_Complex16*
    , and
    MKL_Complex16*
    typedef void(*zgemm_jit_kernel_t)(void*,MKL_Complex16*,MKL_Complex16*,MKL_Complex16*);
Returns a function pointer to a GEMM kernel. The GEMM kernel is called with four parameters: the jitter, and the three matrices
a
,
b
, and
c
.
If
layout
,
transa
,
transb
,
m
,
n
,
k
,
lda
,
ldb
, and
ldc
are the parameters used during the creation of the input jitter, then:
a
 
layout
=
MKL_COL_MAJOR
layout
=
MKL_ROW_MAJOR
transa
=
MKL_NOTRANS
Array of size
lda
*
k
Before calling the returned function pointer, the leading
m
-by-
k
part of the array
a
must contain the matrix A.
Array of size
lda
*
m
Before calling the returned function pointer, the leading
k
-by-
m
part of the array
a
must contain the matrix A.
transa
=
MKL_TRANS
or
transa
=
MKL_CONJTRANS
Array of size
lda
*
m
Before calling the returned function pointer, the leading
k
-by-
m
part of the array
a
must contain the matrix A.
Array of size
lda
*
k
Before calling the returned function pointer, the leading
m
-by-
k
part of the array
a
must contain the matrix A.
b
 
layout
=
MKL_COL_MAJOR
layout
=
MKL_ROW_MAJOR
transb
=
MKL_NOTRANS
Array of size
ldb
*
n
Before calling the returned function pointer, the leading
k
-by-
n
part of the array
b
must contain the matrix B.
Array of size
ldb
*
k
Before calling the returned function pointer, the leading
n
-by-
k
part of the array
b
must contain the matrix B.
transb
=
MKL_TRANS
or
transb
=
MKL_CONJTRANS
Array of size
ldb
*
k
Before calling the returned function pointer, the leading
n
-by-
k
part of the array
b
must contain the matrix B.
Array of size
ldb
*
n
Before calling the returned function pointer, the leading
k
-by-
n
part of the array
b
must contain the matrix B.
c
layout
=
MKL_COL_MAJOR
layout
=
MKL_ROW_MAJOR
Array of size
ldc
*
n
Before calling the returned function pointer, the leading
m
-by-
n
part of the array
c
must contain the matrix C.
Array of size
ldc
*
m
Before calling the returned function pointer, the leading
n
-by-
m
part of the array
c
must contain the matrix C.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804