volksdep icon indicating copy to clipboard operation
volksdep copied to clipboard

AttributeError: 'NoneType' object has no attribute 'create_execution_context'

Open vicTorKd opened this issue 3 years ago • 0 comments

Failed to convert my pytorch model to trt module using torch2trt. Maybe something wrong with the step that builder.build_engine(). My enviroment information is CUDA11.4, TensorRT8,2. Could you please help me with this problem?

File "/usr/anaconda3/envs/pytorch/lib/python3.8/site-packages/volksdep/converters/base.py", line 50, in init self.context = self.engine.create_execution_context() AttributeError: 'NoneType' object has no attribute 'create_execution_context' [01/18/2022-16:53:01] [TRT] [E] [layers.h::setPostPadding::667] Error Code 3: API Usage Error (Parameter check failed at: /_src/build/cuda-11.4/8.2/x86_64/release/optimizer/api/layers.h::setPostPadding::667, condition: ((postPadding.nbDims == 2 || postPadding.nbDims == 3) && allDimsGtEq(postPadding, 0) && allDimsLtEq(postPadding, MAX_PADDING)) ) In node 53 (parseGraph): INVALID_NODE: Invalid Node - ConvTranspose_53 [layers.h::setPostPadding::667] Error Code 3: API Usage Error (Parameter check failed at: /_src/build/cuda-11.4/8.2/x86_64/release/optimizer/api/layers.h::setPostPadding::667, condition: ((postPadding.nbDims == 2 || postPadding.nbDims == 3) && allDimsGtEq(postPadding, 0) && allDimsLtEq(postPadding, MAX_PADDING)) ) [01/18/2022-16:53:01] [TRT] [E] 4: [network.cpp::validate::2633] Error Code 4: Internal Error (Network must have at least one output)

Process finished with exit code 1

vicTorKd avatar Jan 18 '22 09:01 vicTorKd