TrojanXu / onnxparser-trt-plugin-sample

A sample for onnxparser working with trt user defined plugins for TRT7.0
Apache License 2.0
166 stars 36 forks source link

Cuda Runtime (an illegal memory access was encountered) #18

Open sandeepnmenon opened 1 year ago

sandeepnmenon commented 1 year ago

I build the TRT plugin using a makefile and used that in the trtexec to compile my onnx model which has F.grid_sample

While trying to execute it in the engine I get the error

1: [executionContext.cpp::executeInternal::667] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [defaultAllocator.cpp::deallocate::42] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaStream::47] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
1: [cudaResources.cpp::~ScopedCudaEvent::24] Error Code 1: Cuda Runtime (an illegal memory access was encountered)

I printed the inputs and there are

mBatch: 1
mInputChannel: 512
mInputHeight: 128
mInputWidth: 128
mGridHeight: 200
mGridWidth: 200
mInterpolationMode: Bilinear
mPaddingMode: Zeros
mAlignCorners: 0
dataType: half

How can I debug this issue?