Skip to content

Commit b2a832b

Browse files
author
Wish
committed
udpate
1 parent 3b54d1c commit b2a832b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/tensorRT/onnxplugin/plugins/DCNv2.cu

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,11 @@ public:
337337
cublasHandle_t cublasHandle_ = nullptr;
338338
SetupPlugin(DCNv2);
339339

340-
int initialize() noexcept{
341-
cublasCheck(cublasCreate(&cublasHandle_));
342-
return 0;
340+
virtual void attachToContext(cudnnContext* /*cudnn*/, cublasContext* cublas, nvinfer1::IGpuAllocator* /*allocator*/) noexcept override{
341+
cublasHandle_ = cublas;
343342
}
344343

345-
void terminate() noexcept{
346-
cublasCheck(cublasDestroy(cublasHandle_));
344+
virtual void detachFromContext() noexcept override{
347345
cublasHandle_ = nullptr;
348346
}
349347

0 commit comments

Comments
 (0)