[BLAS - cuBLAS] Fix stream synchronization#228
Merged
mmeterel merged 2 commits intouxlfoundation:developfrom Sep 15, 2022
Merged
[BLAS - cuBLAS] Fix stream synchronization#228mmeterel merged 2 commits intouxlfoundation:developfrom
mmeterel merged 2 commits intouxlfoundation:developfrom
Conversation
mkrainiuk
approved these changes
Sep 15, 2022
Contributor
mkrainiuk
left a comment
There was a problem hiding this comment.
Looks good to me, thank you!
andrewtbarker
approved these changes
Sep 15, 2022
Contributor
andrewtbarker
left a comment
There was a problem hiding this comment.
Thanks for the fix!
| CUBLAS_ERROR_FUNC(cublasGetStream, err, handle, ¤tStreamId); \ | ||
| cuStreamSynchronize(currentStreamId); | ||
|
|
||
| #define CUBLAS_ERROR_FUNC_T(name, func, err, handle, ...) \ |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Right, I thought about it and got lazy. I will update all the cublas backend files with new macro name.
Contributor
Author
There was a problem hiding this comment.
macro name is updated with _SYNC
This was referenced Sep 15, 2022
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?