Rename to TIDL
authorAjay Jayaraj <ajayj@ti.com>
Mon, 14 May 2018 17:57:24 +0000 (12:57 -0500)
committerAjay Jayaraj <ajayj@ti.com>
Mon, 14 May 2018 17:57:24 +0000 (12:57 -0500)
* Replace references to TINN in the sources and directory structure with
TIDL or TIDL API
* Moved the TIDL network viewer (tidl_viewer) from utils to viewer

(MCT-983)

50 files changed:
docs/Makefile
docs/make.bat [deleted file]
docs/source/api.rst
docs/source/conf.py
docs/source/using_api.rst
examples/imagenet/Makefile
examples/imagenet/main.cpp
examples/make.common
examples/segmentation/Makefile
examples/segmentation/main.cpp
examples/ssd_multibox/Makefile
examples/ssd_multibox/main.cpp
examples/test/Makefile
examples/test/main.cpp
examples/test/multiple_executors.cpp
readme.md
tidl_api/Makefile [moved from tinn_api/Makefile with 98% similarity]
tidl_api/doxygen/Doxyfile [moved from tinn_api/doxygen/Doxyfile with 100% similarity]
tidl_api/doxygen/ti-logo.png [moved from tinn_api/doxygen/ti-logo.png with 100% similarity]
tidl_api/doxygen/ticustom.css [moved from tinn_api/doxygen/ticustom.css with 100% similarity]
tidl_api/doxygen/tifooter.html [moved from tinn_api/doxygen/tifooter.html with 100% similarity]
tidl_api/doxygen/tiheader.html [moved from tinn_api/doxygen/tiheader.html with 100% similarity]
tidl_api/dsp/Makefile [moved from tinn_api/dsp/Makefile with 100% similarity]
tidl_api/dsp/ocl_wrapper.cl [moved from tinn_api/dsp/ocl_wrapper.cl with 100% similarity]
tidl_api/inc/configuration.h [moved from tinn_api/inc/configuration.h with 99% similarity]
tidl_api/inc/execution_object.h [moved from tinn_api/inc/execution_object.h with 99% similarity]
tidl_api/inc/executor.h [moved from tinn_api/inc/executor.h with 98% similarity]
tidl_api/inc/imgutil.h [moved from tinn_api/inc/imgutil.h with 97% similarity]
tidl_api/make.inc [moved from tinn_api/make.inc with 100% similarity]
tidl_api/src/common_defines.h [moved from tinn_api/src/common_defines.h with 100% similarity]
tidl_api/src/configuration.cpp [moved from tinn_api/src/configuration.cpp with 99% similarity]
tidl_api/src/configuration_parser.cpp [moved from tinn_api/src/configuration_parser.cpp with 99% similarity]
tidl_api/src/execution_object.cpp [moved from tinn_api/src/execution_object.cpp with 98% similarity]
tidl_api/src/executor.cpp [moved from tinn_api/src/executor.cpp with 95% similarity]
tidl_api/src/executor_impl.h [moved from tinn_api/src/executor_impl.h with 98% similarity]
tidl_api/src/imgutil.cpp [moved from tinn_api/src/imgutil.cpp with 99% similarity]
tidl_api/src/ocl_device.cpp [moved from tinn_api/src/ocl_device.cpp with 99% similarity]
tidl_api/src/ocl_device.h [moved from tinn_api/src/ocl_device.h with 99% similarity]
tidl_api/src/parameters.h [moved from tinn_api/src/parameters.h with 99% similarity]
tidl_api/src/tidl_create_params.h [moved from tinn_api/src/tidl_create_params.h with 100% similarity]
tidl_api/src/trace.cpp [moved from tinn_api/src/trace.cpp with 98% similarity]
tidl_api/src/trace.h [moved from tinn_api/src/trace.h with 99% similarity]
tidl_api/src/util.cpp [moved from tinn_api/src/util.cpp with 94% similarity]
tidl_api/src/util.h [moved from tinn_api/src/util.h with 98% similarity]
viewer/Makefile [moved from utils/Makefile with 82% similarity]
viewer/dot_graph.cpp [moved from utils/src/dot_graph.cpp with 100% similarity]
viewer/dot_graph.h [moved from utils/src/dot_graph.h with 100% similarity]
viewer/main.cpp [moved from utils/main.cpp with 97% similarity]
viewer/tidl_viewer.cpp [moved from utils/src/tinn_utils.cpp with 95% similarity]
viewer/tidl_viewer.h [moved from utils/inc/tinn_utils.h with 97% similarity]

index 028b747b0133c073e94980532d74189c73d82adb..523b4310599129eed2a91a53407cd833d69e9814 100644 (file)
@@ -198,4 +198,4 @@ artifacts:
        $(MAKE) -c artifacts
 
 api-xml:
-       (cd ../tinn_api/doxygen; doxygen)
+       (cd ../tidl_api/doxygen; doxygen)
diff --git a/docs/make.bat b/docs/make.bat
deleted file mode 100644 (file)
index dc7d5a2..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-@ECHO OFF
-
-REM Command file for Sphinx documentation
-
-if "%SPHINXBUILD%" == "" (
-       set SPHINXBUILD=sphinx-build
-)
-set BUILDDIR=build
-set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
-set I18NSPHINXOPTS=%SPHINXOPTS% source
-if NOT "%PAPER%" == "" (
-       set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
-       set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
-)
-
-if "%1" == "" goto help
-
-if "%1" == "help" (
-       :help
-       echo.Please use `make ^<target^>` where ^<target^> is one of
-       echo.  html       to make standalone HTML files
-       echo.  dirhtml    to make HTML files named index.html in directories
-       echo.  singlehtml to make a single large HTML file
-       echo.  pickle     to make pickle files
-       echo.  json       to make JSON files
-       echo.  htmlhelp   to make HTML files and a HTML help project
-       echo.  qthelp     to make HTML files and a qthelp project
-       echo.  devhelp    to make HTML files and a Devhelp project
-       echo.  epub       to make an epub
-       echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
-       echo.  text       to make text files
-       echo.  man        to make manual pages
-       echo.  texinfo    to make Texinfo files
-       echo.  gettext    to make PO message catalogs
-       echo.  changes    to make an overview over all changed/added/deprecated items
-       echo.  xml        to make Docutils-native XML files
-       echo.  pseudoxml  to make pseudoxml-XML files for display purposes
-       echo.  linkcheck  to check all external links for integrity
-       echo.  doctest    to run all doctests embedded in the documentation if enabled
-       echo.  coverage   to run coverage check of the documentation if enabled
-       goto end
-)
-
-if "%1" == "clean" (
-       for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
-       del /q /s %BUILDDIR%\*
-       goto end
-)
-
-
-REM Check if sphinx-build is available and fallback to Python version if any
-%SPHINXBUILD% 2> nul
-if errorlevel 9009 goto sphinx_python
-goto sphinx_ok
-
-:sphinx_python
-
-set SPHINXBUILD=python -m sphinx.__init__
-%SPHINXBUILD% 2> nul
-if errorlevel 9009 (
-       echo.
-       echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
-       echo.installed, then set the SPHINXBUILD environment variable to point
-       echo.to the full path of the 'sphinx-build' executable. Alternatively you
-       echo.may add the Sphinx directory to PATH.
-       echo.
-       echo.If you don't have Sphinx installed, grab it from
-       echo.http://sphinx-doc.org/
-       exit /b 1
-)
-
-:sphinx_ok
-
-
-if "%1" == "html" (
-       %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The HTML pages are in %BUILDDIR%/html.
-       goto end
-)
-
-if "%1" == "dirhtml" (
-       %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
-       goto end
-)
-
-if "%1" == "singlehtml" (
-       %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
-       goto end
-)
-
-if "%1" == "pickle" (
-       %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished; now you can process the pickle files.
-       goto end
-)
-
-if "%1" == "json" (
-       %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished; now you can process the JSON files.
-       goto end
-)
-
-if "%1" == "htmlhelp" (
-       %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished; now you can run HTML Help Workshop with the ^
-.hhp project file in %BUILDDIR%/htmlhelp.
-       goto end
-)
-
-if "%1" == "qthelp" (
-       %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished; now you can run "qcollectiongenerator" with the ^
-.qhcp project file in %BUILDDIR%/qthelp, like this:
-       echo.^> qcollectiongenerator %BUILDDIR%\qthelp\TIOpenCL.qhcp
-       echo.To view the help file:
-       echo.^> assistant -collectionFile %BUILDDIR%\qthelp\TIOpenCL.ghc
-       goto end
-)
-
-if "%1" == "devhelp" (
-       %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished.
-       goto end
-)
-
-if "%1" == "epub" (
-       %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The epub file is in %BUILDDIR%/epub.
-       goto end
-)
-
-if "%1" == "latex" (
-       %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
-       goto end
-)
-
-if "%1" == "latexpdf" (
-       %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
-       cd %BUILDDIR%/latex
-       make all-pdf
-       cd %~dp0
-       echo.
-       echo.Build finished; the PDF files are in %BUILDDIR%/latex.
-       goto end
-)
-
-if "%1" == "latexpdfja" (
-       %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
-       cd %BUILDDIR%/latex
-       make all-pdf-ja
-       cd %~dp0
-       echo.
-       echo.Build finished; the PDF files are in %BUILDDIR%/latex.
-       goto end
-)
-
-if "%1" == "text" (
-       %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The text files are in %BUILDDIR%/text.
-       goto end
-)
-
-if "%1" == "man" (
-       %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The manual pages are in %BUILDDIR%/man.
-       goto end
-)
-
-if "%1" == "texinfo" (
-       %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
-       goto end
-)
-
-if "%1" == "gettext" (
-       %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
-       goto end
-)
-
-if "%1" == "changes" (
-       %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.The overview file is in %BUILDDIR%/changes.
-       goto end
-)
-
-if "%1" == "linkcheck" (
-       %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Link check complete; look for any errors in the above output ^
-or in %BUILDDIR%/linkcheck/output.txt.
-       goto end
-)
-
-if "%1" == "doctest" (
-       %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Testing of doctests in the sources finished, look at the ^
-results in %BUILDDIR%/doctest/output.txt.
-       goto end
-)
-
-if "%1" == "coverage" (
-       %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Testing of coverage in the sources finished, look at the ^
-results in %BUILDDIR%/coverage/python.txt.
-       goto end
-)
-
-if "%1" == "xml" (
-       %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The XML files are in %BUILDDIR%/xml.
-       goto end
-)
-
-if "%1" == "pseudoxml" (
-       %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
-       if errorlevel 1 exit /b 1
-       echo.
-       echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
-       goto end
-)
-
-:end
index d27202780ddb91a5c5889cc5f2b84597fa4b1bdc..c692b05a12284d8d67392a9ffcd9ad9f3a5e7ac2 100644 (file)
@@ -2,7 +2,7 @@
 TIDL API Reference
 ******************
 
-.. doxygennamespace:: tinn
+.. doxygennamespace:: tidl
     :project: TIDL
     :members:
 
index ab901cf49e3cd72c7c8ce533c54530001d76e83a..c790755e07c22d104a9acf5d848c9195e325f04c 100644 (file)
@@ -279,5 +279,5 @@ def setup(app):
 # -- Breathe extension to integrate doxygen output --
 
 breathe_projects = {
-"TIDL":"../../tinn_api/doxygen/xml/",
+"TIDL":"../../tidl_api/doxygen/xml/",
 }
index 8f85f5c266d68d31d5e0746a879848965f2a25c9..c4387e91760bb9575fe21191e4fb0c44a79ddf01 100644 (file)
@@ -16,7 +16,7 @@ Determine if there are any TIDL capable devices on the AM57x SoC:
 
 Step 2
 ======
-Create a Configuration object by reading it from a file or by initializing it directly. The example below parses a configuration file and initializes the Configuration object. See ``tidl/testvecs/config/infer`` for examples of configuration files.
+Create a Configuration object by reading it from a file or by initializing it directly. The example below parses a configuration file and initializes the Configuration object. See ``examples/test/testvecs/config/infer`` for examples of configuration files.
 
 .. code::
 
@@ -86,7 +86,7 @@ The code snippet :ref:`tidl_main` illustrates using the API to offload a network
 .. literalinclude:: ../../examples/test/main.cpp
     :name: tidl_main
     :caption: examples/test/main.cpp
-    :lines: 161-195,213-218,220-225
+    :lines: 155-189,208-213,215-220
     :linenos:
 
-For a complete example of using the API, refer ``tinn/examples/opencl/tidl/main.cpp`` on the EVM filesystem.
+For a complete example of using the API, refer ``examples/test/main.cpp`` on the EVM filesystem.
index 7359e20c6d4d86fc7b7d719dfe6e8736f100b536..ed66fa145ac8b6b39cf32894a0ad7156748e6b8d 100644 (file)
@@ -7,7 +7,7 @@ LIBS     += $(shell pkg-config --libs --static opencv)
 
 SOURCES = main.cpp imagenet_classes.cpp
 
-$(EXE): $(TINN_LIB) $(TINN_LIB_IMGUTIL) $(HEADERS) $(SOURCES)
-       $(CXX) $(CXXFLAGS) $(SOURCES) $(TINN_LIB) $(TINN_LIB_IMGUTIL) \
+$(EXE): $(TIDL_API_LIB) $(TIDL_API_LIB_IMGUTIL) $(HEADERS) $(SOURCES)
+       $(CXX) $(CXXFLAGS) $(SOURCES) $(TIDL_API_LIB) $(TIDL_API_LIB_IMGUTIL) \
            $(LDFLAGS) $(LIBS) -o $@
 
index d7decc6b79a085a34b60d55efc147a9e92a4fb08..744fb85db1a978e50aa998d28c1e7c3b063ef01a 100644 (file)
@@ -54,8 +54,8 @@
 
 bool __TI_show_debug_ = false;
 
-using namespace tinn;
-using namespace tinn::imgutil;
+using namespace tidl;
+using namespace tidl::imgutil;
 using namespace cv;
 
 #define NUM_VIDEO_FRAMES  100
@@ -228,7 +228,7 @@ bool RunConfiguration(const std::string& config_file, int num_devices,
             free(b);
 
     }
-    catch (tinn::Exception &e)
+    catch (tidl::Exception &e)
     {
         std::cerr << e.what() << std::endl;
         status = false;
index 88aec56792c5ec8751ac92193e0e9be8b51c6bdb..07ae3da9cbe39e1bf6a58d97432ccb4ae583e1d6 100644 (file)
@@ -2,13 +2,13 @@ RM = rm
 AR = ar
 CP = cp
 
-TINN_DIR = ../../tinn_api
-TINN_LIB_NAME = tinn_api.a
-TINN_LIB = $(TINN_DIR)/$(TINN_LIB_NAME)
-TINN_LIB_IMGUTIL_NAME = tinn_imgutil.a
-TINN_LIB_IMGUTIL = $(TINN_DIR)/$(TINN_LIB_IMGUTIL_NAME)
+TIDL_API_DIR = ../../tidl_api
+TIDL_API_LIB_NAME = tidl_api.a
+TIDL_API_LIB = $(TIDL_API_DIR)/$(TIDL_API_LIB_NAME)
+TIDL_API_LIB_IMGUTIL_NAME = tidl_imgutil.a
+TIDL_API_LIB_IMGUTIL = $(TIDL_API_DIR)/$(TIDL_API_LIB_IMGUTIL_NAME)
 
-include $(TINN_DIR)/make.inc
+include $(TIDL_API_DIR)/make.inc
 
 ifeq ($(BUILD), debug)
        CXXFLAGS += -Og -g -ggdb
@@ -16,7 +16,7 @@ else
        CXXFLAGS += -O3
 endif
 
-CXXFLAGS += -I. -I$(TINN_DIR)/inc -std=c++11
+CXXFLAGS += -I. -I$(TIDL_API_DIR)/inc -std=c++11
 CXXFLAGS += -I$(TI_OCL_INSTALL)/usr/share/ti/opencl
 CXXFLAGS += -I$(TARGET_ROOTDIR)/usr/share/ti/opencl
 
@@ -25,17 +25,17 @@ LIBS    = -lOpenCL -locl_util -lpthread
 
 all: $(EXE)
 
-.PHONY: $(TINN_LIB)
-$(TINN_LIB):
-       $(MAKE) -C $(TINN_DIR) $(TINN_LIB_NAME)
+.PHONY: $(TIDL_API_LIB)
+$(TIDL_API_LIB):
+       $(MAKE) -C $(TIDL_API_DIR) $(TIDL_API_LIB_NAME)
 
-.PHONY: $(TINN_LIB_IMGUTIL)
-$(TINN_LIB_IMGUTIL):
-       $(MAKE) -C $(TINN_DIR) $(TINN_LIB_IMGUTIL_NAME)
+.PHONY: $(TIDL_API_LIB_IMGUTIL)
+$(TIDL_API_LIB_IMGUTIL):
+       $(MAKE) -C $(TIDL_API_DIR) $(TIDL_API_LIB_IMGUTIL_NAME)
 
 realclean: clean
-       $(MAKE) -C $(TINN_DIR) clean
-       $(MAKE) -C $(TINN_DIR)/dsp clean
+       $(MAKE) -C $(TIDL_API_DIR) clean
+       $(MAKE) -C $(TIDL_API_DIR)/dsp clean
 
 clean::
        $(RM) -f $(EXE) stats_tool_out.* *.out
index 972c59ef0d2f66437028f4600a554bc1213e2d12..c5806d9f6c9afb266cecce5c7fd824f831f13eb5 100644 (file)
@@ -7,8 +7,8 @@ LIBS     += $(shell pkg-config --libs --static opencv)
 
 SOURCES = main.cpp object_classes.cpp
 
-$(EXE): $(TINN_LIB) $(HEADERS) $(SOURCES)
-       $(CXX) $(CXXFLAGS) $(SOURCES) $(TINN_LIB) \
+$(EXE): $(TIDL_API_LIB) $(HEADERS) $(SOURCES)
+       $(CXX) $(CXXFLAGS) $(SOURCES) $(TIDL_API_LIB) \
            $(LDFLAGS) $(LIBS) -o $@
 
 clean::
index 67b712c075662798a50fbbfa74d86f9b64b37b2b..786d6ee60db5a6ef41d4490c7ba11d56d0b76548 100644 (file)
@@ -63,7 +63,7 @@ int  orig_width;
 int  orig_height;
 object_class_table_t *object_class_table;
 
-using namespace tinn;
+using namespace tidl;
 using namespace cv;
 
 
@@ -247,7 +247,7 @@ bool RunConfiguration(const std::string& config_file, int num_devices,
             free(b);
 
     }
-    catch (tinn::Exception &e)
+    catch (tidl::Exception &e)
     {
         std::cerr << e.what() << std::endl;
         status = false;
index c3f82dc9e3ac18d824a07c2d268c836f624a73b4..0a331dcc97f866e138e77926a2c52c5d1d419646 100644 (file)
@@ -7,8 +7,8 @@ LIBS     += $(shell pkg-config --libs --static opencv)
 
 SOURCES = main.cpp ../segmentation/object_classes.cpp
 
-$(EXE): $(TINN_LIB) $(HEADERS) $(SOURCES)
-       $(CXX) $(CXXFLAGS) $(SOURCES) $(TINN_LIB) \
+$(EXE): $(TIDL_API_LIB) $(HEADERS) $(SOURCES)
+       $(CXX) $(CXXFLAGS) $(SOURCES) $(TIDL_API_LIB) \
            $(LDFLAGS) $(LIBS) -o $@
 
 clean::
index a44f8cd1e8d7aedd1a605fd4cbfb6cba7ff27476..7fa3b23b38830755881896a330bab4aff8507d33 100644 (file)
@@ -63,7 +63,7 @@ int  orig_width;
 int  orig_height;
 object_class_table_t *object_class_table;
 
-using namespace tinn;
+using namespace tidl;
 using namespace cv;
 
 
@@ -278,7 +278,7 @@ bool RunConfiguration(const std::string& config_file, uint32_t num_devices,
         for (auto b : buffers)
             free(b);
     }
-    catch (tinn::Exception &e)
+    catch (tidl::Exception &e)
     {
         std::cerr << e.what() << std::endl;
         status = false;
index 49f4f411a8d4c4cd36ff633ab7ef59628c723b39..0181e2b29c8ba8d7b94d3b1ad3299df3a8f620fe 100644 (file)
@@ -1,9 +1,9 @@
-EXE = test_tinn
+EXE = test_tidl
 
 include ../make.common
 
 $(EXE): SOURCES = main.cpp multiple_executors.cpp
 
-$(EXE): $(TINN_LIB) $(HEADERS) $(SOURCES)
-       $(CXX) $(CXXFLAGS) $(SOURCES) $(TINN_LIB) $(LDFLAGS) $(LIBS) -o $@
+$(EXE): $(TIDL_API_LIB) $(HEADERS) $(SOURCES)
+       $(CXX) $(CXXFLAGS) $(SOURCES) $(TIDL_API_LIB) $(LDFLAGS) $(LIBS) -o $@
 
index 2233dad413228c6954ee3323e686a529f354e43a..a9a35c4f7207a8759bb56712c29e24a36538ebc3 100644 (file)
@@ -42,7 +42,7 @@
 
 bool __TI_show_debug_ = false;
 
-using namespace tinn;
+using namespace tidl;
 
 bool RunMultipleExecutors(const std::string& config_file_1,
                           const std::string& config_file_2,
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
     signal(SIGABRT, exit);
     signal(SIGTERM, exit);
 
-    // If there are no devices capable of offloading TINN on the SoC, exit
+    // If there are no devices capable of offloading TIDL on the SoC, exit
     uint32_t num_dla = Executor::GetNumDevices(DeviceType::DLA);
     uint32_t num_dsp = Executor::GetNumDevices(DeviceType::DSP);
     if (num_dla == 0 && num_dsp == 0)
@@ -220,7 +220,7 @@ bool RunConfiguration(const std::string& config_file, int num_devices,
             free(b);
 
     }
-    catch (tinn::Exception &e)
+    catch (tidl::Exception &e)
     {
         std::cerr << e.what() << std::endl;
         status = false;
@@ -233,7 +233,7 @@ bool RunConfiguration(const std::string& config_file, int num_devices,
     return status;
 }
 
-namespace tinn {
+namespace tidl {
 extern bool CompareFiles (const std::string &F1, const std::string &F2);
 extern bool CompareFrames(const std::string &F1, const std::string &F2,
                           int numFrames, int width, int height);
@@ -398,7 +398,7 @@ void ProcessArgs(int argc, char *argv[], std::string& config_file,
 
 void DisplayHelp()
 {
-    std::cout << "Usage: test_tinn\n"
+    std::cout << "Usage: test_tidl\n"
                  "  Will run all available networks if invoked without"
                  " any arguments.\n  Use -c to run a single network.\n"
                  "Optional arguments:\n"
index 69c97cec5e3b6e702e5b1e8c8211e7c4db8bcb49..173ee23caee32b64ac4c26382200658d10e6ac84 100644 (file)
@@ -45,7 +45,7 @@
 #include "execution_object.h"
 #include "configuration.h"
 
-using namespace tinn;
+using namespace tidl;
 
 extern bool ReadFrame(ExecutionObject&     eo,
                int                  frame_idx,
@@ -199,7 +199,7 @@ void* run_network(void *data)
         for (auto b : buffers)
             __free_ddr(b);
     }
-    catch (tinn::Exception &e)
+    catch (tidl::Exception &e)
     {
         std::cerr << e.what() << std::endl;
         status = false;
index ccc4f6ff023459e48bdd29c6cecbd9d00dcbfddb..295a61b5fa3e04e09e0c54d1c54317de8fac61ee 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,6 @@
-TI Neural Network (TINN) API
-----------------------------
+TI Deep Learning (TIDL) API
+---------------------------
 
+TIDL API brings Deep Learning to the edge and enables applications to leverage TI’s proprietary CNN/DNN implementation on Deep Learning Accelerators (DLAs) and C66x DSPs. 
 
+TIDL API requires OpenCL v1.1.15 or newer. Refer TIDL API User's Guide for details.
similarity index 98%
rename from tinn_api/Makefile
rename to tidl_api/Makefile
index 6c7db05852ea4f0c7a1e9e21426114f8ab04e312..73a67f73a357cace26da7d43044db1149d3c43e5 100644 (file)
@@ -32,10 +32,10 @@ ifeq ($(shell git rev-parse --short HEAD 2>&1 1>/dev/null; echo $$?),0)
 BUILD_SHA?=$(shell git rev-parse --short HEAD)
 endif
 
-LIB_NAME = tinn_api.a
+LIB_NAME = tidl_api.a
 DSP_SRCFILE = dsp/ocl_wrapper.cl
 DSP_OUTFILE = dsp/ocl_wrapper.dsp_h
-LIB_IMGUTIL_NAME = tinn_imgutil.a
+LIB_IMGUTIL_NAME = tidl_imgutil.a
 
 all: $(LIB_NAME) $(LIB_IMGUTIL_NAME)
 
similarity index 100%
rename from tinn_api/dsp/Makefile
rename to tidl_api/dsp/Makefile
similarity index 99%
rename from tinn_api/inc/configuration.h
rename to tidl_api/inc/configuration.h
index 088a6291a413af379087acc12d7005826b293128..b42d6658fc700182737cef32acb335483d0d2a69 100644 (file)
@@ -33,7 +33,7 @@
 #include <string>
 #include <iostream>
 
-namespace tinn {
+namespace tidl {
 
 /*! @class Configuration
     @brief Specifies the configuration required for a network
similarity index 99%
rename from tinn_api/inc/execution_object.h
rename to tidl_api/inc/execution_object.h
index c334ac98c98c8caade37a53e65d6b4ac055b2276..98b542a0618055dcf283c1360ac32768431e7004 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <memory>
 
-namespace tinn {
+namespace tidl {
 
 class Kernel;
 class Device;
@@ -115,4 +115,4 @@ class ExecutionObject
         std::unique_ptr<Impl> pimpl_m;
 };
 
-} // namespace tinn
+} // namespace tidl
similarity index 98%
rename from tinn_api/inc/executor.h
rename to tidl_api/inc/executor.h
index 05e9cc04923a7d749dc201944de856c884baa241..2594d08edfa9cd44e381ca3809886c11296d32b1 100644 (file)
@@ -40,7 +40,7 @@
 #include "configuration.h"
 #include "custom.h"
 
-namespace tinn {
+namespace tidl {
 
 //! Enumerates types of devices available to offload the network.
 enum class DeviceType { DSP, /**< Offload to C66x DSP */
@@ -157,11 +157,11 @@ class ArgInfo
         //! @return The size of the buffer or scalar represented by ArgInfo
         size_t size() const { return size_m; }
 
-        // Only used by tinn::Device
+        // Only used by tidl::Device
         Kind   kind() const { return kind_m; }
         bool   isLocal() const { return (ptr_m == nullptr) && (size_m > 0); }
 
-        // Only used by tinn::ExecutionObject::Impl
+        // Only used by tidl::ExecutionObject::Impl
         PipeInfo *GetPipe() const { return pipe_m.get(); }
 
     private:
@@ -221,4 +221,4 @@ class Exception : public std::exception
         std::string message_m;
 };
 
-} // namespace tinn
+} // namespace tidl
similarity index 97%
rename from tinn_api/inc/imgutil.h
rename to tidl_api/inc/imgutil.h
index 76648f8311a1a6c2cf7586064855b7c2044cafe5..e052548a420572e6f48605697216c5ff07ade76a 100644 (file)
@@ -33,7 +33,7 @@
 #include "opencv2/imgproc.hpp"
 using namespace cv;
 
-namespace tinn {
+namespace tidl {
 namespace imgutil {
 
 //! PreProcImage - preprocess image data into the value ranges that
@@ -52,5 +52,5 @@ bool PreProcImage(Mat& image, char *ptr, int16_t roi, int16_t n,
                   int16_t width, int16_t height, int16_t pitch,
                   int32_t chOffset, int32_t frameCount, int32_t preProcType);
 
-} // namesapce tinn::imgutil
-} // namespace tinn
+} // namesapce tidl::imgutil
+} // namespace tidl
similarity index 100%
rename from tinn_api/make.inc
rename to tidl_api/make.inc
similarity index 99%
rename from tinn_api/src/configuration.cpp
rename to tidl_api/src/configuration.cpp
index 70fd136b65b3bd43d2aa3f83b37eef712c46ed2f..202ac43f7746b9d17b3ccf0df87c361917c6a5e7 100644 (file)
@@ -32,7 +32,7 @@
 #include "configuration.h"
 #include "parameters.h"
 
-using namespace tinn;
+using namespace tidl;
 
 Configuration::Configuration(): numFrames(0), inHeight(0), inWidth(0),
                      inNumChannels(0),
similarity index 99%
rename from tinn_api/src/configuration_parser.cpp
rename to tidl_api/src/configuration_parser.cpp
index e246f4d0bfcafaee9696445d14a925bec8222b13..c58d8f51cd60f34e7bb1caf89e2f242d19c53b66 100644 (file)
@@ -39,7 +39,7 @@ namespace qi = boost::spirit::qi;
 namespace ascii = boost::spirit::ascii;
 namespace ph = boost::phoenix;
 
-using namespace tinn;
+using namespace tidl;
 
 template <typename Iterator>
 struct ConfigParser : qi::grammar<Iterator, ascii::space_type>
similarity index 98%
rename from tinn_api/src/execution_object.cpp
rename to tidl_api/src/execution_object.cpp
index dbdb90293206cf804b7fc9458d1cae596c4d444a..29b75c4529ff653c680524eec5702bd3a9533876 100644 (file)
@@ -37,7 +37,7 @@
 #include "common_defines.h"
 #include <string.h>
 
-using namespace tinn;
+using namespace tidl;
 
 class ExecutionObject::Impl
 {
@@ -130,8 +130,8 @@ ExecutionObject::Impl::Impl(Device* d,
            sizeof(OCL_TIDL_InitializeParams));
 
     shared_initialize_params_m->tidlHeapSize = extmem_heap_size;
-    shared_initialize_params_m->l2HeapSize   = tinn::internal::DMEM1_SIZE;
-    shared_initialize_params_m->l1HeapSize   = tinn::internal::DMEM0_SIZE;
+    shared_initialize_params_m->l2HeapSize   = tidl::internal::DMEM1_SIZE;
+    shared_initialize_params_m->l1HeapSize   = tidl::internal::DMEM0_SIZE;
     shared_initialize_params_m->enableTrace  = OCL_TIDL_TRACE_OFF;
     shared_initialize_params_m->enableInternalInput = internal_input ? 1 : 0;
 
@@ -143,7 +143,7 @@ ExecutionObject::Impl::Impl(Device* d,
                         ArgInfo(shared_initialize_params_m.get(),
                                 sizeof(OCL_TIDL_InitializeParams)),
                         device_m->type() == CL_DEVICE_TYPE_ACCELERATOR ?
-                            ArgInfo(nullptr, tinn::internal::DMEM1_SIZE):
+                            ArgInfo(nullptr, tidl::internal::DMEM1_SIZE):
                             ArgInfo(nullptr, 4)                       };
 
     k_initialize_m.reset(new Kernel(device_m,
@@ -240,7 +240,7 @@ ExecutionObject::Impl::SetupProcessKernel(const ArgInfo& in, const ArgInfo& out)
 
     shared_process_params_m.reset(malloc_ddr<OCL_TIDL_ProcessParams>());
     shared_process_params_m->enableTrace = OCL_TIDL_TRACE_OFF;
-    shared_process_params_m->enableInternalInput = 
+    shared_process_params_m->enableInternalInput =
                                shared_initialize_params_m->enableInternalInput;
     shared_process_params_m->cycles = 0;
 
similarity index 95%
rename from tinn_api/src/executor.cpp
rename to tidl_api/src/executor.cpp
index e16f6d0eca7132a9828b13d9c2deeabef825ca23..9d2d925cd32a8d37a73117ef664e227d6e76b5d5 100644 (file)
@@ -6,7 +6,7 @@
 #include "trace.h"
 
 
-using namespace tinn;
+using namespace tidl;
 
 using std::unique_ptr;
 
@@ -192,13 +192,13 @@ void ExecutorImpl::InitializeNetworkCreateParam(TIDL_CreateParams *CP,
 {
     CP->currCoreId           = layers_group_id_m;
     CP->currLayersGroupId    = layers_group_id_m;
-    CP->l1MemSize            = tinn::internal::DMEM0_SIZE;
-    CP->l2MemSize            = tinn::internal::DMEM1_SIZE;
-    CP->l3MemSize            = tinn::internal::OCMC_SIZE;
+    CP->l1MemSize            = tidl::internal::DMEM0_SIZE;
+    CP->l2MemSize            = tidl::internal::DMEM1_SIZE;
+    CP->l3MemSize            = tidl::internal::OCMC_SIZE;
 
-    CP->quantHistoryParam1   = tinn::internal::QUANT_HISTORY_PARAM1;
-    CP->quantHistoryParam2   = tinn::internal::QUANT_HISTORY_PARAM2;
-    CP->quantMargin          = tinn::internal::QUANT_MARGIN;
+    CP->quantHistoryParam1   = tidl::internal::QUANT_HISTORY_PARAM1;
+    CP->quantHistoryParam2   = tidl::internal::QUANT_HISTORY_PARAM2;
+    CP->quantMargin          = tidl::internal::QUANT_MARGIN;
     CP->optimiseExtMem       = TIDL_optimiseExtMemL1;
 }
 
similarity index 98%
rename from tinn_api/src/executor_impl.h
rename to tidl_api/src/executor_impl.h
index 704b1f7162bbd6416e4d8b04b6b983d322981fc7..d60e498fb2e687541d19df138b9579f15ffacc50 100644 (file)
@@ -42,7 +42,7 @@
 #include "tidl_create_params.h" // for TIDL types
 #include "execution_object.h"
 
-namespace tinn {
+namespace tidl {
 
 
 // One instance across all devices available in the context
@@ -78,4 +78,4 @@ class ExecutorImpl
         int                  layers_group_id_m;
 };
 
-} // namespace tinn
+} // namespace tidl
similarity index 99%
rename from tinn_api/src/imgutil.cpp
rename to tidl_api/src/imgutil.cpp
index 668080cfd6780241e2675c2382c9eaaed6e72f16..3336ad2443724b51185b4c6f053d5e4a3983eae2 100644 (file)
@@ -29,9 +29,9 @@
 #include <iostream>
 #include "imgutil.h"
 
-using namespace tinn;
+using namespace tidl;
 
-bool tinn::imgutil::PreProcImage(
+bool tidl::imgutil::PreProcImage(
                   Mat& image, char *ptr, int16_t roi, int16_t n,
                   int16_t width, int16_t height, int16_t pitch,
                   int32_t chOffset, int32_t frameCount, int32_t preProcType)
similarity index 99%
rename from tinn_api/src/ocl_device.cpp
rename to tidl_api/src/ocl_device.cpp
index df4b35467a1ee46c2ee79ba060b8f288c6520e34..f539503f3d5918ed5f6d3aeb249e3216ca7c6844 100644 (file)
@@ -38,7 +38,7 @@ using std::size_t;
 #include "trace.h"
 #include "../dsp/ocl_wrapper.dsp_h"
 
-using namespace tinn;
+using namespace tidl;
 
 static const char* error2string(cl_int err);
 static void        errorCheck(cl_int ret, int line);
similarity index 99%
rename from tinn_api/src/ocl_device.h
rename to tidl_api/src/ocl_device.h
index 1f92fcede8961227d36392d3bf51b00698eee004..7967814ff42a79db883ce6385c1f9f2f1d411460 100644 (file)
@@ -39,7 +39,7 @@
 #include <memory>
 #include "executor.h"
 
-namespace tinn
+namespace tidl
 {
 
 typedef std::vector<ArgInfo> KernelArgs;
similarity index 99%
rename from tinn_api/src/parameters.h
rename to tidl_api/src/parameters.h
index ebd7181e2019665cba6200e986631762d17ec4b0..121625a902d158c09c115cae82794f5422fb268d 100644 (file)
@@ -28,7 +28,7 @@
 
 #pragma once
 
-namespace tinn {
+namespace tidl {
 namespace internal {
 
 const size_t DMEM0_SIZE             = 8*1024;
similarity index 98%
rename from tinn_api/src/trace.cpp
rename to tidl_api/src/trace.cpp
index bcf134058fdf3692050ff4c45ee65aa3d2e4f698..adaf72b4591c06a454c5f6e716c003367ca7da0d 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "trace.h"
 
-using namespace tinn;
+using namespace tidl;
 
 
 #if defined(OA_ENABLE_TRACE)
similarity index 99%
rename from tinn_api/src/trace.h
rename to tidl_api/src/trace.h
index 93b7524ab31149c98a00a9444551dd315cc4da92..bdbcb87a19b8fcfcb820e1a5feec5663e31a9070 100644 (file)
@@ -34,7 +34,7 @@
 #include <cstdio>
 #include <cstdarg>
 
-namespace tinn {
+namespace tidl {
 
 /// Used to emit trace messages from runtime
 class TRACE
similarity index 94%
rename from tinn_api/src/util.cpp
rename to tidl_api/src/util.cpp
index 41b829670c0d4a324cb903d07da457a95b243c72..8683e7eb73d8324cf0c81d354da86a854220803d 100644 (file)
@@ -31,9 +31,9 @@
 #include <fstream>
 #include <assert.h>
 
-using namespace tinn;
+using namespace tidl;
 
-std::size_t tinn::GetBinaryFileSize(const std::string &F)
+std::size_t tidl::GetBinaryFileSize(const std::string &F)
 {
     std::ifstream is;
     is.open (F, std::ios::binary );
@@ -52,7 +52,7 @@ std::size_t tinn::GetBinaryFileSize(const std::string &F)
 }
 
 
-bool tinn::ReadBinary(const std::string &F, char* buffer, int size)
+bool tidl::ReadBinary(const std::string &F, char* buffer, int size)
 {
     std::ifstream is;
     is.open (F, std::ios::binary );
@@ -80,7 +80,7 @@ bool tinn::ReadBinary(const std::string &F, char* buffer, int size)
     return true;
 }
 
-bool tinn::CompareFiles(const std::string &F1, const std::string &F2)
+bool tidl::CompareFiles(const std::string &F1, const std::string &F2)
 {
     std::size_t s1 = GetBinaryFileSize(F1);
     std::size_t s2 = GetBinaryFileSize(F2);
@@ -115,7 +115,7 @@ bool tinn::CompareFiles(const std::string &F1, const std::string &F2)
     return false;
 }
 
-bool tinn::CompareFrames(const std::string &F1, const std::string &F2,
+bool tidl::CompareFrames(const std::string &F1, const std::string &F2,
                          int numFrames, int width, int height)
 {
     bool status = true;
similarity index 98%
rename from tinn_api/src/util.h
rename to tidl_api/src/util.h
index 44316c7f1f53471bcd78384b1a87ba9e2256cccc..10b9ef82cd7fa1911331a5e6001267fdf88ba93d 100644 (file)
@@ -32,7 +32,7 @@
 #include <cstddef>
 #include "configuration.h"
 
-namespace tinn {
+namespace tidl {
 
 std::size_t GetBinaryFileSize (const std::string &F);
 bool        ReadBinary        (const std::string &F, char* buffer, int size);
@@ -40,4 +40,4 @@ bool        CompareFiles      (const std::string &F1, const std::string &F2);
 bool        CompareFrames(const std::string &F1, const std::string &F2,
                          int numFrames, int width, int height);
 
-} // namespace tinn
+} // namespace tidl
similarity index 82%
rename from utils/Makefile
rename to viewer/Makefile
index f36f670cfee4ea40bed33be175d4b47548f139d4..4ea538467e01b763c192c1bcbdbebc13c5a96582 100644 (file)
 
 TARGET ?= arm
 
-EXE = $(TARGET)/netviz
+EXE = $(TARGET)/tidl_viewer
 
-TINN_API_DIR=../tinn_api
-
-include $(TINN_API_DIR)/make.inc
-
-UNAME_M :=$(shell uname -m)
+TIDL_API_DIR=../tidl_api
 
 # -m32 required on x86 to ensure consistent layout of struct sTIDL_Network_t
 ifeq ($(TARGET),x86)
        CXX = g++
        CXXFLAGS = -m32 -static
        LDFLAGS =
+else
+include $(TIDL_API_DIR)/make.inc
 endif
 
 CXXFLAGS += -o3
 #CXXFLAGS += -g -ggdb
 CXXFLAGS += --std=c++11 -Wall -Werror
-CXXFLAGS += -Iinc -I$(TINN_API_DIR)/inc -I$(TINN_API_DIR)/src
-SOURCES = main.cpp src/tinn_utils.cpp src/dot_graph.cpp $(TINN_API_DIR)/src/util.cpp
+CXXFLAGS += -Iinc -I$(TIDL_API_DIR)/inc -I$(TIDL_API_DIR)/src
+SOURCES = main.cpp tidl_viewer.cpp dot_graph.cpp $(TIDL_API_DIR)/src/util.cpp
 
-$(EXE): $(TINN_LIB) $(HEADERS) $(SOURCES)
+$(EXE): $(TIDL_API_LIB) $(HEADERS) $(SOURCES)
        mkdir -p $(TARGET)
-       $(CXX) $(CXXFLAGS) $(SOURCES) $(TINN_LIB) $(LDFLAGS) -o $@
+       $(CXX) $(CXXFLAGS) $(SOURCES) $(TIDL_API_LIB) $(LDFLAGS) -o $@
 
 clean::
-       $(RM) $(EXE) *.dot
+       $(RM) $(EXE) *.dot *.svg
similarity index 100%
rename from utils/src/dot_graph.cpp
rename to viewer/dot_graph.cpp
similarity index 100%
rename from utils/src/dot_graph.h
rename to viewer/dot_graph.h
similarity index 97%
rename from utils/main.cpp
rename to viewer/main.cpp
index 06f556da4b3ac60b483fb14540b824d4d946fc8d..c44e98f7098a3a816a71e9fa0a373ed58d19692f 100644 (file)
@@ -39,9 +39,9 @@
 #include <unistd.h>
 
 
-#include "tinn_utils.h"
+#include "tidl_viewer.h"
 
-using namespace tinn;
+using namespace tidl;
 
 static void ProcessArgs(int argc, char *argv[], std::string& network_file,
                         bool& do_print, std::string& dot_file);
@@ -150,7 +150,7 @@ void ProcessArgs(int argc, char *argv[], std::string& network_file,
 
 void DisplayHelp()
 {
-    std::cout << "Usage: netviz -d <dot file name> <network binary file>\n"
+    std::cout << "Usage: tidl_viewer -d <dot file name> <network binary file>\n"
                  "Options:  \n"
                  " -p              Print network layer info\n"
                  " -h              Display this help message\n";
similarity index 95%
rename from utils/src/tinn_utils.cpp
rename to viewer/tidl_viewer.cpp
index ba5e3178e91c3a6ea47f2df7a1ef1a9a174b1600..1d72f8acdd53cb11dc29cad2874e7d0a503ec571 100644 (file)
  *  THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 #include "util.h"
-#include "tinn_utils.h"
+#include "tidl_viewer.h"
 #include "dot_graph.h"
 
-using namespace tinn::util;
+using namespace tidl::util;
 
-bool tinn::util::PrintNetwork(const std::string& network_binary,
+bool tidl::util::PrintNetwork(const std::string& network_binary,
                               std::ostream& os)
 {
     if (network_binary.empty())
@@ -88,7 +88,7 @@ bool tinn::util::PrintNetwork(const std::string& network_binary,
 }
 
 
-bool tinn::util::GenerateDotGraphForNetwork(const std::string& network_binary,
+bool tidl::util::GenerateDotGraphForNetwork(const std::string& network_binary,
                                             const std::string& dot_file)
 {
     if (network_binary.empty())
similarity index 97%
rename from utils/inc/tinn_utils.h
rename to viewer/tidl_viewer.h
index 8b8a28d858b793c71e8f9e8d8fc328abbf7c75e9..6a6b7e29fd2a8bbb9519e700b6bf6eb03c8113de 100644 (file)
 #include <ostream>
 
 
-namespace tinn { namespace util {
+namespace tidl { namespace util {
 
 bool PrintNetwork(const std::string& network_binary, std::ostream& os = std::cout);
 bool GenerateDotGraphForNetwork(const std::string& network_binary,
                                 const std::string& dot_file);
 
-}} // namespace tinn::util
+}} // namespace tidl::util