Skip to content

How to query for memory descriptors for weights_layer_md and weights_iter_md in RNN LSTM from primitive descriptor #4215

@lacak-sk

Description

@lacak-sk

Hello there are examples in C++ that query for memory descriptors for weights_layer and weights_iter in RNN LSTM primitive, that are:

But how to do it in plain C implementation? There is C API function: dnnl_primitive_desc_query_md(primitive_desc, what, index), where argument "what" is of dnnl_query_t type.
But dnnl_query_t type has only some options there, one of them is dnnl_query_weights_md but I do not see there another option which will distinguish weights_layer and weights_iter.

Can I use?:

  • dnnl_primitive_desc_query_md(primitive_desc, dnnl_query_exec_arg_md, DNNL_ARG_WEIGHTS_LAYER)
  • dnnl_primitive_desc_query_md(primitive_desc, dnnl_query_exec_arg_md, DNNL_ARG_WEIGHTS_ITER)
    or:
  • dnnl_primitive_desc_query_md(primitive_desc, dnnl_query_weights_md, DNNL_ARG_WEIGHTS_LAYER)
  • dnnl_primitive_desc_query_md(primitive_desc, dnnl_query_weights_md, DNNL_ARG_WEIGHTS_ITER)

And will be memory descriptors for:

  • DNNL_ARG_WEIGHTS_LAYER and DNNL_ARG_DIFF_WEIGHTS_LAYER the same?
  • DNNL_ARG_WEIGHTS_ITER and DNNL_ARG_DIFF_WEIGHTS_ITER the same?

Thanks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions