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:
Davide Sapienza
2020-02-06 23:09:12 +01:00
parent 70eb5214cc
commit 2503eba173
6 changed files with 34 additions and 15 deletions
+2 -1
View File
@@ -38,7 +38,8 @@ void modulated_deformable_im2col_cuda(cudaStream_t stream,
const int dilation_h, const int dilation_w,
const int deformable_group, float *data_col);
void dcn_v2_cuda_forward(float *input, float *weight,
void dcn_v2_cuda_forward(cublasStatus_t stat, cublasHandle_t handle,
float *input, float *weight,
float *bias, float *ones,
float *offset, float *mask,
float *output, float *columns,