mirror of
https://gitlab.com/scemama/qp_plugins_scemama.git
synced 2024-12-22 04:13:40 +01:00
memory leak
This commit is contained in:
parent
0c5b6834b1
commit
a08342f60c
@ -290,6 +290,7 @@ void compute_h_vo_chol_gpu(gpu_data* data, int igpu)
|
|||||||
cudaStreamDestroy(stream[i]);
|
cudaStreamDestroy(stream[i]);
|
||||||
}
|
}
|
||||||
cublasSetStream(handle, NULL);
|
cublasSetStream(handle, NULL);
|
||||||
|
cudaFree(d_tmp);
|
||||||
|
|
||||||
alpha = -1.0;
|
alpha = -1.0;
|
||||||
beta = 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;
|
B=d_tmp2; ldb=cholesky_mo_num*nO;
|
||||||
C=d_H_vo; ldc=nV;
|
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);
|
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));
|
double* H_vo = malloc(nV*nO*sizeof(double));
|
||||||
cublasGetMatrix(nV, nO, sizeof(double), d_H_vo, nV, H_vo, nV);
|
cublasGetMatrix(nV, nO, sizeof(double), d_H_vo, nV, H_vo, nV);
|
||||||
|
Loading…
Reference in New Issue
Block a user