Giter Club home page Giter Club logo

Comments (7)

mk-nvidia avatar mk-nvidia commented on July 2, 2024

@Tramac you're missing the onnx library. pip install onnx should install it for you. For more details see https://github.com/onnx/onnx#installation

from code-samples.

Tramac avatar Tramac commented on July 2, 2024

@mk-nvidia Thanks for your reply!
pip list is as follows:

Package           Version
----------------- --------
appdirs           1.4.4
dataclasses       0.8
decorator         5.0.9
graphsurgeon      0.4.1
Mako              1.1.4
MarkupSafe        2.0.1
numpy             1.19.5
onnx              1.9.0
onnx-tensorrt     0.1.0
pip               21.1.2
protobuf          3.17.3
pycuda            2020.1
pytools           2021.2.7
setuptools        57.0.0
six               1.16.0
tensorrt          7.0.0.11
torch             1.4.0
typing-extensions 3.10.0.0
uff               0.6.5
wheel             0.36.2

where the onnx, onnx-tensorrt and tensorrt have been installed successfully.

from code-samples.

harrism avatar harrism commented on July 2, 2024

@mk-nvidia yeah this definitely isn't just a library installation problem. The errors are in one of the files in the present repo, saying onnx is not declared, so I suspect a header has changed between versions.

from code-samples.

Tramac avatar Tramac commented on July 2, 2024

@harrism how can I fix this problem, I have no idea about it.
Looking forward to reply!

from code-samples.

Tramac avatar Tramac commented on July 2, 2024

@harrism The new error:

ioHelper.o: In function `nvinfer1::readTensorProto(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float*)':
ioHelper.cpp:(.text+0x16b): undefined reference to `onnx::TensorProto::TensorProto()'
ioHelper.cpp:(.text+0x184): undefined reference to `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
ioHelper.cpp:(.text+0x27b): undefined reference to `onnx::TensorProto::~TensorProto()'
ioHelper.cpp:(.text+0x2b0): undefined reference to `onnx::TensorProto::~TensorProto()'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: simpleOnnx_1] Error 1

where Makefile as follows:

CXXFLAGS=-std=c++11 -DONNX_ML=1 -Wall -I$(CUDA_INSTALL_DIR)/include -I$(TENSORRT_LIBRARY_DIR)/include
LDFLAGS=-L$(CUDA_INSTALL_DIR)/lib64 -L$(CUDA_INSTALL_DIR)/lib64/stubs -L/usr/local/lib
LDLIBS=-Wl,--start-group -L$(ONNX_TENSORRT_DIR)/build/third_party/onnx -L$(PROTOBUF_DIR) -lnvonnxparser -lnvinfer -lcudart_static -lonnx -lonnx_proto -lprotobuf -lstdc++ -lm -lrt -ldl -lpthread -Wl,--end-group

HEADERS=${wildcard *.h}
TARGET_SRCS=$(wildcard simpleOnnx*.cpp)
TARGET_OBJS=${TARGET_SRCS:.cpp=.o}
TARGETS=${TARGET_OBJS:.o=}

This error is same as #34 , but it hasn't been resolved yet.

from code-samples.

harrism avatar harrism commented on July 2, 2024

@harrism

I don't know, or I would have already told you. :) This is why I asked @mk-nvidia for help.

from code-samples.

Tramac avatar Tramac commented on July 2, 2024

@harrism Thanks for your reply, I will try to change a version. Update again if it is resolved.

from code-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.