TNN
TNN copied to clipboard
ONNX转TNN模型的出现问题
./build.sh: line 31: die: command not found /public/home/liucong8560/MIGraphx/TNN-master/tools/onnx2tnn/onnx-converter -- The C compiler identification is GNU 7.3.1 -- The CXX compiler identification is GNU 7.3.1 -- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is GNU -- Found assembler: /opt/rh/devtoolset-7/root/usr/bin/cc /public/home/liucong8560/MIGraphx/TNN-master /public/home/liucong8560/MIGraphx/TNN-master -- >>>>>>>>>>>>> -- TNN BUILD INFO: -- System: Linux -- Processor: x86_64 -- Cpu: ON -- X86: OFF -- Arm: OFF -- Arm82: OFF -- Metal: OFF -- OpenCL: OFF -- CUDA: OFF -- DSP: OFF -- Atlas: OFF -- TensorRT: OFF -- AppleNPU: OFF -- HuaweiNPU: OFF -- RKNPU: OFF -- Jetson Nano: OFF -- OpenVINO: OFF -- OpenMP: OFF -- TEST: OFF -- --Unit Test: OFF -- Quantization: OFF -- ModelCheck: OFF -- DEBUG: ON -- PROFILE: OFF -- BENCHMARK: OFF -- BENCHMARK Layer: OFF -- Model Converter: OFF -- ONNX2TNN Converter: ON -- TNN2MEM: OFF -- BENCHMARK Test Lib: OFF -- Dynamic Range Quantization: OFF -- SHARING_MEM_WITH_OPENGL: CMake Error at /opt/cmake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR) Call Stack (most recent call first): /opt/cmake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) /opt/cmake/share/cmake-3.16/Modules/FindProtobuf.cmake:624 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) tools/onnx2tnn/onnx-converter/CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred! See also "/public/home/liucong8560/MIGraphx/TNN-master/tools/onnx2tnn/onnx-converter/build/CMakeFiles/CMakeOutput.log". See also "/public/home/liucong8560/MIGraphx/TNN-master/tools/onnx2tnn/onnx-converter/build/CMakeFiles/CMakeError.log". make: *** No targets specified and no makefile found. Stop. ls: cannot access tools/onnx2tnn/onnx-converter/onnx2tnn*.so: No such file or directory /public/home/liucong8560/MIGraphx/TNN-master/tools/onnx2tnn/onnx-converter/build cp: missing destination file operand after ‘../../onnx-converter’ Try 'cp --help' for more information. Compiled onnx2tnn successfully !
显示已经编译成功,但是在转换模型的时候,提示没有编译!
python onnx2tnn.py ./vit_base.onnx -version=v1.0 -optimize=1 -half=0 -o ./ -input_shape input:1,3,224,224
You should compile onnx2tnn first !!!
You can find more compilation details in
错误信息显示你没装protobuf,你根据文档按照下,https://github.com/Tencent/TNN/blob/master/doc/cn/user/onnx2tnn.md