renesas-rz / rzv_drp-ai_tvm

Extension package of Apache TVM (Machine Learning Compiler) for Renesas DRP-AI accelerators powered by Edgecortix MERA(TM) Based Apache TVM version: v0.11.1
Apache License 2.0
41 stars 5 forks source link

Docker Image - Cannot Import Tensorflow #10

Open jo-tham opened 1 year ago

jo-tham commented 1 year ago

Hello I built and run the image as described, with small modifications for mac M1 host and V2L target

DRP-AI Translator is v1.82 (https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/drp-ai-translator)

docker build -t drp-ai_tvm_v2ma_image --platform linux/amd64 --build-arg SDK="/opt/poky/3.1.14" --build-arg PRODUCT="V2L" .

docker run -it --platform linux/amd64 --name drp-ai_tvm_v2ma_container -v $(pwd)/data:/drp-ai_tvm/data drp-ai_tvm_v2ma_image

However, there is some issue with tensorflow in the image, e.g.


root@cd50204bcf68:/drp-ai_tvm# python3
Python 3.8.10 (default, Mar 13 2023, 10:26:41) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/descriptor_database.cc:560] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/descriptor.cc:1986] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted

Any suggestion to resolve this?

jo-tham commented 1 year ago

in the meantime, removing tensorflow import in compile_tflite_model.py seems to work, as tf is not used in that module.

simobepu commented 1 year ago

Hello Jotham-san, Our tool works only with Intel-based Linux and it does not support Apple M1-based environments. This problem may be caused by the difference between the Intel and M1 environments, so I'm sorry, but could you try it in intel-based environment?