XK module API

Warning

This documentation is work in progress. Please refer to examples to get started.

XK.xkrt_matrix_storage_tType
xkrt_matrix_storage_t
EnumeratorNote
MATRIX_ROWMAJOR************** 0 1 2 * 3 4 5 * 6 7 8 ***************
MATRIX_COLMAJOR************** 0 3 6 * 1 4 7 * 2 5 8 ***************
source
XK.xkrt_task_flags_tType
xkrt_task_flags_t

Task flags. Constraints: - cannot have both TASK_FLAG_DOMAIN and TASK_FLAG_DEVICE

source
XK.xkrt_task_format_func_tType

xkrt_task_format_func_t

Function pointer type for a task's implementation.

This defines the signature for the actual function that executes a task. It takes no arguments and returns void. Task-specific data is expected to be managed through other mechanisms (e.g., captured in a lambda, passed via a task structure).

source
XK.xkrt_task_format_suggest_tType

xkrt_task_format_suggest_t

Function pointer type for a task target suggestion function.

A function of this type can be used to dynamically suggest the best execution target for a given task.

Arguments

  • task: A pointer to the task data.

Returns

The suggested ::xkrt_task_format_target_t.

source
XK.xkrt_task_format_tType
xkrt_task_format_t

xkrt_task_format_t

Holds the implementations for a single task format across different targets.

This structure aggregates the function pointers for a specific task's implementation on all available execution targets. It also includes a label for identification and an optional suggestion function.

FieldNote
fArray of function pointers for each target. f[target] holds the function to execute for the corresponding ::xkrt_task_format_target_t.
labelA human-readable label for the task format.
suggestOptional function to suggest an execution target. If non-NULL, this function is called to dynamically determine the best target for a task. # Arguments * task: A pointer to the task data. # Returns The suggested ::xkrt_task_format_target_t, or ::XKRT_TASK_FORMAT_TARGET_NO_SUGGEST if no preference.
source
XK.xkrt_task_format_target_tType
xkrt_task_format_target_t

xkrt_task_format_target_t

Enumerates the possible execution targets for a task.

This enumeration defines the different types of hardware or execution environments where a task can be launched.

EnumeratorNote
XKRT_TASK_FORMAT_TARGET_HOSTCPU/Host execution target.
XKRT_TASK_FORMAT_TARGET_CUDANVIDIA CUDA execution target.
XKRT_TASK_FORMAT_TARGET_ZEIntel Level Zero (oneAPI) execution target.
XKRT_TASK_FORMAT_TARGET_CLOpenCL execution target.
XKRT_TASK_FORMAT_TARGET_HIPAMD HIP execution target.
XKRT_TASK_FORMAT_TARGET_SYCLSYCL execution target.
XKRT_TASK_FORMAT_TARGET_MAXMarker for the total number of targets.
source
XK.xkrt_task_formats_tType
xkrt_task_formats_t

xkrt_task_formats_t

A repository for all registered task formats.

This structure manages a list of all available task formats, allowing them to be accessed by their ::xkrt_task_format_id_t.

FieldNote
listArray holding all registered task formats.
next_fmtidThe ID to be assigned to the next registered task format. This is typically managed atomically.
source
XK.caxpy_tileMethod
xkblas_caxpy_tile(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.caxpy_tile_asyncMethod
xkblas_caxpy_tile_async(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.caxpy_tile_syncMethod
xkblas_caxpy_tile_sync(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.ctrsmMethod
xkblas_ctrsm(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.ctrsm_asyncMethod
xkblas_ctrsm_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.ctrsm_recMethod
xkblas_ctrsm_rec(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.ctrsm_rec_asyncMethod
xkblas_ctrsm_rec_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.ctrsm_rec_syncMethod
xkblas_ctrsm_rec_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.ctrsm_syncMethod
xkblas_ctrsm_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.daxpy_tileMethod
xkblas_daxpy_tile(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.daxpy_tile_asyncMethod
xkblas_daxpy_tile_async(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.daxpy_tile_syncMethod
xkblas_daxpy_tile_sync(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.dtrsmMethod
xkblas_dtrsm(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.dtrsm_asyncMethod
xkblas_dtrsm_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.dtrsm_recMethod
xkblas_dtrsm_rec(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.dtrsm_rec_asyncMethod
xkblas_dtrsm_rec_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.dtrsm_rec_syncMethod
xkblas_dtrsm_rec_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.dtrsm_syncMethod
xkblas_dtrsm_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.mallocMethod
xkblas_malloc(size)

///////////////////////////////

source
XK.saxpy_tileMethod
xkblas_saxpy_tile(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.saxpy_tile_asyncMethod
xkblas_saxpy_tile_async(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.saxpy_tile_syncMethod
xkblas_saxpy_tile_sync(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.strsmMethod
xkblas_strsm(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.strsm_asyncMethod
xkblas_strsm_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.strsm_recMethod
xkblas_strsm_rec(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.strsm_rec_asyncMethod
xkblas_strsm_rec_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.strsm_rec_syncMethod
xkblas_strsm_rec_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.strsm_syncMethod
xkblas_strsm_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.zaxpy_tileMethod
xkblas_zaxpy_tile(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.zaxpy_tile_asyncMethod
xkblas_zaxpy_tile_async(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.zaxpy_tile_syncMethod
xkblas_zaxpy_tile_sync(n, alpha, x, incx, y, incy, device_unique_id)

/////////////// SINGLE TILE /////////////////

source
XK.ztrsmMethod
xkblas_ztrsm(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.ztrsm_asyncMethod
xkblas_ztrsm_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source
XK.ztrsm_recMethod
xkblas_ztrsm_rec(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.ztrsm_rec_asyncMethod
xkblas_ztrsm_rec_async(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.ztrsm_rec_syncMethod
xkblas_ztrsm_rec_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb, m_threshold)

This perform a recursive tiling, recursing as long as m >= min_tile_size GEMMs may also be re-subdivided from the GEMM tiling parameter

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | \ | | |___\ | | | | \ | |____ ____|____|___\|

source
XK.ztrsm_syncMethod
xkblas_ztrsm_sync(side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb)

This perform a regular tiling using the TSRM tiling parameter With sub-TSRM on the diagonal, and GEMM on the other blocks

.–––––––––-. | \ | |___\ | | | \ | |____|___\ | | | | \ | |____|____|___\ | | | | | \ | |____|____|____|___\|

source