Generate the ONNX protobuf source files

The ONNX protobuf source files are required for the Arm NN ONNX parser. Generate these source files based on the ONNX message formats defined in the onnx.proto library. Use the instructions in the ONNX GitHub:

$ export ONNX_ML=1 #To clone ONNX with its ML extension
$ git clone --recursive
$ unset ONNX_ML
$ cd onnx
$ export LD_LIBRARY_PATH=$BASEDIR/protobuf-host/lib:$LD_LIBRARY_PATH
$ $BASEDIR/protobuf-host/bin/protoc onnx/onnx.proto --proto_path=. --proto_path=$BASEDIR/protobuf-host/include --cpp_out $BASEDIR/onnx

The ONNX protobuf source files and onnx.pb.h are generated in the $BASEDIR/onnx directory ready for the Arm NN build.

Previous Next