namespace dnnl::threadpool_interop

Overview

Threadpool interoperability namespace. More…

namespace threadpool_interop {

// structs

struct threadpool_iface;

// global functions

dnnl::stream make_stream(
    const dnnl::engine& aengine,
    threadpool_iface* threadpool
    );

threadpool_iface* get_threadpool(const dnnl::stream& astream);

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
    );

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
    );

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
    );

} // namespace threadpool_interop

Detailed Documentation

Threadpool interoperability namespace.

Global Functions

dnnl::stream make_stream(
    const dnnl::engine& aengine,
    threadpool_iface* threadpool
    )

Constructs an execution stream for the specified engine and threadpool.

Parameters:

aengine

Engine to create the stream on.

threadpool

Pointer to an instance of a C++ class that implements dnnl::threapdool_iface interface.

Returns:

An execution stream.

See also:

Using oneDNN with Threadpool-Based Threading

threadpool_iface* get_threadpool(const dnnl::stream& astream)

Returns the pointer to a threadpool that is used by an execution stream.

Parameters:

astream

An execution stream.

Returns:

Output pointer to an instance of a C++ class that implements dnnl::threapdool_iface interface or NULL if the stream was created without threadpool.

See also:

Using oneDNN with Threadpool-Based Threading