Skip to content

Commit 342016c

Browse files
authored
Merge pull request #518 from notoraptor/fix-sger
Try to fix theano error related to sgerBatch.
2 parents c038be9 + ca8613b commit 342016c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/gpuarray_blas_cuda_cublas.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,9 +1636,9 @@ static int sgerBatch(cb_order order, size_t M, size_t N, float alpha,
16361636

16371637

16381638
for (i = 0; i < batchCount; i++) {
1639-
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(A[i], CUDA_WAIT_READ));
1639+
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(A[i], CUDA_WAIT_ALL));
16401640
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(x[i], CUDA_WAIT_READ));
1641-
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(y[i], CUDA_WAIT_ALL));
1641+
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(y[i], CUDA_WAIT_READ));
16421642
}
16431643

16441644
cuda_exit(ctx);
@@ -1766,9 +1766,9 @@ static int dgerBatch(cb_order order, size_t M, size_t N, double alpha,
17661766
}
17671767

17681768
for (i = 0; i < batchCount; i++) {
1769-
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(A[i], CUDA_WAIT_READ));
1769+
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(A[i], CUDA_WAIT_ALL));
17701770
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(x[i], CUDA_WAIT_READ));
1771-
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(y[i], CUDA_WAIT_ALL));
1771+
GA_CUDA_EXIT_ON_ERROR(ctx, cuda_record(y[i], CUDA_WAIT_READ));
17721772
}
17731773

17741774
cuda_exit(ctx);

0 commit comments

Comments
 (0)