17 #ifndef ONEAPI_DNNL_DNNL_THREADPOOL_HPP
18 #define ONEAPI_DNNL_DNNL_THREADPOOL_HPP
21 #include "oneapi/dnnl/dnnl_threadpool.h"
23 #include "oneapi/dnnl/dnnl_threadpool_iface.hpp"
38 namespace threadpool_interop {
52 &c_stream, aengine.
get(), threadpool),
53 "could not create stream");
69 "could not get stream threadpool");
79 transa, transb, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc, tp));
85 float beta, int32_t *C,
dnnl_dim_t ldc,
const int32_t *co,
87 return static_cast<status>(
89 K, alpha, A, lda, ao, B, ldb, bo, beta, C, ldc, co, tp));
96 float beta, int32_t *C,
dnnl_dim_t ldc,
const int32_t *co,
98 return static_cast<status>(
100 K, alpha, A, lda, ao, B, ldb, bo, beta, C, ldc, co, tp));
int64_t dnnl_dim_t
A type to describe tensor dimension.
Definition: dnnl_types.h:1333
status
Status values returned by the library functions.
Definition: dnnl.hpp:10789
dnnl_status_t DNNL_API dnnl_threadpool_interop_stream_get_threadpool(dnnl_stream_t astream, void **threadpool)
Returns a threadpool to be used by the execution stream.
dnnl_status_t DNNL_API dnnl_threadpool_interop_sgemm(char transa, char transb, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda, const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc, void *threadpool)
Performs single-precision matrix-matrix multiply.
dnnl_status_t DNNL_API dnnl_threadpool_interop_gemm_s8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A, dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co, void *threadpool)
Performs integer matrix-matrix multiply on 8-bit signed matrix A, 8-bit signed matrix B,...
dnnl_status_t DNNL_API dnnl_threadpool_interop_stream_create(dnnl_stream_t *stream, dnnl_engine_t engine, void *threadpool)
Creates an execution stream with specified threadpool.
dnnl_status_t DNNL_API dnnl_threadpool_interop_gemm_u8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A, dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co, void *threadpool)
Performs integer matrix-matrix multiply on 8-bit unsigned matrix A, 8-bit signed matrix B,...
status gemm_u8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A, dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co, threadpool_iface *tp)
Definition: dnnl_threadpool.hpp:82
status gemm_s8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A, dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co, threadpool_iface *tp)
Definition: dnnl_threadpool.hpp:93
dnnl::stream make_stream(const dnnl::engine &aengine, threadpool_iface *threadpool)
Constructs an execution stream for the specified engine and threadpool.
Definition: dnnl_threadpool.hpp:48
status sgemm(char transa, char transb, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda, const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc, threadpool_iface *tp)
Definition: dnnl_threadpool.hpp:74
threadpool_iface * get_threadpool(const dnnl::stream &astream)
Returns the pointer to a threadpool that is used by an execution stream.
Definition: dnnl_threadpool.hpp:65
oneDNN namespace
Definition: dnnl.hpp:74
An execution engine.
Definition: dnnl.hpp:869
static void wrap_c_api(dnnl_status_t status, const char *message)
A convenience function for wrapping calls to C API functions.
Definition: dnnl.hpp:103
T get(bool allow_empty=false) const
Returns the underlying C API handle.
Definition: dnnl.hpp:185
An execution stream.
Definition: dnnl.hpp:985
Abstract threadpool interface.
Definition: dnnl_threadpool_iface.hpp:38
An opaque structure to describe an execution stream.