Move lapack_info_check inside of onemkl_cusolver_host_task#238
Open
JackAKirk wants to merge 12 commits intouxlfoundation:developfrom
Open
Move lapack_info_check inside of onemkl_cusolver_host_task#238JackAKirk wants to merge 12 commits intouxlfoundation:developfrom
lapack_info_check inside of onemkl_cusolver_host_task#238JackAKirk wants to merge 12 commits intouxlfoundation:developfrom
Conversation
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
| int *devInfo = (int *)malloc_device(sizeof(int) * batch_size, queue); | ||
|
|
||
| auto done = queue.submit([&](sycl::handler &cgh) { | ||
| int64_t num_events = dependencies.size(); |
Contributor
There was a problem hiding this comment.
The dependencies loop can be simplified in the batch with depends_on_events(cgh, dependencies);
Contributor
Author
There was a problem hiding this comment.
Nice one. I've made these changes.
| auto a_ = reinterpret_cast<cuDataType *>(a); | ||
| auto devInfo_ = reinterpret_cast<int *>(devInfo); | ||
| auto scratchpad_ = reinterpret_cast<cuDataType *>(scratchpad); | ||
| auto ipiv_ = reinterpret_cast<int *>(ipiv32); |
Contributor
There was a problem hiding this comment.
You can also remove this unnecessary reinterpret cast as ipiv32 is already an int *
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
Contributor
|
LGTM! |
Contributor
Author
|
@ericlars Could we get a review of this from someone? Thanks |
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
In some cases cuSolver operations can return a successful error code while failing. The previous implementation of this check is done via SYCL and requires the CPU to wait until the cuSolver function completes. This is not great for performance as it prevents the user for issuing more work to the queue until it has received a response from oneMKL.
This PR moves the check inside the host task.
@AidanBeltonS I've updated the cusolver_batch.cpp cases too, can you check it is OK?