memory leak

This commit is contained in:
Anthony Scemama 2023-12-05 18:28:26 +01:00
parent 0c5b6834b1
commit a08342f60c
1 changed files with 2 additions and 0 deletions

View File

@ -290,6 +290,7 @@ void compute_h_vo_chol_gpu(gpu_data* data, int igpu)
cudaStreamDestroy(stream[i]);
}
cublasSetStream(handle, NULL);
cudaFree(d_tmp);
alpha = -1.0;
beta = 1.0;
@ -298,6 +299,7 @@ void compute_h_vo_chol_gpu(gpu_data* data, int igpu)
B=d_tmp2; ldb=cholesky_mo_num*nO;
C=d_H_vo; ldc=nV;
cublasDgemm(handle, CUBLAS_OP_T, CUBLAS_OP_N, m, n, k, &alpha, A, lda, B, ldb, &beta, C, ldc);
cudaFree(d_tmp2);
double* H_vo = malloc(nV*nO*sizeof(double));
cublasGetMatrix(nV, nO, sizeof(double), d_H_vo, nV, H_vo, nV);