Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tensor filter framework v1 in nnstreamer_plugin_api_filter #4425

Open
1 of 11 tasks
niley7464 opened this issue Mar 18, 2024 · 2 comments
Open
1 of 11 tasks

Use tensor filter framework v1 in nnstreamer_plugin_api_filter #4425

niley7464 opened this issue Mar 18, 2024 · 2 comments
Assignees

Comments

@niley7464
Copy link
Contributor

niley7464 commented Mar 18, 2024

Change tensor_filter plugin which uses v0 GstTensorFilterFramework.

v0 is supposed to be used by old subplugins for backward compatibilty and any new subplugins should use v1, which is simpler and richers in features.

#4424
To use event handler, we need to use v1 in tensor_filter plugin

v0

int (*handleEvent) (event_ops ops, GstTensorFilterFrameworkEventData * data);

v1

int (*eventHandler) (const GstTensorFilterFramework * self, const GstTensorFilterProperties * prop,
          void *private_data, event_ops ops, GstTensorFilterFrameworkEventData * data);

Only v1 can use GstTensorFilterProperties.

Also, after changing every subplugin to v1, we can remove the NO_ANONYMOUS_NESTED_STRUCT macro.

Todo

  • armnn
  • caffe2
  • cpp
  • movidius_ncsdk2
  • nnfw
  • openvino
  • python3
  • pytorh
  • tensorflow_lite
  • tensorflow
  • vivante
@taos-ci
Copy link
Collaborator

taos-ci commented Mar 18, 2024

:octocat: cibot: Thank you for posting issue #4425. The person in charge will reply soon.

@myungjoo
Copy link
Member

myungjoo commented Mar 28, 2024

If you do not want to reimplement near-obsolete subplugins (e.g., no one uses CAFFE2 or NCSDK2), you may create a compatibility-wrapper (common macros or static inline functions that call v0 callback functions from v1 invocations) for such near-obsolete subplugins. You can minimize the workload.

Then, you can focus on "modernizing" actively used v0-subplugins. It is usually better to use C++ subplugin class if the framework's interface is in C++.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants