From fca106efb6d808d832f26caefa5018076a2319da Mon Sep 17 00:00:00 2001 From: Ajay Jayaraj Date: Mon, 14 May 2018 12:57:24 -0500 Subject: [PATCH] Rename to TIDL * 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) --- docs/Makefile | 2 +- docs/make.bat | 263 ------------------ docs/source/api.rst | 2 +- docs/source/conf.py | 2 +- docs/source/using_api.rst | 6 +- examples/imagenet/Makefile | 4 +- examples/imagenet/main.cpp | 6 +- examples/make.common | 30 +- examples/segmentation/Makefile | 4 +- examples/segmentation/main.cpp | 4 +- examples/ssd_multibox/Makefile | 4 +- examples/ssd_multibox/main.cpp | 4 +- examples/test/Makefile | 6 +- examples/test/main.cpp | 10 +- examples/test/multiple_executors.cpp | 4 +- readme.md | 6 +- {tinn_api => tidl_api}/Makefile | 4 +- {tinn_api => tidl_api}/doxygen/Doxyfile | 0 {tinn_api => tidl_api}/doxygen/ti-logo.png | Bin {tinn_api => tidl_api}/doxygen/ticustom.css | 0 {tinn_api => tidl_api}/doxygen/tifooter.html | 0 {tinn_api => tidl_api}/doxygen/tiheader.html | 0 {tinn_api => tidl_api}/dsp/Makefile | 0 {tinn_api => tidl_api}/dsp/ocl_wrapper.cl | 0 {tinn_api => tidl_api}/inc/configuration.h | 2 +- {tinn_api => tidl_api}/inc/execution_object.h | 4 +- {tinn_api => tidl_api}/inc/executor.h | 8 +- {tinn_api => tidl_api}/inc/imgutil.h | 6 +- {tinn_api => tidl_api}/make.inc | 0 {tinn_api => tidl_api}/src/common_defines.h | 0 {tinn_api => tidl_api}/src/configuration.cpp | 2 +- .../src/configuration_parser.cpp | 2 +- .../src/execution_object.cpp | 10 +- {tinn_api => tidl_api}/src/executor.cpp | 14 +- {tinn_api => tidl_api}/src/executor_impl.h | 4 +- {tinn_api => tidl_api}/src/imgutil.cpp | 4 +- {tinn_api => tidl_api}/src/ocl_device.cpp | 2 +- {tinn_api => tidl_api}/src/ocl_device.h | 2 +- {tinn_api => tidl_api}/src/parameters.h | 2 +- .../src/tidl_create_params.h | 0 {tinn_api => tidl_api}/src/trace.cpp | 2 +- {tinn_api => tidl_api}/src/trace.h | 2 +- {tinn_api => tidl_api}/src/util.cpp | 10 +- {tinn_api => tidl_api}/src/util.h | 4 +- {utils => viewer}/Makefile | 20 +- {utils/src => viewer}/dot_graph.cpp | 0 {utils/src => viewer}/dot_graph.h | 0 {utils => viewer}/main.cpp | 6 +- .../tinn_utils.cpp => viewer/tidl_viewer.cpp | 8 +- .../inc/tinn_utils.h => viewer/tidl_viewer.h | 4 +- 50 files changed, 108 insertions(+), 371 deletions(-) delete mode 100644 docs/make.bat rename {tinn_api => tidl_api}/Makefile (98%) rename {tinn_api => tidl_api}/doxygen/Doxyfile (100%) rename {tinn_api => tidl_api}/doxygen/ti-logo.png (100%) rename {tinn_api => tidl_api}/doxygen/ticustom.css (100%) rename {tinn_api => tidl_api}/doxygen/tifooter.html (100%) rename {tinn_api => tidl_api}/doxygen/tiheader.html (100%) rename {tinn_api => tidl_api}/dsp/Makefile (100%) rename {tinn_api => tidl_api}/dsp/ocl_wrapper.cl (100%) rename {tinn_api => tidl_api}/inc/configuration.h (99%) rename {tinn_api => tidl_api}/inc/execution_object.h (99%) rename {tinn_api => tidl_api}/inc/executor.h (98%) rename {tinn_api => tidl_api}/inc/imgutil.h (97%) rename {tinn_api => tidl_api}/make.inc (100%) rename {tinn_api => tidl_api}/src/common_defines.h (100%) rename {tinn_api => tidl_api}/src/configuration.cpp (99%) rename {tinn_api => tidl_api}/src/configuration_parser.cpp (99%) rename {tinn_api => tidl_api}/src/execution_object.cpp (98%) rename {tinn_api => tidl_api}/src/executor.cpp (95%) rename {tinn_api => tidl_api}/src/executor_impl.h (98%) rename {tinn_api => tidl_api}/src/imgutil.cpp (99%) rename {tinn_api => tidl_api}/src/ocl_device.cpp (99%) rename {tinn_api => tidl_api}/src/ocl_device.h (99%) rename {tinn_api => tidl_api}/src/parameters.h (99%) rename {tinn_api => tidl_api}/src/tidl_create_params.h (100%) rename {tinn_api => tidl_api}/src/trace.cpp (98%) rename {tinn_api => tidl_api}/src/trace.h (99%) rename {tinn_api => tidl_api}/src/util.cpp (94%) rename {tinn_api => tidl_api}/src/util.h (98%) rename {utils => viewer}/Makefile (82%) rename {utils/src => viewer}/dot_graph.cpp (100%) rename {utils/src => viewer}/dot_graph.h (100%) rename {utils => viewer}/main.cpp (97%) rename utils/src/tinn_utils.cpp => viewer/tidl_viewer.cpp (95%) rename utils/inc/tinn_utils.h => viewer/tidl_viewer.h (97%) diff --git a/docs/Makefile b/docs/Makefile index 028b747..523b431 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 index dc7d5a2..0000000 --- a/docs/make.bat +++ /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 ^` where ^ 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 diff --git a/docs/source/api.rst b/docs/source/api.rst index d272027..c692b05 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -2,7 +2,7 @@ TIDL API Reference ****************** -.. doxygennamespace:: tinn +.. doxygennamespace:: tidl :project: TIDL :members: diff --git a/docs/source/conf.py b/docs/source/conf.py index ab901cf..c790755 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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/", } diff --git a/docs/source/using_api.rst b/docs/source/using_api.rst index 8f85f5c..c4387e9 100644 --- a/docs/source/using_api.rst +++ b/docs/source/using_api.rst @@ -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. diff --git a/examples/imagenet/Makefile b/examples/imagenet/Makefile index 7359e20..ed66fa1 100644 --- a/examples/imagenet/Makefile +++ b/examples/imagenet/Makefile @@ -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 $@ diff --git a/examples/imagenet/main.cpp b/examples/imagenet/main.cpp index d7decc6..744fb85 100644 --- a/examples/imagenet/main.cpp +++ b/examples/imagenet/main.cpp @@ -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; diff --git a/examples/make.common b/examples/make.common index 88aec56..07ae3da 100644 --- a/examples/make.common +++ b/examples/make.common @@ -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 diff --git a/examples/segmentation/Makefile b/examples/segmentation/Makefile index 972c59e..c5806d9 100644 --- a/examples/segmentation/Makefile +++ b/examples/segmentation/Makefile @@ -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:: diff --git a/examples/segmentation/main.cpp b/examples/segmentation/main.cpp index 67b712c..786d6ee 100644 --- a/examples/segmentation/main.cpp +++ b/examples/segmentation/main.cpp @@ -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; diff --git a/examples/ssd_multibox/Makefile b/examples/ssd_multibox/Makefile index c3f82dc..0a331dc 100644 --- a/examples/ssd_multibox/Makefile +++ b/examples/ssd_multibox/Makefile @@ -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:: diff --git a/examples/ssd_multibox/main.cpp b/examples/ssd_multibox/main.cpp index a44f8cd..7fa3b23 100644 --- a/examples/ssd_multibox/main.cpp +++ b/examples/ssd_multibox/main.cpp @@ -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; diff --git a/examples/test/Makefile b/examples/test/Makefile index 49f4f41..0181e2b 100644 --- a/examples/test/Makefile +++ b/examples/test/Makefile @@ -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 $@ diff --git a/examples/test/main.cpp b/examples/test/main.cpp index 2233dad..a9a35c4 100644 --- a/examples/test/main.cpp +++ b/examples/test/main.cpp @@ -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" diff --git a/examples/test/multiple_executors.cpp b/examples/test/multiple_executors.cpp index 69c97ce..173ee23 100644 --- a/examples/test/multiple_executors.cpp +++ b/examples/test/multiple_executors.cpp @@ -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; diff --git a/readme.md b/readme.md index ccc4f6f..295a61b 100644 --- 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. diff --git a/tinn_api/Makefile b/tidl_api/Makefile similarity index 98% rename from tinn_api/Makefile rename to tidl_api/Makefile index 6c7db05..73a67f7 100644 --- a/tinn_api/Makefile +++ b/tidl_api/Makefile @@ -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) diff --git a/tinn_api/doxygen/Doxyfile b/tidl_api/doxygen/Doxyfile similarity index 100% rename from tinn_api/doxygen/Doxyfile rename to tidl_api/doxygen/Doxyfile diff --git a/tinn_api/doxygen/ti-logo.png b/tidl_api/doxygen/ti-logo.png similarity index 100% rename from tinn_api/doxygen/ti-logo.png rename to tidl_api/doxygen/ti-logo.png diff --git a/tinn_api/doxygen/ticustom.css b/tidl_api/doxygen/ticustom.css similarity index 100% rename from tinn_api/doxygen/ticustom.css rename to tidl_api/doxygen/ticustom.css diff --git a/tinn_api/doxygen/tifooter.html b/tidl_api/doxygen/tifooter.html similarity index 100% rename from tinn_api/doxygen/tifooter.html rename to tidl_api/doxygen/tifooter.html diff --git a/tinn_api/doxygen/tiheader.html b/tidl_api/doxygen/tiheader.html similarity index 100% rename from tinn_api/doxygen/tiheader.html rename to tidl_api/doxygen/tiheader.html diff --git a/tinn_api/dsp/Makefile b/tidl_api/dsp/Makefile similarity index 100% rename from tinn_api/dsp/Makefile rename to tidl_api/dsp/Makefile diff --git a/tinn_api/dsp/ocl_wrapper.cl b/tidl_api/dsp/ocl_wrapper.cl similarity index 100% rename from tinn_api/dsp/ocl_wrapper.cl rename to tidl_api/dsp/ocl_wrapper.cl diff --git a/tinn_api/inc/configuration.h b/tidl_api/inc/configuration.h similarity index 99% rename from tinn_api/inc/configuration.h rename to tidl_api/inc/configuration.h index 088a629..b42d665 100644 --- a/tinn_api/inc/configuration.h +++ b/tidl_api/inc/configuration.h @@ -33,7 +33,7 @@ #include #include -namespace tinn { +namespace tidl { /*! @class Configuration @brief Specifies the configuration required for a network diff --git a/tinn_api/inc/execution_object.h b/tidl_api/inc/execution_object.h similarity index 99% rename from tinn_api/inc/execution_object.h rename to tidl_api/inc/execution_object.h index c334ac9..98b542a 100644 --- a/tinn_api/inc/execution_object.h +++ b/tidl_api/inc/execution_object.h @@ -32,7 +32,7 @@ #include -namespace tinn { +namespace tidl { class Kernel; class Device; @@ -115,4 +115,4 @@ class ExecutionObject std::unique_ptr pimpl_m; }; -} // namespace tinn +} // namespace tidl diff --git a/tinn_api/inc/executor.h b/tidl_api/inc/executor.h similarity index 98% rename from tinn_api/inc/executor.h rename to tidl_api/inc/executor.h index 05e9cc0..2594d08 100644 --- a/tinn_api/inc/executor.h +++ b/tidl_api/inc/executor.h @@ -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 diff --git a/tinn_api/inc/imgutil.h b/tidl_api/inc/imgutil.h similarity index 97% rename from tinn_api/inc/imgutil.h rename to tidl_api/inc/imgutil.h index 76648f8..e052548 100644 --- a/tinn_api/inc/imgutil.h +++ b/tidl_api/inc/imgutil.h @@ -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 diff --git a/tinn_api/make.inc b/tidl_api/make.inc similarity index 100% rename from tinn_api/make.inc rename to tidl_api/make.inc diff --git a/tinn_api/src/common_defines.h b/tidl_api/src/common_defines.h similarity index 100% rename from tinn_api/src/common_defines.h rename to tidl_api/src/common_defines.h diff --git a/tinn_api/src/configuration.cpp b/tidl_api/src/configuration.cpp similarity index 99% rename from tinn_api/src/configuration.cpp rename to tidl_api/src/configuration.cpp index 70fd136..202ac43 100644 --- a/tinn_api/src/configuration.cpp +++ b/tidl_api/src/configuration.cpp @@ -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), diff --git a/tinn_api/src/configuration_parser.cpp b/tidl_api/src/configuration_parser.cpp similarity index 99% rename from tinn_api/src/configuration_parser.cpp rename to tidl_api/src/configuration_parser.cpp index e246f4d..c58d8f5 100644 --- a/tinn_api/src/configuration_parser.cpp +++ b/tidl_api/src/configuration_parser.cpp @@ -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 struct ConfigParser : qi::grammar diff --git a/tinn_api/src/execution_object.cpp b/tidl_api/src/execution_object.cpp similarity index 98% rename from tinn_api/src/execution_object.cpp rename to tidl_api/src/execution_object.cpp index dbdb902..29b75c4 100644 --- a/tinn_api/src/execution_object.cpp +++ b/tidl_api/src/execution_object.cpp @@ -37,7 +37,7 @@ #include "common_defines.h" #include -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()); 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; diff --git a/tinn_api/src/executor.cpp b/tidl_api/src/executor.cpp similarity index 95% rename from tinn_api/src/executor.cpp rename to tidl_api/src/executor.cpp index e16f6d0..9d2d925 100644 --- a/tinn_api/src/executor.cpp +++ b/tidl_api/src/executor.cpp @@ -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; } diff --git a/tinn_api/src/executor_impl.h b/tidl_api/src/executor_impl.h similarity index 98% rename from tinn_api/src/executor_impl.h rename to tidl_api/src/executor_impl.h index 704b1f7..d60e498 100644 --- a/tinn_api/src/executor_impl.h +++ b/tidl_api/src/executor_impl.h @@ -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 diff --git a/tinn_api/src/imgutil.cpp b/tidl_api/src/imgutil.cpp similarity index 99% rename from tinn_api/src/imgutil.cpp rename to tidl_api/src/imgutil.cpp index 668080c..3336ad2 100644 --- a/tinn_api/src/imgutil.cpp +++ b/tidl_api/src/imgutil.cpp @@ -29,9 +29,9 @@ #include #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) diff --git a/tinn_api/src/ocl_device.cpp b/tidl_api/src/ocl_device.cpp similarity index 99% rename from tinn_api/src/ocl_device.cpp rename to tidl_api/src/ocl_device.cpp index df4b354..f539503 100644 --- a/tinn_api/src/ocl_device.cpp +++ b/tidl_api/src/ocl_device.cpp @@ -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); diff --git a/tinn_api/src/ocl_device.h b/tidl_api/src/ocl_device.h similarity index 99% rename from tinn_api/src/ocl_device.h rename to tidl_api/src/ocl_device.h index 1f92fce..7967814 100644 --- a/tinn_api/src/ocl_device.h +++ b/tidl_api/src/ocl_device.h @@ -39,7 +39,7 @@ #include #include "executor.h" -namespace tinn +namespace tidl { typedef std::vector KernelArgs; diff --git a/tinn_api/src/parameters.h b/tidl_api/src/parameters.h similarity index 99% rename from tinn_api/src/parameters.h rename to tidl_api/src/parameters.h index ebd7181..121625a 100644 --- a/tinn_api/src/parameters.h +++ b/tidl_api/src/parameters.h @@ -28,7 +28,7 @@ #pragma once -namespace tinn { +namespace tidl { namespace internal { const size_t DMEM0_SIZE = 8*1024; diff --git a/tinn_api/src/tidl_create_params.h b/tidl_api/src/tidl_create_params.h similarity index 100% rename from tinn_api/src/tidl_create_params.h rename to tidl_api/src/tidl_create_params.h diff --git a/tinn_api/src/trace.cpp b/tidl_api/src/trace.cpp similarity index 98% rename from tinn_api/src/trace.cpp rename to tidl_api/src/trace.cpp index bcf1340..adaf72b 100644 --- a/tinn_api/src/trace.cpp +++ b/tidl_api/src/trace.cpp @@ -29,7 +29,7 @@ #include "trace.h" -using namespace tinn; +using namespace tidl; #if defined(OA_ENABLE_TRACE) diff --git a/tinn_api/src/trace.h b/tidl_api/src/trace.h similarity index 99% rename from tinn_api/src/trace.h rename to tidl_api/src/trace.h index 93b7524..bdbcb87 100644 --- a/tinn_api/src/trace.h +++ b/tidl_api/src/trace.h @@ -34,7 +34,7 @@ #include #include -namespace tinn { +namespace tidl { /// Used to emit trace messages from runtime class TRACE diff --git a/tinn_api/src/util.cpp b/tidl_api/src/util.cpp similarity index 94% rename from tinn_api/src/util.cpp rename to tidl_api/src/util.cpp index 41b8296..8683e7e 100644 --- a/tinn_api/src/util.cpp +++ b/tidl_api/src/util.cpp @@ -31,9 +31,9 @@ #include #include -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; diff --git a/tinn_api/src/util.h b/tidl_api/src/util.h similarity index 98% rename from tinn_api/src/util.h rename to tidl_api/src/util.h index 44316c7..10b9ef8 100644 --- a/tinn_api/src/util.h +++ b/tidl_api/src/util.h @@ -32,7 +32,7 @@ #include #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 diff --git a/utils/Makefile b/viewer/Makefile similarity index 82% rename from utils/Makefile rename to viewer/Makefile index f36f670..4ea5384 100644 --- a/utils/Makefile +++ b/viewer/Makefile @@ -26,30 +26,28 @@ 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 diff --git a/utils/src/dot_graph.cpp b/viewer/dot_graph.cpp similarity index 100% rename from utils/src/dot_graph.cpp rename to viewer/dot_graph.cpp diff --git a/utils/src/dot_graph.h b/viewer/dot_graph.h similarity index 100% rename from utils/src/dot_graph.h rename to viewer/dot_graph.h diff --git a/utils/main.cpp b/viewer/main.cpp similarity index 97% rename from utils/main.cpp rename to viewer/main.cpp index 06f556d..c44e98f 100644 --- a/utils/main.cpp +++ b/viewer/main.cpp @@ -39,9 +39,9 @@ #include -#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 \n" + std::cout << "Usage: tidl_viewer -d \n" "Options: \n" " -p Print network layer info\n" " -h Display this help message\n"; diff --git a/utils/src/tinn_utils.cpp b/viewer/tidl_viewer.cpp similarity index 95% rename from utils/src/tinn_utils.cpp rename to viewer/tidl_viewer.cpp index ba5e317..1d72f8a 100644 --- a/utils/src/tinn_utils.cpp +++ b/viewer/tidl_viewer.cpp @@ -26,12 +26,12 @@ * 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()) diff --git a/utils/inc/tinn_utils.h b/viewer/tidl_viewer.h similarity index 97% rename from utils/inc/tinn_utils.h rename to viewer/tidl_viewer.h index 8b8a28d..6a6b7e2 100644 --- a/utils/inc/tinn_utils.h +++ b/viewer/tidl_viewer.h @@ -33,10 +33,10 @@ #include -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 -- 2.39.2