Closed tsaizhenling closed 4 years ago
This is an odd issue, my best guess at a solution is make sure you are including torch/torch.h
and before trtorch.h
(there is a fix for the ordering issue coming) since they aren't included for you in the header.
I am able to compile and run the PTQ application in the repo outside of the source tree with the following Makefile using binaries from the tarball
CXX=g++
ROOT=<PATH TO SOURCE>
TORCH_PATH=<PATH TO TORCH>
INCLUDE_DIRS= -I/usr/local/cuda/include -I$(TORCH_PATH)/include -I$(TORCH_PATH)/include/torch/csrc/api/include -I$(ROOT)/trtorch/include -I$(ROOT)/datasets -I$(ROOT)/benchmark
LIB_DIRS=-L$(ROOT)/trtorch/lib -L$(TORCH_PATH)/lib -L/usr/local/cuda/lib64
LIBS=-ltrtorch -ltorch -ltorch_global_deps -lc10 -lc10_cuda -ltorch_cpu -ltorch_cuda -lcudart
SRCS=main.cpp datasets/cifar10.cpp benchmark/benchmark.cpp
ptq:
$(CXX) $(SRCS) $(INCLUDE_DIRS) $(LIB_DIRS) $(LIBS) -pthread
This issue has not seen activity for 30 days, Remove stale label or comment or this will be closed in 5 days
I am building an application with TRTorch precompiled binaries, and I am able to compile full precision and half precision graphs successfully.
I run into build errors while trying to compile the int8 graph as long as I include this line
the build error
CMakeLists.txt