enum dnnl_query_t

Overview

Primitive descriptor query specification. More…

#include <dnnl_types.h>

enum dnnl_query_t
{
    dnnl_query_undef                  = 0,
    dnnl_query_engine,
    dnnl_query_primitive_kind,
    dnnl_query_num_of_inputs_s32,
    dnnl_query_num_of_outputs_s32,
    dnnl_query_time_estimate_f64,
    dnnl_query_memory_consumption_s64,
    dnnl_query_scratchpad_engine,
    dnnl_query_impl_info_str,
    dnnl_query_reorder_src_engine,
    dnnl_query_reorder_dst_engine,
    dnnl_query_prop_kind,
    dnnl_query_some_d                 = 64,
    dnnl_query_op_d,
    dnnl_query_convolution_d,
    dnnl_query_deconvolution_d,
    dnnl_query_shuffle_d,
    dnnl_query_eltwise_d,
    dnnl_query_softmax_d,
    dnnl_query_pooling_d,
    dnnl_query_lrn_d,
    dnnl_query_batch_normalization_d,
    dnnl_query_layer_normalization_d,
    dnnl_query_inner_product_d,
    dnnl_query_rnn_d,
    dnnl_query_gemm_d,
    dnnl_query_binary_d,
    dnnl_query_logsoftmax_d,
    dnnl_query_matmul_d,
    dnnl_query_resampling_d,
    dnnl_query_pooling_v2_d,
    dnnl_query_reduction_d,
    dnnl_query_prelu_d,
    dnnl_query_some_md                = 128,
    dnnl_query_src_md,
    dnnl_query_diff_src_md,
    dnnl_query_weights_md,
    dnnl_query_diff_weights_md,
    dnnl_query_dst_md,
    dnnl_query_diff_dst_md,
    dnnl_query_workspace_md,
    dnnl_query_scratchpad_md,
    dnnl_query_exec_arg_md            = 255,
    dnnl_query_max                    = 0x7fff,
};

Detailed Documentation

Primitive descriptor query specification.

For generic function dnnl_primitive_desc_query(), the type of result must agree with the queried argument. The correspondence table:

Query kind

Type of query result —-

dnnl_query_engine

dnnl_engine_t *

dnnl_query_scratchpad_engine

dnnl_engine_t *

dnnl_query_primitive_kind

dnnl_primitive_kind_t *

dnnl_query_*_s32

int *

dnnl_query_*_s64

dnnl_dim_t * (same as int64_t *)

dnnl_query_*_f64

double *

dnnl_query_*_str

const char **

dnnl_query_op_d

const_dnnl_op_desc_t *

dnnl_query_*_md

const dnnl_memory_desc_t **

dnnl_query_*_<op>_d

const dnnl_<op>_desc_t **

dnnl_query_*_pd

const_dnnl_primitive_desc_t *

Note

Rule of thumb: all opaque types and structures are returned by reference. All numbers are returned by value.

Warning

All returned references point to constant objects and are valid only during the lifetime of the queried primitive descriptor. Returned objects must not be destroyed by the user. If you need to keep the object longer than the lifetime of the queried primitive descriptor, use dnnl_primitive_desc_clone() to make a copy.

Enum Values

dnnl_query_undef

no query

dnnl_query_engine

execution engine

dnnl_query_primitive_kind

primitive kind

dnnl_query_num_of_inputs_s32

number of inputs expected

dnnl_query_num_of_outputs_s32

number of outputs expected

dnnl_query_time_estimate_f64

runtime estimation (seconds)

dnnl_query_memory_consumption_s64

memory consumption extra

dnnl_query_scratchpad_engine

(scratch) memory, additional to all inputs and outputs memory (bytes)

scratchpad engine engine to be used

dnnl_query_impl_info_str

for creating scratchpad memory

implementation name

dnnl_query_reorder_src_engine

source engine

dnnl_query_reorder_dst_engine

destination engine

dnnl_query_prop_kind

propagation kind

dnnl_query_some_d

stub

dnnl_query_op_d

op descriptor

dnnl_query_convolution_d

convolution descriptor

dnnl_query_deconvolution_d

deconvolution descriptor

dnnl_query_shuffle_d

shuffle descriptor

dnnl_query_eltwise_d

eltwise descriptor

dnnl_query_softmax_d

softmax descriptor

dnnl_query_pooling_d

pooling descriptor

dnnl_query_lrn_d

lrn descriptor

dnnl_query_batch_normalization_d

batch normalization descriptor

dnnl_query_layer_normalization_d

layer normalization descriptor

dnnl_query_inner_product_d

inner product descriptor

dnnl_query_rnn_d

rnn descriptor

dnnl_query_gemm_d

GEMM descriptor (internal)

dnnl_query_binary_d

binary descriptor

dnnl_query_logsoftmax_d

logsoftmax descriptor

dnnl_query_matmul_d

matrix multiplication (matmul) descriptor

dnnl_query_resampling_d

resampling descriptor

dnnl_query_pooling_v2_d

pooling version 2 descriptor

dnnl_query_reduction_d

reduction descriptor

dnnl_query_prelu_d

prelu descriptor

dnnl_query_some_md

stub

dnnl_query_src_md

source memory desc

dnnl_query_diff_src_md

source gradient memory desc

dnnl_query_weights_md

weights memory descriptor desc

dnnl_query_diff_weights_md

weights grad. memory desc

dnnl_query_dst_md

destination memory desc

dnnl_query_diff_dst_md

destination grad. memory desc

dnnl_query_workspace_md

workspace memory desc

dnnl_query_scratchpad_md

scratchpad memory desc

dnnl_query_exec_arg_md

memory desc of an execute argument