forked from DrTimothyAldenDavis/SuiteSparse
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add RISC-V and RVV1.0 support into library #1
Open
suvorovrain
wants to merge
28
commits into
SparseLinearAlgebra:dev
Choose a base branch
from
suvorovrain:riscv64rvv
base: dev
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
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
dadceeb
feat: add CMake options for RISC-V and RVV1.0
suvorovrain 2cf8670
feat: add riscv vectorization support in global values
suvorovrain 5e6d5f9
feat: add defines for RVV1.0
suvorovrain 3eb13f9
feat: add rvv function templates
suvorovrain 78957e3
test: add test
suvorovrain cc334ff
fix: add defines for RVV implementation
suvorovrain 4b4329d
feat: implement vectorized with rvv saxpy function
suvorovrain 31a7ed7
feat: correct include
suvorovrain 80fd86a
feat: correct support of saxpy5 lv in factory kernels.
suvorovrain 00fad56
fix: correct vector extension define in global structure
suvorovrain 85217a4
fix: saxpy function with rvv
suvorovrain e6070fe
refactor: remove straided functions
suvorovrain 65936ea
fix: redundant arguments
suvorovrain c57ccb2
refactor: remove test files
suvorovrain bee2b98
refactor: remove debug prints
suvorovrain 14d84da
fix: codegen rvv support
suvorovrain 4e5d24b
small refactor
suvorovrain 686f76a
refactor: jit kernel rvv support
suvorovrain 13ff474
refactor: new line symbol
suvorovrain c8e0894
refactor: very small
suvorovrain 72564cf
feat: implement float support
suvorovrain 9d566fe
feat: implement riscv support in cpufeatures
suvorovrain 7c575d2
Merge pull request #2 from suvorovrain/riscvcpufeat
suvorovrain 40a9aa5
refactor: add new line symbol
suvorovrain 0c67d9a
fix: update target
suvorovrain 1894cb0
fix: new line characters
suvorovrain d856df9
refactor: rename global rvv var
suvorovrain 239a243
Merge pull request #3 from suvorovrain/rvvtest
suvorovrain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ | |
//------------------------------------------------------------------------------ | ||
|
||
#include "include/GB_AxB_saxpy3_template.h" | ||
#ifdef GBRISCV64 | ||
#include <riscv_vector.h> | ||
#endif | ||
|
||
GB_JIT_GLOBAL GB_JIT_KERNEL_AXB_SAXPY5_PROTO (GB_jit_kernel) ; | ||
|
||
|
@@ -82,6 +85,27 @@ GB_JIT_GLOBAL GB_JIT_KERNEL_AXB_SAXPY5_PROTO (GB_jit_kernel) ; | |
} | ||
|
||
#endif | ||
|
||
//---------------------------------------------------------------------- | ||
// saxpy5 method with RISC-V vectors | ||
//---------------------------------------------------------------------- | ||
|
||
#if GB_COMPILER_SUPPORTS_RVV1 | ||
|
||
GB_TARGET_AVX2 static inline void GB_AxB_saxpy5_unrolled_rvv | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is |
||
( | ||
GrB_Matrix C, | ||
const GrB_Matrix A, | ||
const GrB_Matrix B, | ||
const int ntasks, | ||
const int nthreads, | ||
const int64_t *B_slice | ||
) | ||
{ | ||
#include "template/GB_AxB_saxpy5_lv.c" | ||
} | ||
|
||
#endif | ||
|
||
#endif | ||
|
||
|
@@ -171,6 +195,20 @@ GB_JIT_GLOBAL GB_JIT_KERNEL_AXB_SAXPY5_PROTO (GB_jit_kernel) | |
} | ||
#endif | ||
|
||
#if GB_SEMIRING_HAS_RVV_IMPLEMENTATION | ||
{ | ||
#if GB_COMPILER_SUPPORTS_RVV1 | ||
if (cpu_has_avx2) | ||
{ | ||
// RISC-V64 with RVV1.0 | ||
GB_AxB_saxpy5_unrolled_rvv (C, A, B, ntasks, nthreads, | ||
B_slice) ; | ||
return (GrB_SUCCESS) ; | ||
} | ||
#endif | ||
} | ||
#endif | ||
|
||
// any architecture and any semiring | ||
GB_AxB_saxpy5_unrolled_vanilla (C, A, B, ntasks, nthreads, B_slice) ; | ||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Should it be
cpu_features_rvv_1_0
or something else to note that it may be incompatible with 0.7 ?