Re: Flexible dimensions vs. flexible tensor


MyungJoo Ham
 

Dear Sascha,

 

My bad! I should've not used "flexible" in the two totally different contexts.

 

In the context of filter subplugin, it means "configuring output dimensions based on the input dimensions", and it cannot be changed between frames. It's determined at the launch-time.

 

In the context of "format" property of "other/tensors", it means that the dimension information is not embedded in GSTCAP so that changing the dimensions won't trigger GSTCAP updates.

 

We will need to update the documentation so that the first part won't metion "dynamic". I'll create a backlog for this.

 

Cheers,

MyungJoo.

 

 

--------- Original Message ---------

Sender : Sascha Brueck <sascha.brueck@...>

Date : 2022-10-07 20:52 (GMT+9)

Title : Flexible dimensions vs. flexible tensor

 

Dear MyungJoo,

 

 

I was posting a question about the tensor format and dimensions on the issues in GitHub. Please have a look at the following lines from nnstreamer/component-description.md at main · nnstreamer/nnstreamer (github.com)

 

 

tensor_filter

  •  Main (stable)
    •  Supported features
      •  Fixed input/output dimensions (fixed by subplugin)
      •  Flexible dimensions (output dimension determined by subplugin according to the input dimension determined by pipeline initialization)
      •  Invoke subplugin with pre-allocated buffers
      •  Invoke subplugin and let subplugin allocate output buffers.
      •  Accept other/tensors with static and flexible format.
      •  Users can add subplugins in run-time.

  

 My question is about the word flexible. It is used two times, one is flexible in the sense that the dimensions are determined by the subplugin according to the input dim at pipeline initialization, and once it is the other/tensors with flexible format. I am confused because I do not know if both are the same. It sounded to me as if both are the same when I read the doc but I think the flexible dimensions are not flexible in a sense that they can be different from frame to frame, while the other/tensors:flexible can be different from frame to frame. And the functions that are used in gst_tensor_filter_set_caps which might be GET_IN_OUT_INFO or SET_INPUT_INFO are both for static tensors. So how do I fill the function getModelInfo that must be provided by the author of a new tensor filter subplugin if I have a flexible tensor? Just leave it as ENOENT? But then how do I set the info that my custom plugin wants a flexible input or output matrix? Could you add that explanation to answer my question in the github issue?

  

 Cheers

 Sascha

 

 

 

 

 

Join {nnstreamer-technical-discuss@lists.lfaidata.foundation to automatically receive all group messages.