The Vitis™ BLAS Library provides:
Vitis BLAS Library includes the following matrix and vector operation functions:
Functions for matrix operations:
Functions for vector operations:
Functions for matrix-vector operations:
Vitis BLAS Library provides three types of function implementations, namely L1 primitive functions, L2 kernel functions and L3 software API functions. L1 primitive functions can be leveraged by FPGA hardware developers. L2 kernel functions are built by integrating L1 primitive functions and data movers, which can be called by host codes with XRT Runtime Library. L3 software API functions provide C, C++ and Python function interfaces to allow pure software developers to offload BLAS operations to AMD platforms without additional hardware related configurations. Some functions of the three types are listed in the table below. Note that Vitis BLAS Library currently does not provide any functions running on Versal AI Engine.
Vitis BLAS Library functions | L1 primitive functions |
---|---|
amax, amin: search vector element position | |
asum: accumulates the magnitude of vector elements | |
dot: computes the dot product of two vectors | |
axpy: computes a vector-scalar product and adds to the vector | |
nrm2: computes the Euclidean norm of a vector | |
swap, scal, copy: swap, scale or copy vectors | |
symv: symmetric matrix and vector multiplication | |
trmv: triangular matrix and vector multiplication | |
L2 kernel functions | |
Gemm class: general matrix multiplication | |
Gemv class: general matrix-vector Multiplication | |
L3 software API functions | |
xfblasCreate: initializes the library and creates a handle | |
xfblasFree: frees memory in FPGA device | |
xfblasGetMatrix: copies a matrix in FPGA device memory to host | |
xfblasExecute: starts the kernel and wait until it finishes | |
Note: Full L3 software API function list and introduction can be found here. |
For the detailed differentiation of L1 primitive and L2 kernel functions, please refer to the table below.
L1 primitive functions |
|
L2 kernel functions |
|
L3 Software API functions |
|
Vitis BLAS Library provides three types of function implementations, namely L1 primitive functions, L2 kernel functions and L3 software API functions. L1 primitive functions can be leveraged by FPGA hardware developers. L2 kernel functions are built by integrating L1 primitive functions and data movers, which can be called by host codes with XRT Runtime Library. L3 software API functions provide C, C++ and Python function interfaces to allow pure software developers to offload BLAS operations to AMD platforms without additional hardware related configurations. Some functions of the three types are listed in the table below. Note that Vitis BLAS Library currently does not provide any functions running on Versal AI Engine.
For L1 sub-directories:
For L2 sub-directories:
For L3 sub-directories:
The libraries available in the Vitis GitHub repository can be compiled by using either the provided Makefiles for L2 and L3 functions as introduced above or the Vitis IDE. To use the library in the IDE, it must be downloaded as a library template at first, then a new Vitis project must be created by using the template. More information about creating L2 or L3 applications using the library template in Vitis GUI can be found here.