Visible to Intel only — GUID: GUID-3C31707A-F3E9-41FC-A9A7-15DA419AB0BC
Abs
AbsBackward
Add
AvgPool
AvgPoolBackward
BatchNormForwardTraining
BatchNormInference
BatchNormTrainingBackward
BiasAdd
BiasAddBackward
Clamp
ClampBackward
Concat
Convolution
ConvolutionBackwardData
ConvolutionBackwardWeights
ConvTranspose
ConvTransposeBackwardData
ConvTransposeBackwardWeights
Dequantize
Divide
DynamicDequantize
DynamicQuantize
Elu
EluBackward
End
Exp
GELU
GELUBackward
HardSigmoid
HardSigmoidBackward
HardSwish
HardSwishBackward
Interpolate
InterpolateBackward
LayerNorm
LayerNormBackward
LeakyReLU
Log
LogSoftmax
LogSoftmaxBackward
MatMul
Maximum
MaxPool
MaxPoolBackward
Minimum
Mish
MishBackward
Multiply
Pow
PReLU
PReLUBackward
Quantize
Reciprocal
ReduceL1
ReduceL2
ReduceMax
ReduceMean
ReduceMin
ReduceProd
ReduceSum
ReLU
ReLUBackward
Reorder
Round
Select
Sigmoid
SigmoidBackward
SoftMax
SoftMaxBackward
SoftPlus
SoftPlusBackward
Sqrt
SqrtBackward
Square
SquaredDifference
StaticReshape
StaticTranspose
Subtract
Tanh
TanhBackward
TypeCast
Wildcard
enum dnnl_alg_kind_t
enum dnnl_normalization_flags_t
enum dnnl_primitive_kind_t
enum dnnl_prop_kind_t
enum dnnl_query_t
enum dnnl::normalization_flags
enum dnnl::query
struct dnnl_exec_arg_t
struct dnnl_primitive
struct dnnl_primitive_desc
struct dnnl::primitive
struct dnnl::primitive_desc
struct dnnl::primitive_desc_base
enum dnnl_rnn_direction_t
enum dnnl_rnn_flags_t
enum dnnl::rnn_direction
enum dnnl::rnn_flags
struct dnnl::augru_backward
struct dnnl::augru_forward
struct dnnl::gru_backward
struct dnnl::gru_forward
struct dnnl::lbr_augru_backward
struct dnnl::lbr_augru_forward
struct dnnl::lbr_gru_backward
struct dnnl::lbr_gru_forward
struct dnnl::lstm_backward
struct dnnl::lstm_forward
struct dnnl::rnn_primitive_desc_base
struct dnnl::vanilla_rnn_backward
struct dnnl::vanilla_rnn_forward
Visible to Intel only — GUID: GUID-3C31707A-F3E9-41FC-A9A7-15DA419AB0BC
Global Namespace
Overview
// namespaces
namespace dnnl;
namespace dnnl::graph;
namespace dnnl::graph::sycl_interop;
namespace dnnl::ocl_interop;
namespace dnnl::sycl_interop;
namespace dnnl::threadpool_interop;
namespace oneapi;
namespace std;
namespace sycl;
// typedefs
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef dnnl::memory::dim dim_t;
typedef dnnl::memory::dim dim_t;
typedef logical_tensor::data_type data_type;
typedef logical_tensor::layout_type layout_type;
typedef logical_tensor::dim dim;
typedef logical_tensor::dims dims;
typedef logical_tensor::data_type data_type;
typedef logical_tensor::layout_type layout_type;
typedef logical_tensor::property_type property_type;
typedef logical_tensor::dim dim;
typedef logical_tensor::dims dims;
typedef logical_tensor::data_type data_type;
typedef logical_tensor::layout_type layout_type;
typedef logical_tensor::dim dim;
typedef logical_tensor::dims dims;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef memory::format_tag tag;
typedef memory::data_type dt;
typedef struct dnnl_memory_desc* dnnl_memory_desc_t;
typedef const struct dnnl_memory_desc* const_dnnl_memory_desc_t;
typedef struct dnnl_memory* dnnl_memory_t;
typedef const struct dnnl_memory* const_dnnl_memory_t;
typedef struct dnnl_primitive_desc* dnnl_primitive_desc_t;
typedef const struct dnnl_primitive_desc* const_dnnl_primitive_desc_t;
typedef struct dnnl_primitive_attr* dnnl_primitive_attr_t;
typedef const struct dnnl_primitive_attr* const_dnnl_primitive_attr_t;
typedef struct dnnl_post_ops* dnnl_post_ops_t;
typedef const struct dnnl_post_ops* const_dnnl_post_ops_t;
typedef struct dnnl_primitive* dnnl_primitive_t;
typedef const struct dnnl_primitive* const_dnnl_primitive_t;
typedef int64_t dnnl_dim_t;
typedef dnnl_dim_t dnnl_dims_t[DNNL_MAX_NDIMS];
typedef struct dnnl_engine* dnnl_engine_t;
typedef struct dnnl_stream* dnnl_stream_t;
typedef const struct dnnl_stream* const_dnnl_stream_t;
typedef void* (*dnnl_graph_sycl_allocate_f)(
size_t size,
size_t alignment,
const void *dev,
const void *context
);
typedef void (*dnnl_graph_sycl_deallocate_f)(
void *buf,
const void *dev,
const void *context,
void *event
);
typedef struct dnnl_graph_partition* dnnl_graph_partition_t;
typedef const struct dnnl_graph_partition* const_dnnl_graph_partition_t;
typedef struct dnnl_graph_graph* dnnl_graph_graph_t;
typedef const struct dnnl_graph_graph* const_dnnl_graph_graph_t;
typedef struct dnnl_graph_op* dnnl_graph_op_t;
typedef const struct dnnl_graph_op* const_dnnl_graph_op_t;
typedef void* (*dnnl_graph_host_allocate_f)(
size_t size,
size_t alignment
);
typedef void (*dnnl_graph_host_deallocate_f)(void *);
typedef struct dnnl_graph_allocator* dnnl_graph_allocator_t;
typedef const struct dnnl_graph_allocator* const_dnnl_graph_allocator_t;
typedef struct dnnl_graph_compiled_partition* dnnl_graph_compiled_partition_t;
typedef const struct dnnl_graph_compiled_partition* const_dnnl_graph_compiled_partition_t;
typedef struct dnnl_graph_tensor* dnnl_graph_tensor_t;
typedef const struct dnnl_graph_tensor* const_dnnl_graph_tensor_t;
// enums
enum dnnl_alg_kind_t;
enum dnnl_cpu_isa_hints_t;
enum dnnl_cpu_isa_t;
enum dnnl_data_type_t;
enum dnnl_engine_kind_t;
enum dnnl_format_kind_t;
enum dnnl_format_tag_t;
enum dnnl_fpmath_mode_t;
enum dnnl_graph_layout_type_t;
enum dnnl_graph_op_attr_t;
enum dnnl_graph_op_kind_t;
enum dnnl_graph_partition_policy_t;
enum dnnl_graph_tensor_property_t;
enum dnnl_normalization_flags_t;
enum dnnl_ocl_interop_memory_kind_t;
enum dnnl_primitive_kind_t;
enum dnnl_prop_kind_t;
enum dnnl_query_t;
enum dnnl_rnn_direction_t;
enum dnnl_rnn_flags_t;
enum dnnl_scratchpad_mode_t;
enum dnnl_status_t;
enum dnnl_stream_flags_t;
enum dnnl_sycl_interop_memory_kind_t;
// structs
struct args_t;
struct cpu_deletor;
struct dnnl_engine;
struct dnnl_exec_arg_t;
struct dnnl_graph_inplace_pair_t;
struct dnnl_graph_logical_tensor_t;
struct dnnl_memory;
struct dnnl_memory_desc;
struct dnnl_post_ops;
struct dnnl_primitive;
struct dnnl_primitive_attr;
struct dnnl_primitive_desc;
struct dnnl_stream;
struct dnnl_version_t;
struct example_allows_unimplemented;
struct gemm_dims_t;
struct sycl_deletor;
// global variables
const dim_t batch = 32;
const dim_t src_seq_length_max = 10;
const dim_t tgt_seq_length_max = 10;
const dim_t feature_size = 256;
const dim_t enc_bidir_n_layers = 1;
const dim_t enc_unidir_n_layers = 3;
const dim_t dec_n_layers = 4;
const int lstm_n_gates = 4;
const dim_t batch = 32;
const dim_t src_seq_length_max = 10;
const dim_t tgt_seq_length_max = 10;
const dim_t feature_size = 256;
const dim_t enc_bidir_n_layers = 1;
const dim_t enc_unidir_n_layers = 3;
const dim_t dec_n_layers = 4;
const int lstm_n_gates = 4;
static const int min_runs = 4;
const memory::dims strides = {4, 4};
const memory::dims padding = {0, 0};
const int N0 = 1 + rand() % 31;
const int N1 = 1 + rand() % 31;
const int T0 = 31 + 1 + rand() % 31;
const int T1 = 1 + rand() % 31;
const int leftmost_batch = N0 + N1;
const int rightmost_batch = N0;
const int leftmost_seq_length = T1;
const int rightmost_seq_length = T0 - T1;
const int common_feature_size = 1024;
const int common_n_layers = 1;
const int lstm_n_gates = 4;
engine eng(engine::kind::cpu, 0);
int number_of_runs = 1;
float fixed_beta = 0.f;
engine eng(engine::kind::cpu, 0);
int number_of_runs = 1;
// global functions
void bnorm_u8_via_binary_postops(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
static size_t product(dnnl_dim_t* arr, size_t size);
static void init_net_data(float* data, uint32_t dim, const dnnl_dim_t* dims);
static void prepare_arg_node(args_t* node, int nargs);
static void free_arg_node(args_t* node);
static void set_arg(dnnl_exec_arg_t* arg, int arg_idx, dnnl_memory_t memory);
static void init_data_memory(
uint32_t dim,
const dnnl_dim_t* dims,
dnnl_format_tag_t user_tag,
dnnl_engine_t engine,
float* data,
dnnl_memory_t* memory
);
dnnl_status_t prepare_reorder(
dnnl_memory_t* user_memory,
const_dnnl_memory_desc_t prim_memory_md,
dnnl_engine_t prim_engine,
int dir_is_user_to_prim,
dnnl_memory_t* prim_memory,
dnnl_primitive_t* reorder,
uint32_t* net_index,
dnnl_primitive_t* net,
args_t* net_args
);
void simple_net(dnnl_engine_kind_t engine_kind);
int main(int argc, char** argv);
void cnn_inference_f32(engine::kind engine_kind);
int main(int argc, char** argv);
int main(int argc, char** argv);
void simple_net(engine::kind engine_kind);
int main(int argc, char** argv);
void simple_net(engine::kind engine_kind);
int main(int argc, char** argv);
static size_t product(dnnl_dim_t* arr, size_t size);
static void init_net_data(float* data, uint32_t dim, const dnnl_dim_t* dims);
static void prepare_arg_node(args_t* node, int nargs);
static void free_arg_node(args_t* node);
static void set_arg(dnnl_exec_arg_t* arg, int arg_idx, dnnl_memory_t memory);
static void init_data_memory(
uint32_t dim,
const dnnl_dim_t* dims,
dnnl_format_tag_t user_tag,
dnnl_engine_t engine,
float* data,
dnnl_memory_t* memory
);
dnnl_status_t prepare_reorder(
dnnl_memory_t* user_memory,
const_dnnl_memory_desc_t prim_memory_md,
dnnl_engine_t prim_engine,
int dir_is_user_to_prim,
dnnl_memory_t* prim_memory,
dnnl_primitive_t* reorder,
uint32_t* net_index,
dnnl_primitive_t* net,
args_t* net_args
);
void simple_net();
int main(int argc, char** argv);
bool check_result(dnnl::memory dst_mem);
void sparse_matmul();
int main(int argc, char** argv);
std::vector<float> weighted_src_layer(batch* feature_size, 1. 0f);
std::vector<float> alignment_model(
src_seq_length_max*batch* feature_size,
1. 0f
);
std::vector<float> alignments(src_seq_length_max* batch, 1. 0f);
std::vector<float> exp_sums(batch, 1. 0f);
void compute_weighted_annotations(
float* weighted_annotations,
dim_t src_seq_length_max,
dim_t batch,
dim_t feature_size,
float* weights_annot,
float* annotations
);
void compute_attention(
float* context_vectors,
dim_t src_seq_length_max,
dim_t batch,
dim_t feature_size,
float* weights_src_layer,
float* dec_src_layer,
float* annotations,
float* weighted_annotations,
float* weights_alignments
);
void copy_context(
float* src_iter,
dim_t n_layers,
dim_t batch,
dim_t feature_size
);
int main(int argc, char** argv);
std::vector<int32_t> weighted_src_layer(batch* feature_size, 1);
std::vector<float> alignment_model(
src_seq_length_max*batch* feature_size,
1. 0f
);
std::vector<float> alignments(src_seq_length_max* batch, 1. 0f);
std::vector<float> exp_sums(batch, 1. 0f);
void compute_weighted_annotations(
float* weighted_annotations,
dim_t src_seq_length_max,
dim_t batch,
dim_t feature_size,
float* weights_annot,
float* annotations
);
void compute_sum_of_rows(int8_t* a, dim_t rows, dim_t cols, int32_t* a_reduced);
void compute_attention(
float* context_vectors,
dim_t src_seq_length_max,
dim_t batch,
dim_t feature_size,
int8_t* weights_src_layer,
float weights_src_layer_scale,
int32_t* compensation,
uint8_t* dec_src_layer,
float dec_src_layer_scale,
float dec_src_layer_shift,
uint8_t* annotations,
float* weighted_annotations,
float* weights_alignments
);
void copy_context(
float* src_iter,
dim_t n_layers,
dim_t batch,
dim_t feature_size
);
int main(int argc, char** argv);
size_t product(int n_dims, const dnnl_dim_t dims[]);
void fill(dnnl_memory_t mem, int n_dims, const dnnl_dim_t dims[]);
int find_negative(dnnl_memory_t mem, int n_dims, const dnnl_dim_t dims[]);
void cross_engine_reorder();
int main();
void fill(memory& mem, const memory::dims& adims);
int find_negative(memory& mem, const memory::dims& adims);
int main(int argc, char** argv);
static dnnl_engine_kind_t validate_engine_kind(dnnl_engine_kind_t akind);
static dnnl_engine_kind_t parse_engine_kind(int argc, char** argv);
static const char* engine_kind2str_upper(dnnl_engine_kind_t kind);
static void read_from_dnnl_memory(void* handle, dnnl_memory_t mem);
static void write_to_dnnl_memory(void* handle, dnnl_memory_t mem);
void finalize();
dnnl::engine::kind validate_engine_kind(dnnl::engine::kind akind);
const char* engine_kind2str_upper(dnnl::engine::kind kind);
int handle_example_errors(
std::initializer_list<dnnl::engine::kind> engine_kinds,
std::function<void()> example
);
int handle_example_errors(
std::function<void(dnnl::engine::kind, int, char**)> example,
dnnl::engine::kind engine_kind,
int argc,
char** argv
);
int handle_example_errors(
std::function<void(dnnl::engine::kind)> example,
dnnl::engine::kind engine_kind
);
dnnl::engine::kind parse_engine_kind(int argc, char** argv, int extra_args = 0);
dnnl::memory::dim product(const dnnl::memory::dims& dims);
void read_from_dnnl_memory(void* handle, dnnl::memory& mem);
void write_to_dnnl_memory(void* handle, dnnl::memory& mem);
int main(int argc, char** argv);
cl_kernel create_init_opencl_kernel(
cl_context ocl_ctx,
const char* kernel_name,
const char* ocl_code
);
int main(int argc, char** argv);
int main(int argc, char** argv);
int main(int argc, char** argv);
void set_any_layout(
const std::vector<dnnl::graph::partition>& partitions,
std::unordered_set<size_t>& id_to_set_any_layout
);
void* sycl_malloc_wrapper(
size_t size,
size_t alignment,
const void* dev,
const void* ctx
);
void sycl_free_wrapper(
void* ptr,
const void* device,
const void* context,
void* event
);
void allocate_graph_mem(
std::vector<dnnl::graph::tensor>& tensors,
const std::vector<dnnl::graph::logical_tensor>& lts,
std::vector<std::shared_ptr<void>>& data_buffer,
std::unordered_map<size_t, dnnl::graph::tensor>& global_outputs_ts_map,
const dnnl::engine& eng,
bool is_input
);
void allocate_sycl_graph_mem(
std::vector<dnnl::graph::tensor>& tensors,
const std::vector<dnnl::graph::logical_tensor>& lts,
std::vector<std::shared_ptr<void>>& data_buffer,
std::unordered_map<size_t, dnnl::graph::tensor>& global_outputs_ts_map,
sycl::queue& q,
const dnnl::engine& eng,
bool is_input
);
int main(int argc, char** argv);
const char* get_type_string(dt type);
void print_test_case(dt type, gemm_dims_t dims);
void fill_random(std::vector<float>& out, bool is_integer);
double run_case(
engine::kind engine_kind,
dt type,
gemm_dims_t dims,
double time_limit = 0.
);
void run(engine::kind engine_kind, dt type, gemm_dims_t dims, double time_limit);
void bad_args();
void matmul_perf(engine::kind engine_kind, int argc, char** argv);
int main(int argc, char** argv);
int main(int argc, char** argv);
void init_data(memory& m, float v);
void create_and_execute_relu(memory& data, engine& eng, stream& s);
primitive_attr create_attr_with_relu_post_op();
void performance_profiling(engine::kind engine_kind, int argc, char** argv);
int main(int argc, char** argv);
void augru_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void batch_normalization_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void binary_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void concat_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void convolution_example(dnnl::engine::kind engine_kind);
void depthwise_convolution_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void eltwise_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void group_normalization_example(engine::kind engine_kind);
int main(int argc, char** argv);
void inner_product_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void layer_normalization_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void lrn_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void lstm_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void matmul_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void pooling_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void prelu_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void reduction_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void reorder_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void resampling_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void shuffle_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void softmax_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void sum_example(dnnl::engine::kind engine_kind);
int main(int argc, char** argv);
void simple_net(engine::kind engine_kind);
int main(int argc, char** argv);
int main(int argc, char** argv);
void sycl_usm_tutorial(engine::kind engine_kind);
int main(int argc, char** argv);
void quantize(
const std::vector<float>& X_f32,
float scale_X,
int32_t zp_X,
memory& X_int_m
);
void f32_matmul_compute(
int64_t M,
int64_t N,
int64_t K,
const std::vector<float>& A_f32,
const std::vector<float>& B_f32,
std::vector<float>& C_f32
);
void dynamic_q10n_matmul(
int64_t M,
int64_t N,
int64_t K,
const std::vector<float>& A_f32,
const std::vector<float>& B_f32,
std::vector<uint8_t>& C_u8,
float& scale_C,
int32_t& zp_C
);
void compare_f32_and_quantized_matmuls();
int main(int argc, char** argv);
matmul dynamic_matmul_create();
void dynamic_matmul_execute(
matmul& matmul_p,
char transA,
char transB,
int64_t M,
int64_t N,
int64_t K,
float alpha,
const float* A,
int64_t lda,
const float* B,
int64_t ldb,
float beta,
float* C,
int64_t ldc
);
void sgemm_and_matmul_with_params(
char transA,
char transB,
int64_t M,
int64_t N,
int64_t K,
float alpha,
float beta
);
void sgemm_and_matmul();
int main(int argc, char** argv);
matmul::primitive_desc matmul_pd_create(int64_t K, int64_t N, const engine& eng);
void prepare_input(
memory& A_u8_mem,
memory& sc_A_mem,
memory& sc_B_mem,
memory& sc_C_mem,
memory& zp_A_mem,
memory& zp_C_mem
);
void sanity_check(memory& C_u8_mem, memory& zp_C_mem);
void infer(
const matmul& matmul_p,
int64_t M,
int64_t N,
int64_t K,
const memory& B_s8_mem,
const engine& eng
);
void inference_int8_matmul(engine::kind engine_kind);
int main(int argc, char** argv);
dnnl_status_t DNNL_API dnnl_primitive_desc_next_impl(dnnl_primitive_desc_t primitive_desc);
dnnl_status_t DNNL_API dnnl_primitive_desc_clone(
dnnl_primitive_desc_t* primitive_desc,
const_dnnl_primitive_desc_t existing_primitive_desc
);
dnnl_status_t DNNL_API dnnl_primitive_desc_get_attr(
const_dnnl_primitive_desc_t primitive_desc,
const_dnnl_primitive_attr_t* attr
);
dnnl_status_t DNNL_API dnnl_primitive_desc_destroy(dnnl_primitive_desc_t primitive_desc);
dnnl_status_t DNNL_API dnnl_primitive_desc_query(
const_dnnl_primitive_desc_t primitive_desc,
dnnl_query_t what,
int index,
void* result
);
const_dnnl_memory_desc_t DNNL_API dnnl_primitive_desc_query_md(
const_dnnl_primitive_desc_t primitive_desc,
dnnl_query_t what,
int index
);
int DNNL_API dnnl_primitive_desc_query_s32(
const_dnnl_primitive_desc_t primitive_desc,
dnnl_query_t what,
int index
);
dnnl_status_t DNNL_API dnnl_primitive_create(
dnnl_primitive_t* primitive,
const_dnnl_primitive_desc_t primitive_desc
);
dnnl_status_t DNNL_API dnnl_primitive_create_from_cache_blob(
dnnl_primitive_t* primitive,
const_dnnl_primitive_desc_t primitive_desc,
size_t size,
const uint8_t* cache_blob
);
dnnl_status_t DNNL_API dnnl_primitive_execute(
const_dnnl_primitive_t primitive,
dnnl_stream_t stream,
int nargs,
const dnnl_exec_arg_t* args
);
dnnl_status_t DNNL_API dnnl_primitive_get_primitive_desc(
const_dnnl_primitive_t primitive,
const_dnnl_primitive_desc_t* primitive_desc
);
dnnl_status_t DNNL_API dnnl_primitive_get_cache_blob(
const_dnnl_primitive_t primitive,
size_t* size,
uint8_t* cache_blob
);
dnnl_status_t DNNL_API dnnl_primitive_destroy(dnnl_primitive_t primitive);
dnnl_status_t DNNL_API dnnl_primitive_attr_create(dnnl_primitive_attr_t* attr);
dnnl_status_t DNNL_API dnnl_primitive_attr_clone(
dnnl_primitive_attr_t* attr,
const_dnnl_primitive_attr_t existing_attr
);
dnnl_status_t DNNL_API dnnl_primitive_attr_destroy(dnnl_primitive_attr_t attr);
dnnl_status_t DNNL_API dnnl_primitive_attr_get_fpmath_mode(
const_dnnl_primitive_attr_t attr,
dnnl_fpmath_mode_t* mode
);
dnnl_status_t DNNL_API dnnl_primitive_attr_set_fpmath_mode(
dnnl_primitive_attr_t attr,
dnnl_fpmath_mode_t mode
);
dnnl_status_t DNNL_API dnnl_primitive_attr_get_scratchpad_mode(
const_dnnl_primitive_attr_t attr,
dnnl_scratchpad_mode_t* mode
);
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scratchpad_mode(
dnnl_primitive_attr_t attr,
dnnl_scratchpad_mode_t mode
);
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scales_mask(
dnnl_primitive_attr_t attr,
int arg,
int mask
);
dnnl_status_t DNNL_API dnnl_primitive_attr_set_zero_points_mask(
dnnl_primitive_attr_t attr,
int arg,
int mask
);
dnnl_status_t DNNL_API dnnl_primitive_attr_get_post_ops(
const_dnnl_primitive_attr_t attr,
const_dnnl_post_ops_t* post_ops
);
dnnl_status_t DNNL_API dnnl_primitive_attr_set_post_ops(
dnnl_primitive_attr_t attr,
const_dnnl_post_ops_t post_ops
);
dnnl_status_t DNNL_API dnnl_post_ops_create(dnnl_post_ops_t* post_ops);
dnnl_status_t DNNL_API dnnl_post_ops_clone(
dnnl_post_ops_t* post_ops,
const_dnnl_post_ops_t existing_post_ops
);
dnnl_status_t DNNL_API dnnl_post_ops_destroy(dnnl_post_ops_t post_ops);
int DNNL_API dnnl_post_ops_len(const_dnnl_post_ops_t post_ops);
dnnl_primitive_kind_t DNNL_API dnnl_post_ops_get_kind(
const_dnnl_post_ops_t post_ops,
int index
);
dnnl_status_t DNNL_API dnnl_post_ops_append_sum(
dnnl_post_ops_t post_ops,
float scale,
int32_t zero_point,
dnnl_data_type_t data_type
);
dnnl_status_t DNNL_API dnnl_post_ops_get_params_sum(
const_dnnl_post_ops_t post_ops,
int index,
float* scale,
int32_t* zero_point,
dnnl_data_type_t* data_type
);
dnnl_status_t DNNL_API dnnl_post_ops_append_eltwise(
dnnl_post_ops_t post_ops,
dnnl_alg_kind_t alg_kind,
float alpha,
float beta
);
dnnl_status_t DNNL_API dnnl_post_ops_get_params_eltwise(
const_dnnl_post_ops_t post_ops,
int index,
dnnl_alg_kind_t* alg_kind,
float* alpha,
float* beta
);
dnnl_status_t DNNL_API dnnl_post_ops_append_dw(
dnnl_post_ops_t post_ops,
dnnl_data_type_t weights_data_type,
dnnl_data_type_t bias_data_type,
dnnl_data_type_t dst_data_type,
dnnl_dim_t kernel_size,
dnnl_dim_t stride_size,
dnnl_dim_t padding_l_size
);
dnnl_status_t DNNL_API dnnl_post_ops_get_params_dw(
const_dnnl_post_ops_t post_ops,
int index,
dnnl_data_type_t* weights_data_type,
dnnl_data_type_t* bias_data_type,
dnnl_data_type_t* dst_data_type,
dnnl_dim_t* kernel_size,
dnnl_dim_t* stride_size,
dnnl_dim_t* padding_l_size
);
dnnl_status_t DNNL_API dnnl_post_ops_append_binary(
dnnl_post_ops_t post_ops,
dnnl_alg_kind_t alg_kind,
const_dnnl_memory_desc_t src1_desc
);
dnnl_status_t DNNL_API dnnl_post_ops_get_params_binary(
const_dnnl_post_ops_t post_ops,
int index,
dnnl_alg_kind_t* alg_kind,
const_dnnl_memory_desc_t* src1_desc
);
dnnl_status_t DNNL_API dnnl_post_ops_append_prelu(
dnnl_post_ops_t post_ops,
int mask
);
dnnl_status_t DNNL_API dnnl_post_ops_get_params_prelu(
const_dnnl_post_ops_t post_ops,
int index,
int* mask
);
dnnl_status_t DNNL_API dnnl_memory_desc_destroy(dnnl_memory_desc_t memory_desc);
dnnl_status_t DNNL_API dnnl_memory_desc_clone(
dnnl_memory_desc_t* memory_desc,
const_dnnl_memory_desc_t existing_memory_desc
);
dnnl_status_t DNNL_API dnnl_memory_desc_create_with_strides(
dnnl_memory_desc_t* memory_desc,
int ndims,
const dnnl_dims_t dims,
dnnl_data_type_t data_type,
const dnnl_dims_t strides
);
dnnl_status_t DNNL_API dnnl_memory_desc_create_with_tag(
dnnl_memory_desc_t* memory_desc,
int ndims,
const dnnl_dims_t dims,
dnnl_data_type_t data_type,
dnnl_format_tag_t tag
);
dnnl_status_t DNNL_API dnnl_memory_desc_create_submemory(
dnnl_memory_desc_t* memory_desc,
const_dnnl_memory_desc_t parent_memory_desc,
const dnnl_dims_t dims,
const dnnl_dims_t offsets
);
dnnl_status_t DNNL_API dnnl_memory_desc_reshape(
dnnl_memory_desc_t* out_memory_desc,
const_dnnl_memory_desc_t in_memory_desc,
int ndims,
const dnnl_dims_t dims
);
dnnl_status_t DNNL_API dnnl_memory_desc_permute_axes(
dnnl_memory_desc_t* out_memory_desc,
const_dnnl_memory_desc_t in_memory_desc,
const int* permutation
);
dnnl_status_t DNNL_API dnnl_memory_desc_query(
const_dnnl_memory_desc_t memory_desc,
dnnl_query_t what,
void* result
);
int DNNL_API dnnl_memory_desc_equal(
const_dnnl_memory_desc_t lhs,
const_dnnl_memory_desc_t rhs
);
size_t DNNL_API dnnl_memory_desc_get_size(const_dnnl_memory_desc_t memory_desc);
size_t DNNL_API dnnl_data_type_size(dnnl_data_type_t data_type);
dnnl_status_t DNNL_API dnnl_memory_create(
dnnl_memory_t* memory,
const_dnnl_memory_desc_t memory_desc,
dnnl_engine_t engine,
void* handle
);
dnnl_status_t DNNL_API dnnl_memory_get_memory_desc(
const_dnnl_memory_t memory,
const_dnnl_memory_desc_t* memory_desc
);
dnnl_status_t DNNL_API dnnl_memory_get_engine(
const_dnnl_memory_t memory,
dnnl_engine_t* engine
);
dnnl_status_t DNNL_API dnnl_memory_map_data(
const_dnnl_memory_t memory,
void** mapped_ptr
);
dnnl_status_t DNNL_API dnnl_memory_unmap_data(
const_dnnl_memory_t memory,
void* mapped_ptr
);
dnnl_status_t DNNL_API dnnl_memory_get_data_handle(
const_dnnl_memory_t memory,
void** handle
);
dnnl_status_t DNNL_API dnnl_memory_set_data_handle(
dnnl_memory_t memory,
void* handle
);
dnnl_status_t DNNL_API dnnl_memory_destroy(dnnl_memory_t memory);
dnnl_status_t DNNL_API dnnl_reorder_primitive_desc_create(
dnnl_primitive_desc_t* reorder_primitive_desc,
const_dnnl_memory_desc_t src_desc,
dnnl_engine_t src_engine,
const_dnnl_memory_desc_t dst_desc,
dnnl_engine_t dst_engine,
const_dnnl_primitive_attr_t attr
);
dnnl_status_t DNNL_API dnnl_concat_primitive_desc_create(
dnnl_primitive_desc_t* concat_primitive_desc,
dnnl_engine_t engine,
const_dnnl_memory_desc_t dst_desc,
int n,
int concat_dimension,
const_dnnl_memory_desc_t const* src_descs,
const_dnnl_primitive_attr_t attr
);
dnnl_status_t DNNL_API dnnl_sum_primitive_desc_create(
dnnl_primitive_desc_t* sum_primitive_desc,
dnnl_engine_t engine,
const_dnnl_memory_desc_t dst_desc,
int n,
const float* scales,
const_dnnl_memory_desc_t const* src_descs,
const_dnnl_primitive_attr_t attr
);
dnnl_status_t DNNL_API dnnl_binary_primitive_desc_create(
dnnl_primitive_desc_t* primitive_desc,
dnnl_engine_t engine,
dnnl_alg_kind_t alg_kind,
const_dnnl_memory_desc_t src0_desc,
const_dnnl_memory_desc_t src1_desc,
const_dnnl_memory_desc_t dst_desc,
const_dnnl_primitive_attr_t attr
);
dnnl_status_t DNNL_API dnnl_convolution_forward_primitive_desc_create(
dnnl_primitive_desc_t* primitive_desc,
dnnl_engine_t engine,
dnnl_prop_kind_t prop_kind,
dnnl_alg_kind_t alg_kind,
const_dnnl_memory_desc_t src_desc,
const_dnnl_memory_desc_t weights_desc,
const_dnnl_memory_desc_t bias_desc,
const_dnnl_memory_desc_t dst_desc,
const dnnl_dims_t strides,
const dnnl_dims_t dilates,
const dnnl_dims_t padding_l,
const dnnl_dims_t padding_r,
const_dnnl_primitive_attr_t attr
);
dnnl_status_t DNNL_API dnnl_convolution_backward_data_primitive_desc_create(
dnnl_primitive_desc_t* primitive_desc,
dnnl_engine_t engine,
dnnl_alg_kind_t alg_kind,
const_dnnl_memory_desc_t diff_src_desc,
const_dnnl_memory_desc_t weights_desc,
const_dnnl_memory_desc_t diff_dst_desc,
const dnnl_dims_t strides,
const dnnl_dims_t dilates,
const dnnl_dims_t padding_l,
const dnnl_dims_t padding_r,
const_dnnl_primitive_desc_t hint_fwd_pd,