BLIS Object Backend

LinearAlgebra-like frontend communicates with the BLIS library through its Object-API, which is exposed as BLIS.ObjectBackend submodule. Mixed-precision BLAS functions are only available via Object-API methods:

using BLIS
using BLIS.ObjectBackend

# α and β should always be created from numbers.
oα = BliObj(1.0);
oβ = BliObj(1.0);
# Matrix objects can be created from Arrays or views.
oA = BliObj(rand(Float32, 4, 4));
oB = BliObj(rand(Float32, 4, 4));
C = zeros(Float64, 8, 8);
wC = view(C, 1:2:8, 1:2:8);
oC = BliObj(wC);
# Mixed-precision GEMM into scattered target storage:
#      A * B -> C[1:2:7, 1:2:7],
#  where A and B have single precision and multiply into
#  a double precision target matrix.
BLIS.ObjectBackend.bli_gemm!(oα, oA, oB, oβ, oC)
# View result at target matrix C.
# Here's an example output.
C
[
 1.59116  0.0  1.34804   0.0  1.68991  0.0  1.58798  0.0;
 0.0      0.0  0.0       0.0  0.0      0.0  0.0      0.0;
 1.27603  0.0  1.31893   0.0  1.40484  0.0  1.06297  0.0;
 0.0      0.0  0.0       0.0  0.0      0.0  0.0      0.0;
 2.12725  0.0  1.72495   0.0  2.37218  0.0  1.56937  0.0;
 0.0      0.0  0.0       0.0  0.0      0.0  0.0      0.0;
 1.0284   0.0  0.858046  0.0  1.05108  0.0  1.25478  0.0;
 0.0      0.0  0.0       0.0  0.0      0.0  0.0      0.0;
]

BLIS.ObjectBackend: Object Creation

BLIS.ObjectBackend.BliObjType

Julia object BliObj packs obj_t with a reference to buffer array. This is to preserve the base array from being recycled by GC module.

source

BLIS.ObjectBackend: Level-1 Vector

BLIS.ObjectBackend: Level-1 Diagonal

BLIS.ObjectBackend: Level-1 Matrix

BLIS.ObjectBackend: Level-1 Fused-vector

BLIS.ObjectBackend: Level-2

BLIS.ObjectBackend: Level-3

BLIS.ObjectBackend: Utility-level