-
Notifications
You must be signed in to change notification settings - Fork 172
Adding rocSOLVER support for LAPACK domain with hip backend #208
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
Adding rocSOLVER support for LAPACK domain with hip backend #208
Conversation
}); | ||
} | ||
|
||
// TBD: rocSolver doesn't need/support scratchpad_size |
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.
we are not sure what to return as scratchpad size because rocsolver doesn't use scratchpad., Please suggest what should be return here.? or how it should be handled.?
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.
I don't expect much trouble with returning 0. Users should be able to allocate as normal since SYCL 2020 spec now allows zero ranged buffers and usm allocations should just return a nullptr.
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 suggestion @ericlars.
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.
I don't expect much trouble with returning 0. Users should be able to allocate as normal since SYCL 2020 spec now allows zero ranged buffers and usm allocations should just return a nullptr.
@ericlars , When zero is returned from "get_scratchpad_size" APIs, the following error has been reported during buffer creation in the test cases for HIP backend.
"SYCL buffer size is zero. To create a device accessor, SYCL buffer size must be greater than zero."
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.
We've found that this issue was coming from creating accessor to an empty scratchpad buffer. We've addressed this in the latest commit
1855208
to
eb5d3f8
Compare
db8ced4
to
d60d0c6
Compare
ed598eb
to
1822fbe
Compare
…er with HIP backend support
Added explicit sync through MACRO helpers
c206a5c
to
ca2b2b7
Compare
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 PR! I'm looking forward to having rocSOLVER support added for LAPACK. =)
I have not tried running your changes, just did a visual code review with multiple comments throughout. Thanks!
@@ -167,12 +171,12 @@ Supported domains: BLAS, LAPACK, RNG | |||
</tr> | |||
<tr > | |||
<td align="center">AMD GPU</td> | |||
<td align="center">AMD rocBLAS </td> |
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.
The table formatting looks off when viewing the README in your branch: https://github.com/srilekhainkulu99/oneMKL/tree/rocsolver_hip_support
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 PR! I'm looking forward to having rocSOLVER support added for LAPACK. =)
I have not tried running your changes, just did a visual code review with multiple comments throughout. Thanks!
Thank you for such a detailed feedback. I've addressed majority of the comments.
Do let us know if you have any further suggestions.
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.
The table formatting still appears off, please address this. https://github.com/srilekhainkulu99/oneMKL/tree/rocsolver_hip_support
static_cast<unsigned int>(queue.get_device().get_info<sycl::info::device::vendor_id>()); | ||
if (!(queue.get_device().is_gpu() && vendor_id == AMD_ID)) { | ||
throw unsupported_device( | ||
"", "backend_selector<backend::" + backend_map[backend::rocsolver] + ">", |
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.
Minor, but the spacing doesn't seem to match the spacing above it
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.
It seems like line 135 with the queue get device is still misaligned compared to line 122 above.
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.
Ran clang-format to fix the indentation of this section which differs from the format of the code with line #122
#ifndef _DETAIL_ROCSOLVER_LAPACK_CT_HPP_ | ||
#define _DETAIL_ROCSOLVER_LAPACK_CT_HPP_ | ||
|
||
#include <CL/sycl.hpp> |
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.
Does this need to be guarded similarly as in include/oneapi/mkl/blas/detail/rocblas/blas_ct.hpp
?
#if __has_include(<sycl/sycl.hpp>)
#include <sycl/sycl.hpp>
#else
#include <CL/sycl.hpp>
#endif
|
||
#ifndef _ONEMKL_LAPACK_ROCSOLVER_HPP_ | ||
#define _ONEMKL_LAPACK_ROCSOLVER_HPP_ | ||
#include <CL/sycl.hpp> |
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.
Does this need to be guarded similarly as in include/oneapi/mkl/blas/detail/rocblas/onemkl_blas_rocblas.hpp
?
#if __has_include(<sycl/sycl.hpp>)
#include <sycl/sycl.hpp>
#else
#include <CL/sycl.hpp>
#endif
* Adjusted years for copyrights of new files * Adjusted misalignments and formatting issues * Added default case for get_rocsolver_jobsvd * Removed the conditional check of (m < n) for gebrd * Removed cuda header from rocsolver_scope_handle.hpp * Added misssing __has_include checks for CL/SYCL.hpp inclusions * Removed circular dependency in include/oneapi/mkl/lapack/detail/rocsolver/lapack_ct.hpp * Removed the duplicated macro of ROCSOLVER_ERROR_FUNC_T * Added default case for get_rocsolver_jobsvd * Removed the conditional check of (m < n) for gebrd * Removed cuda header from rocsolver_scope_handle.hpp * Added misssing __has_include checks for CL/SYCL.hpp inclusions
…etrs scratchpad check in getrs_usm.cpp
46adfff
to
d8c4a72
Compare
Mistakenly merged before other approvers could take a look, if any issues please comment and we can revert. |
Adding rocSOLVER support for LAPACK
Description
Raising PR with initial code base to provide rocSOLVER support for LAPACK domain with the HIP backend
Checklist
All Submissions