Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
3c9dbc5f
There was an error fetching the commit references. Please try again later.
Commit
3c9dbc5f
authored
4 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Added new CSR segments kernels to SpMV benchmark.
parent
ac783cf2
No related branches found
No related tags found
1 merge request
!83
To/matrices
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Benchmarks/SpMV/spmv-legacy.h
+33
-21
33 additions, 21 deletions
src/Benchmarks/SpMV/spmv-legacy.h
src/TNL/Algorithms/Segments/details/CSRAdaptiveKernelBlockDescriptor.h
+1
-1
1 addition, 1 deletion
...ithms/Segments/details/CSRAdaptiveKernelBlockDescriptor.h
with
34 additions
and
22 deletions
src/Benchmarks/SpMV/spmv-legacy.h
+
33
−
21
View file @
3c9dbc5f
...
@@ -49,7 +49,16 @@ using SlicedEllpackAlias = Matrices::Legacy::SlicedEllpack< Real, Device, Index
...
@@ -49,7 +49,16 @@ using SlicedEllpackAlias = Matrices::Legacy::SlicedEllpack< Real, Device, Index
// Segments based sparse matrix aliases
// Segments based sparse matrix aliases
template
<
typename
Real
,
typename
Device
,
typename
Index
>
template
<
typename
Real
,
typename
Device
,
typename
Index
>
using
SparseMatrix_CSR
=
Matrices
::
SparseMatrix
<
Real
,
Device
,
Index
,
Matrices
::
GeneralMatrix
,
Algorithms
::
Segments
::
CSRDefault
>
;
using
SparseMatrix_CSR_Scalar
=
Matrices
::
SparseMatrix
<
Real
,
Device
,
Index
,
Matrices
::
GeneralMatrix
,
Algorithms
::
Segments
::
CSRScalar
>
;
template
<
typename
Real
,
typename
Device
,
typename
Index
>
using
SparseMatrix_CSR_Vector
=
Matrices
::
SparseMatrix
<
Real
,
Device
,
Index
,
Matrices
::
GeneralMatrix
,
Algorithms
::
Segments
::
CSRVector
>
;
template
<
typename
Real
,
typename
Device
,
typename
Index
>
using
SparseMatrix_CSR_Hybrid
=
Matrices
::
SparseMatrix
<
Real
,
Device
,
Index
,
Matrices
::
GeneralMatrix
,
Algorithms
::
Segments
::
CSRHybrid
>
;
template
<
typename
Real
,
typename
Device
,
typename
Index
>
using
SparseMatrix_CSR_Adaptive
=
Matrices
::
SparseMatrix
<
Real
,
Device
,
Index
,
Matrices
::
GeneralMatrix
,
Algorithms
::
Segments
::
CSRAdaptive
>
;
template
<
typename
Device
,
typename
Index
,
typename
IndexAllocator
>
template
<
typename
Device
,
typename
Index
,
typename
IndexAllocator
>
using
EllpackSegments
=
Algorithms
::
Segments
::
Ellpack
<
Device
,
Index
,
IndexAllocator
>
;
using
EllpackSegments
=
Algorithms
::
Segments
::
Ellpack
<
Device
,
Index
,
IndexAllocator
>
;
...
@@ -309,26 +318,29 @@ benchmarkSpmvSynthetic( Benchmark& benchmark,
...
@@ -309,26 +318,29 @@ benchmarkSpmvSynthetic( Benchmark& benchmark,
benchmark
.
time
<
Devices
::
Cuda
>
(
resetCusparseVectors
,
"GPU"
,
spmvCusparse
,
cusparseBenchmarkResults
);
benchmark
.
time
<
Devices
::
Cuda
>
(
resetCusparseVectors
,
"GPU"
,
spmvCusparse
,
cusparseBenchmarkResults
);
#endif
#endif
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Scalar
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Scalar
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Vector
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Vector
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light2
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light2
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light3
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light3
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light4
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light4
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light5
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light5
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light6
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Light6
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Adaptive
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_Adaptive
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_MultiVector
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_MultiVector
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_LightWithoutAtomic
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrixLegacy_CSR_LightWithoutAtomic
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_CSR
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_CSR_Scalar
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
Matrices
::
Legacy
::
Ellpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_CSR_Vector
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_Ellpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_CSR_Hybrid
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SlicedEllpackAlias
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_CSR_Adaptive
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_SlicedEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
Matrices
::
Legacy
::
Ellpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
Matrices
::
Legacy
::
ChunkedEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_Ellpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_ChunkedEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SlicedEllpackAlias
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
Matrices
::
Legacy
::
BiEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_SlicedEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_BiEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
Matrices
::
Legacy
::
ChunkedEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_ChunkedEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
Matrices
::
Legacy
::
BiEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
benchmarkSpMV
<
Real
,
SparseMatrix_BiEllpack
>
(
benchmark
,
hostOutVector
,
inputFileName
,
verboseMR
);
/* AdEllpack is broken
/* AdEllpack is broken
benchmarkSpMV< Real, Matrices::AdEllpack >( benchmark, hostOutVector, inputFileName, verboseMR );
benchmarkSpMV< Real, Matrices::AdEllpack >( benchmark, hostOutVector, inputFileName, verboseMR );
*/
*/
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Algorithms/Segments/details/CSRAdaptiveKernelBlockDescriptor.h
+
1
−
1
View file @
3c9dbc5f
...
@@ -185,7 +185,7 @@ struct CSRAdaptiveKernelBlockDescriptor
...
@@ -185,7 +185,7 @@ struct CSRAdaptiveKernelBlockDescriptor
//return ( twobytes[ sizeof( Index ) == 4 ? 3 : 5 ] & 0x3FFF );
//return ( twobytes[ sizeof( Index ) == 4 ? 3 : 5 ] & 0x3FFF );
}
}
__cuda_callable__
const
uint8_t
getWarpIdx
()
const
__cuda_callable__
uint8_t
getWarpIdx
()
const
{
{
return
this
->
warpIdx
;
return
this
->
warpIdx
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment