Added Python 3 bindings for TIDL API
authorAjay Jayaraj <ajayj@ti.com>
Fri, 21 Sep 2018 15:53:30 +0000 (10:53 -0500)
committerAjay Jayaraj <ajayj@ti.com>
Wed, 26 Sep 2018 21:37:31 +0000 (16:37 -0500)
commitd0c14e28e0992b29903c2f835f4ea8555b8dc40b
tree02a97300b077b0e3f1927fed1f57ba4dbf303872
parentcea3017f5a4d3fa13037a9f5049aedf49e379bb5
Added Python 3 bindings for TIDL API

* Using pybind11 v2.2 to add Python 3 bindings to TIDL API classes/methods
  https://pybind11.readthedocs.io/en/stable/index.html
  https://github.com/pybind/pybind11/tree/v2.2
* Leveraging the Python buffer protocol to expose input/output buffers
  from ExecutionObject/ExecutionObjectPipeline to Python application
  code. This eliminates copies between the Python application and the TIDL
  API library. (see examples/pybind/one_eo_per_frame.py).
* Methods renamed to follow Python style guide (PEP8)
* Bindings split across multiple pybind_* source files to reduce compile
  time
* tidl_api/Makefile builds a shared object - tidl.so. Add this so to
  PYTHONPATH to make the tidl module available to the Python interpreter.
  >>> import tidl
  >>> help (tidl)
* See examples/pybind for examples of using the Python bindings

(MCT-1009)
15 files changed:
examples/pybind/layer_output.py [new file with mode: 0755]
examples/pybind/one_eo_per_frame.py [new file with mode: 0755]
examples/pybind/tidl_app_utils.py [new file with mode: 0755]
examples/pybind/two_eo_per_frame.py [new file with mode: 0755]
makefile
tidl_api/Makefile
tidl_api/inc/configuration.h
tidl_api/make.buildid
tidl_api/make.inc
tidl_api/src/pybind_common.h [new file with mode: 0644]
tidl_api/src/pybind_configuration.cpp [new file with mode: 0644]
tidl_api/src/pybind_eo.cpp [new file with mode: 0644]
tidl_api/src/pybind_eop.cpp [new file with mode: 0644]
tidl_api/src/pybind_executor.cpp [new file with mode: 0644]
tidl_api/src/pybind_helpers.cpp [new file with mode: 0644]