[][src]Function onednn_sys::dnnl_lstm_backward_desc_init_v3

pub unsafe extern "C" fn dnnl_lstm_backward_desc_init_v3(
    rnn_desc: *mut dnnl_rnn_desc_t,
    prop_kind: dnnl_prop_kind_t,
    direction: dnnl_rnn_direction_t,
    src_layer_desc: *const dnnl_memory_desc_t,
    src_iter_desc: *const dnnl_memory_desc_t,
    src_iter_c_desc: *const dnnl_memory_desc_t,
    weights_layer_desc: *const dnnl_memory_desc_t,
    weights_iter_desc: *const dnnl_memory_desc_t,
    weights_peephole_desc: *const dnnl_memory_desc_t,
    weights_projection_desc: *const dnnl_memory_desc_t,
    bias_desc: *const dnnl_memory_desc_t,
    dst_layer_desc: *const dnnl_memory_desc_t,
    dst_iter_desc: *const dnnl_memory_desc_t,
    dst_iter_c_desc: *const dnnl_memory_desc_t,
    diff_src_layer_desc: *const dnnl_memory_desc_t,
    diff_src_iter_desc: *const dnnl_memory_desc_t,
    diff_src_iter_c_desc: *const dnnl_memory_desc_t,
    diff_weights_layer_desc: *const dnnl_memory_desc_t,
    diff_weights_iter_desc: *const dnnl_memory_desc_t,
    diff_weights_peephole_desc: *const dnnl_memory_desc_t,
    diff_weights_projection_desc: *const dnnl_memory_desc_t,
    diff_bias_desc: *const dnnl_memory_desc_t,
    diff_dst_layer_desc: *const dnnl_memory_desc_t,
    diff_dst_iter_desc: *const dnnl_memory_desc_t,
    diff_dst_iter_c_desc: *const dnnl_memory_desc_t,
    flags: c_uint
) -> dnnl_status_t

Initializes a descriptor for an LSTM (with or without peephole and with or with out recurrent projection layer) backward propagation primitive.

The following arguments may either be @c NULL or point to a zero memory descriptor:

  • @p src_iter_desc together with @p src_iter_c_desc, diff_src_iter_desc, and @p diff_src_iter_c_desc,
  • @p weights_peephole_desc together with @p diff_weights_peephole_desc,
  • @p bias_desc together with @p diff_bias_desc,
  • @p dst_iter_desc together with @p dst_iter_c_desc, diff_dst_iter_desc, and @p diff_dst_iter_c_desc.

This would then indicate that the LSTM backward propagation primitive should not use them and should default to zero values instead.

The @p weights_projection_desc together with @p diff_weights_projection_desc could either be @c NULL or point to a zero memory descriptor. This would then indicate that the LSTM doesn't have recurrent projection layer.

@note All memory descriptors can be initialized with #dnnl_format_tag_any or with format_kind set to #dnnl_format_kind_any.

@param rnn_desc Output descriptor for LSTM primitive. @param prop_kind Propagation kind. Must be #dnnl_backward. @param direction RNN direction. See @ref dnnl_rnn_direction_t for more info. @param src_layer_desc Memory descriptor for the input vector. @param src_iter_desc Memory descriptor for the input recurrent hidden state vector. @param src_iter_c_desc Memory descriptor for the input recurrent cell state vector. @param weights_layer_desc Memory descriptor for the weights applied to the layer input. @param weights_iter_desc Memory descriptor for the weights applied to the recurrent input. @param weights_peephole_desc Memory descriptor for the weights applied to the cell states (according to the Peephole LSTM formula). @param weights_projection_desc Memory descriptor for the weights applied to the hidden states to get the recurrent projection (according to the Projection LSTM formula). @param bias_desc Bias memory descriptor. @param dst_layer_desc Memory descriptor for the output vector. @param dst_iter_desc Memory descriptor for the output recurrent hidden state vector. @param dst_iter_c_desc Memory descriptor for the output recurrent cell state vector. @param diff_src_layer_desc Memory descriptor for the diff of input vector. @param diff_src_iter_desc Memory descriptor for the diff of input recurrent hidden state vector. @param diff_src_iter_c_desc Memory descriptor for the diff of input recurrent cell state vector. @param diff_weights_layer_desc Memory descriptor for the diff of weights applied to the layer input. @param diff_weights_iter_desc Memory descriptor for the diff of weights applied to the recurrent input. @param diff_weights_peephole_desc Memory descriptor for the diff of weights applied to the cell states (according to the Peephole LSTM formula). @param diff_weights_projection_desc Memory descriptor for the diff of weights applied to the hidden states to get the recurrent projection (according to the Projection LSTM formula). @param diff_bias_desc Diff bias memory descriptor. @param diff_dst_layer_desc Memory descriptor for the diff of output vector. @param diff_dst_iter_desc Memory descriptor for the diff of output recurrent hidden state vector. @param diff_dst_iter_c_desc Memory descriptor for the diff of output recurrent cell state vector. @param flags Unused. @returns #dnnl_success on success and a status describing the error otherwise.