Report memory usage when device allocation fails
authorAjay Jayaraj <ajayj@ti.com>
Fri, 17 Aug 2018 20:14:15 +0000 (15:14 -0500)
committerAjay Jayaraj <ajayj@ti.com>
Tue, 21 Aug 2018 18:32:28 +0000 (13:32 -0500)
commit1b809f0e67c15437d492c5261d654206d6407167
tree1002d079212738db3ea252b34323c16176a6933a
parent1a42784dc57d81735218ec2dc85172a1ed4e8181
Report memory usage when device allocation fails

TIDL API creates 2 device side heaps:
1. Parameter heap
2. Network heap

The sizes of these heaps are specified in the Configuration object, via
PARAM_HEAP_SIZE and NETWORK_HEAP_SIZE.

Existing behavior: If the heaps are not large enough, allocation on the
device triggers an assertion failure with no indication of how large the
heaps need to be for successfull allocation.

To improve the usability of the API, provide feedback to the user on the
heap sizes required to satisfy device side allocations when any
allocation fails.

Also added `-Wall -Werror` when building examples and fixed failures.

(MCT-1035)
19 files changed:
docs/source/api.rst
docs/source/faq/out_of_memory.rst
docs/source/using_api.rst
examples/classification/main.cpp
examples/classification/multiple_executors.cpp
examples/make.common
examples/segmentation/main.cpp
examples/segmentation/object_classes.cpp
examples/ssd_multibox/main.cpp
examples/test/main.cpp
examples/test/multiple_executors.cpp
tidl_api/inc/configuration.h
tidl_api/inc/execution_object.h
tidl_api/src/configuration.cpp
tidl_api/src/execution_object.cpp
tidl_api/src/executor.cpp
tidl_api/src/ocl_device.cpp
tidl_api/src/trace.cpp
tidl_api/src/trace.h