-
Notifications
You must be signed in to change notification settings - Fork 98
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
implement batched serial getrf #2331
Open
yasahi-hpc
wants to merge
10
commits into
kokkos:develop
Choose a base branch
from
yasahi-hpc:implement-batched-serial-getrf
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
implement batched serial getrf #2331
yasahi-hpc
wants to merge
10
commits into
kokkos:develop
from
yasahi-hpc:implement-batched-serial-getrf
Conversation
This file contains 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
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
yasahi-hpc
changed the title
Implement batched serial getrf
implement batched serial getrf
Sep 10, 2024
This was referenced Oct 23, 2024
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
Signed-off-by: Yuuichi Asahi <[email protected]>
yasahi-hpc
force-pushed
the
implement-batched-serial-getrf
branch
from
October 30, 2024 03:28
689fba1
to
2ebf151
Compare
Signed-off-by: Yuuichi Asahi <[email protected]>
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.
This PR implements getrf function.
Following files are added:
KokkosBatched_Getrf_Serial_Impl.hpp
: Internal interfaces with implementation detailsKokkosBatched_Getrf.hpp
: APIsTest_Batched_SerialGetrf.hpp
: Unit tests for thatDetailed description
It computes an LU factorization of a real general M-by-N matrix
A
using partial pivoting with row interchanges.Here, the matrix has the following shape.
A
:(batch_count, m, n)
On entry, the M-by-N matrix to be factored. On exit, the factors
L
andU
from the factorizationA = P * L * U
; the unit diagonal elements ofL
are not stored.IPIV
:(batch_count, min(m, n))
The pivot indices; for
0 <= i < min(M,N)
, rowi
of the matrix was interchanged with rowIPIV(i)
.Parallelization would be made in the following manner. This is efficient only when
A is given in
LayoutLeft
for GPUs andLayoutRight
for CPUs (parallelized over batch direction).Tests
A
and factorize it intoLU
withipiv
. ReconstructL
andU
fromLU
. Then permuteA
byipiv
and confirmLU
==A
.A
as follows to confirmLU
==A
.Important remarks (edited 30/Oct)
Laswp
andIamax
. These are also used forgetrs
andgbtrf
.4096 x 4096 (=2^12)
due to the limit of the stack size. In order to avoid this limit, we need to ask user to prepare a temporal buffer to achieve a stack.Currently, we call CPU version if View is accessible from host. This does not work appropriately if we execute the function on GPUs with USM.We call recursive version on Host and stuck version on Device by usingKOKKOS_IF_ON_HOST
andKOKKOS_IF_ON_DEVICE
.trsm
andgemm
first.gesv
withdynamic_pivoting
(getrf
+getrs
) shows comparable or better performance for most matrix sizes compared togesv
withstatic_pivoting
on NVIDIA and AMD GPUs