Other Parts Discussed in Thread: TDA4VM
I'm using the attached notebook to try and compile a custom tflite float32 model to run on the TDA4VM. I'm getting this error when I run this notebook on my laptop:
--------------------------------------------------------------------------- MemoryError Traceback (most recent call last) <ipython-input-12-70471db70f90> in <module> 18 [os.rmdir(os.path.join(root, d)) for d in dirs] 19 tidl_delegate = [tflite.load_delegate(os.path.join(os.environ['TIDL_TOOLS_PATH'], 'tidl_model_import_tflite.so'), compile_options)] ---> 20 interpreter = tflite.Interpreter(model_path=fptflite_model_path, experimental_delegates=tidl_delegate) 21 #interpreter = tflite.Interpreter(model_path=fptflite_model_path) 22 #interpreter.allocate_tensors() ~/miniconda3/envs/benchmark/lib/python3.6/site-packages/tflite_runtime/interpreter.py in __init__(self, model_path, model_content, experimental_delegates, num_threads) 244 for delegate in self._delegates: 245 self._interpreter.ModifyGraphWithDelegate( --> 246 delegate._get_native_delegate_pointer()) # pylint: disable=protected-access 247 248 def __del__(self): MemoryError: std::bad_alloc
I get this output in the console:
Warning : concat requires 4D input tensors - only 3 dims present.. Ignore if object detection network
Number of subgraphs:7 , 83 nodes delegated out of 96 nodes
************** Frame index 1 : Running float import *************
WARNING: [TIDL_E_DATAFLOW_INFO_NULL] ti_cnnperfsim.out fails to allocate memory in MSMC. Please look into perfsim log. This model can only be used on PC emulation, it will get fault on target.
****************************************************
** 1 WARNINGS 0 ERRORS **
****************************************************
0.0s: VX_ZONE_INIT:Enabled
0.5s: VX_ZONE_ERROR:Enabled
0.8s: VX_ZONE_WARNING:Enabled
0.775s: VX_ZONE_INIT:[tivxInit:178] Initialization Done !!!
************** Frame index 1 : Running float import *************
WARNING: [TIDL_E_DATAFLOW_INFO_NULL] ti_cnnperfsim.out fails to allocate memory in MSMC. Please look into perfsim log. This model can only be used on PC emulation, it will get fault on target.
****************************************************
** 1 WARNINGS 0 ERRORS **
****************************************************
I've also tried compiling the same model on Edge AI Cloud and when I do, it either gives the same memory error or the kernel dies.