BLAS 3

Description

The Level 3 Basic Linear Algebra Subroutines (BLAS) perform matrix- matrix operations. Each operation (excluding the Hermitian routines) is defined for four precision levels, indicated by the leading letter of the routine name:

  • S: single

  • D: double

  • C: single complex

  • Z: double complex

Table of Level 3 BLAS routines

The following table describes these routines. The table is in alphabetical order, except that each Hermitian matrix routine (any routine whose name begins with CH or ZH) is grouped next to equivalent symmetric matrix routines (whose names begin with SS, DS, CS, or ZS). This is because the Hermitian property is a type of symmetry.

Purpose

Operation

Name

Performs a matrix-matrix multiply

C := alpha*op(A)*op(B) + beta*C
op(X) = X,X**T,X**H

SGEMM, DGEMM, CGEMM, ZGEMM

Performs a symmetric matrix-matrix multiply

C := alpha*A*B + beta*C
or
C := alpha*B*A + beta*C

SGYMM, DGYMM, CGYMM, ZGYMM

Performs a Hermitian matrix-matrix multiply

C := alpha*A**H*B + beta*C
or
C := alpha*B*A**H + beta*C

CHEMM, ZHEMM

Performs a symmetric rank 2k update to a matrix

C := alpha*A*B**T + alpha*B*A**T + beta*C
or
C := alpha*A**T*B + alpha*B**T*A + beta*C

SSYR2K, DSYR2K, CSYR2K, ZSYR2K

Performs a Hermitian rank 2k update to a matrix

C := alpha*A*B**H + conjg(alpha)*B*A**H + beta*C
or
C := alpha*A**H*B + conjg(alpha)*B**H*A + beta*C

CHER2K, ZHER2K

Performs a symmetric rank k update to a matrix

C := alpha*A*A**T + beta*C
or
C := alpha*A**T*A + beta*C

SSYRK, DSYRK, CSYRK, ZSYRK

Performs a Hermitian rank k update to a matrix

C := alpha*A*A**H + beta*C
or
C := alpha*A**H*A + beta*C

CHERK, ZHERK

Performs a triangular matrix-matrix multiply

B := alpha*op(A)*B
or
B := alpha*B*op(A)
op(A) = A,A**T,A**H

STRMM, DTRMM, CTRMM, ZTRMM

Solves a triangular system of equations with
multiple right-hand sides

op(A)*X := alpha*B
or
X*op(A) := alpha*B
op(A) = A,A**T,A**H

STRSM, DTRSM, CTRSM, ZTRSM

Environment Variables

CRAYBLAS_LEVEL3_LEGACY

    When set to 1, it entirely disables the CrayBLAS framework for
    BLAS Level 3 calls, resulting in all BLAS calls to fallback to
    the basis code. When CRAYBLAS_LEVEL3_LEGACY=1, none of the other
    environment variables in this section will be checked by BLAS
    Level 3 routines, as this is a top-level disable switch.

    Default: 0

CRAYBLAS_ALLOC_TYPE

    CrayBLAS must allocate internal buffers for use by the GEMM
    routine. By default, it will try to allocate memory on the
    stack. Setting CRAYBLAS_ALLOC_TYPE=2 will force the CrayBLAS
    implementation of GEMM to use the heap for internal buffer
    allocations.

    Default: 0 (automatic mode)

CRAYBLAS_FORCE_HEAP_ALLOC (haswell and broadwell only)

    CrayBLAS must allocate internal buffers for use by the GEMM
    routine. By default, it will try to allocate memory on the
    stack. Setting CRAYBLAS_FORCE_HEAP_ALLOC=1 will force the
    CrayBLAS implementation of GEMM to use the heap for internal
    buffer allocations.

    Default: 0

CRAYBLAS_NUMA_MODE (excluding haswell and broadwell)

    CrayBLAS will try to use a NUMA-aware GEMM routine by
    default. Setting CRAYBLAS_NUMA_MODE=0 will disable this
    feature.

    Default: 1

CRAYBLAS_ABORT_ON_ERROR

    When an invalid call to a BLAS routine is made, the library
    prints an error message to the stdout stream and then calls the
    abort() function to stop program execution, as it is the likely
    case that a bug is present and the results would be invalid.
    Setting CRAYBLAS_ABORT_ON_ERROR=0 will cause the library only to
    report an error to the stdout stream and return from the BLAS
    call. This option is provided for codes that can tolerate invalid
    BLAS calls without the need to abort. This option is available
    even when any of the CRAYBLAS_LEVELn_LEGACY options are set.

    Default: 1

CRAYBLAS_PROFILING_VERBOSITY

    This environment variable causes CrayBLAS routines to report
    their routine name and argument values, and optionally runtime in
    seconds to stdout. When CRAYBLAS_PROFILING_VERBOSITY=1, only the
    routine name and argument values and printed. To also print the
    runtime in seconds, set CRAYBLAS_PROFILING_VERBOSITY=2. The run
    times reported do NOT include the time it takes to print the
    information to the output stream. However, other times outside of
    the BLAS calls may be skewed as the calls will take some time to
    print this information. This option is available even when any of
    the CRAYBLAS_LEVELn_LEGACY options are set.

    Default: not set