[CUSOLVER] workaround for issue #216#217
Closed
ericlars wants to merge 1 commit intouxlfoundation:developfrom
Closed
[CUSOLVER] workaround for issue #216#217ericlars wants to merge 1 commit intouxlfoundation:developfrom
ericlars wants to merge 1 commit intouxlfoundation:developfrom
Conversation
JackAKirk
reviewed
Aug 1, 2022
| template <typename H, typename F> | ||
| static inline void onemkl_cusolver_host_task(H &cgh, sycl::queue queue, F f) { | ||
| (void)host_task_internal(cgh, queue, f); | ||
| queue.wait(); //temporary workaround for issue #216 |
Contributor
There was a problem hiding this comment.
Unfortunately this does not work because it is actually syncing the queue before the command group associated with this onemkl_cusolver_host_task is submitted: The result is that I find this does not solve #216
Contributor
There was a problem hiding this comment.
Interestingly I find that replacing queue.wait() with a change to host_task_internal:
static inline void host_task_internal(H &cgh, sycl::queue queue, F f) {
cgh.interop_task([f, queue](sycl::interop_handler ih) {
auto sc = CusolverScopedContextHandler(queue, ih);
f(sc);
auto handle = sc.get_handle(queue);
cusolverStatus_t err;
cudaStream_t currentStreamId;
CUSOLVER_ERROR_FUNC(cusolverDnGetStream, err, handle, ¤tStreamId);
cuStreamSynchronize(currentStreamId);
});
}
is also not solving #216. It seems that you have to either call cuStreamSynchronize from within the user facing onemkl_cusolver_host_task or call queue.wait() after the command group is submitted.
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.
RE: #215