Fix memory leak
This commit moves cublasCreate out from dcn_v2_cuda_forward to save some milliseconds and it adds cublasDestroy (cause of memory leak). Signed-off-by: Davide Sapienza <sapienza.dav@gmail.com>
This commit is contained in:
+1
-1
@@ -453,7 +453,7 @@ ILayer* NetworkRT::convert_layer(ITensor *input, DeformConv2d *l) {
|
||||
IPluginLayer *lRT = networkRT->addPlugin(inputs, 2, *plugin);
|
||||
checkNULL(lRT);
|
||||
lRT->setName( ("Deformable" + std::to_string(l->id)).c_str() );
|
||||
|
||||
delete(inputs);
|
||||
// batchnorm
|
||||
void *bias_b, *power_b, *mean_b, *variance_b, *scales_b;
|
||||
if(dtRT == DataType::kHALF) {
|
||||
|
||||
Reference in New Issue
Block a user