-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BLAS - cuBLAS] Fix stream synchronization #228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
CUBLAS_ERROR_FUNC(cublasGetStream, err, handle, ¤tStreamId); \ | ||
cuStreamSynchronize(currentStreamId); | ||
|
||
#define CUBLAS_ERROR_FUNC_T(name, func, err, handle, ...) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that important, but I suggest CUBLAS_ERROR_FUNC_T_SYNC
here (since it's synchronizing), I think it's more consistent with what we had before and what we did in #215.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I thought about it and got lazy. I will update all the cublas backend files with new macro name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macro name is updated with _SYNC
Description
With recent LLVM builds, multiple streams (instead of single CUstream) are enabled in each queue - which basically broke the in-order property of the queue. see here
As a result, we no longer had synchronization in cuBLAS streams. This PR is adding synchronization for cuBLAS backend.
Similar fix was implemented for cuSolver in #215
Fixes # (GitHub issue)
#223
Checklist
All Submissions
Do all unit tests pass locally?
fix_cublas_sync.log
Have you formatted the code using clang-format?