diff options
-rw-r--r-- | nerv/lib/matrix/cumatrix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nerv/lib/matrix/cumatrix.c b/nerv/lib/matrix/cumatrix.c index 533dade..ea7a518 100644 --- a/nerv/lib/matrix/cumatrix.c +++ b/nerv/lib/matrix/cumatrix.c @@ -11,6 +11,8 @@ void nerv_cumatrix_select_gpu(int dev, Status *status) { fprintf(stderr, "** selecting GPU %d\n", dev); NERV_SET_STATUS(status, NERV_NORMAL, 0); CUDA_SAFE_SYNC_CALL(cudaSetDevice(dev), status); + CUDA_SAFE_SYNC_CALL(cublasDestroy(cublas_handle), status); + CUDA_SAFE_SYNC_CALL(cublasCreate(&cublas_handle), status); } void nerv_cumatrix_print_profile() { |