Skip to content

[onert] Remove unused tensorinfo function from common module#16193

Merged
hseok-oh merged 1 commit intoSamsung:masterfrom
arkq:python-native-in-top-level
Oct 14, 2025
Merged

[onert] Remove unused tensorinfo function from common module#16193
hseok-oh merged 1 commit intoSamsung:masterfrom
arkq:python-native-in-top-level

Conversation

@arkq
Copy link
Contributor

@arkq arkq commented Oct 7, 2025

This commit removes unused and broken tensorinfo() function from the common Python module.

>>> import onert
>>> onert.tensorinfo()
Traceback (most recent call last):
  File ".../onert/common/basesession.py", line 189, in tensorinfo
    return infer.nnfw_tensorinfo()
           ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'onert.native.libnnfw_api_pybind.infer' has no attribute 'nnfw_tensorinfo'

Removing this function allows to properly use the native tensorinfo structure from the onert top level module.

>>> import onert
>>> onert.tensorinfo()
<onert.native.libnnfw_api_pybind.tensorinfo object at 0x7601fe0916f0>

ONE-DCO-1.0-Signed-off-by: Arkadiusz Bokowy a.bokowy@samsung.com

This commit removes unused and broken tensorinfo() function from the
common Python module.

  >>> import onert
  >>> onert.tensorinfo()
  Traceback (most recent call last):
    File ".../onert/common/basesession.py", line 189, in tensorinfo
      return infer.nnfw_tensorinfo()
             ^^^^^^^^^^^^^^^^^^^^^
  AttributeError: module 'onert.native.libnnfw_api_pybind.infer' has no attribute 'nnfw_tensorinfo'

Removing this function allows to properly use the native tensorinfo
structure from the onert top level module.

  >>> import onert
  >>> onert.tensorinfo()
  <onert.native.libnnfw_api_pybind.tensorinfo object at 0x7601fe0916f0>

ONE-DCO-1.0-Signed-off-by: Arkadiusz Bokowy <a.bokowy@samsung.com>
@arkq arkq force-pushed the python-native-in-top-level branch from 8b1021a to 780a5a6 Compare October 8, 2025 08:08
@hseok-oh hseok-oh requested a review from ragmani October 13, 2025 02:19
Copy link
Contributor

@ragmani ragmani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Originally we planned to wrap native.libnnfw_api_pybind.tensorinfo, but that never moved forward. Given that, this change looks better than keeping the old code. It simplifies the public API, removes unnecessary indirection, and reduces potential import cycles.

@ragmani
Copy link
Contributor

ragmani commented Oct 13, 2025

@zetwhite

Do you have any plan to additionally implement tensorinfo wapper?

@arkq
Copy link
Contributor Author

arkq commented Oct 13, 2025

As for the tensorinfo itself I also have some work in progress regarding improvements in that area. I've just submitted a draft PR with my changes: #16199

@hseok-oh hseok-oh merged commit 9d8f9ef into Samsung:master Oct 14, 2025
10 checks passed
@arkq arkq deleted the python-native-in-top-level branch October 14, 2025 08:04
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

Successfully merging this pull request may close these issues.

3 participants