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
a09ffbcd
There was an error fetching the commit references. Please try again later.
Commit
a09ffbcd
authored
9 years ago
by
Jakub Klinkovský
Browse files
Options
Downloads
Patches
Plain Diff
Benchmarks: adding TODO notes, small fixes
parent
5e5d94ce
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/benchmarks/tnl-cuda-benchmarks.h
+10
-7
10 additions, 7 deletions
tests/benchmarks/tnl-cuda-benchmarks.h
with
10 additions
and
7 deletions
tests/benchmarks/tnl-cuda-benchmarks.h
+
10
−
7
View file @
a09ffbcd
...
...
@@ -122,10 +122,10 @@ template< typename ComputeFunction,
double
benchmarkSingle
(
const
int
&
loops
,
const
double
&
datasetSize
,
// in GB
ComputeFunction
&
compute
,
ComputeFunction
compute
,
// TODO: check that default argument works here
CheckFunction
&
check
=
trueFunc
,
ResetFunction
&
reset
=
voidFunc
)
CheckFunction
check
=
trueFunc
,
ResetFunction
reset
=
voidFunc
)
{
tnlTimerRT
timer
;
timer
.
reset
();
...
...
@@ -155,11 +155,11 @@ template< typename ComputeHostFunction,
void
benchmarkCuda
(
const
int
&
loops
,
const
double
&
datasetSize
,
// in GB
ComputeHostFunction
&
computeHost
,
ComputeCudaFunction
&
computeCuda
,
ComputeHostFunction
computeHost
,
ComputeCudaFunction
computeCuda
,
// TODO: check that default argument works here
CheckFunction
&
check
=
trueFunc
,
ResetFunction
&
reset
=
voidFunc
)
CheckFunction
check
=
trueFunc
,
ResetFunction
reset
=
voidFunc
)
{
tnlTimerRT
timerHost
,
timerCuda
;
timerHost
.
reset
();
...
...
@@ -263,7 +263,10 @@ benchmarkSpMV( const int & loops,
};
auto
spmvCuda
=
[
&
]()
{
deviceMatrix
.
vectorProduct
(
deviceVector
,
deviceVector2
);
// TODO: tnlCSRMatrix does not synchronize
cudaThreadSynchronize
();
};
benchmarkCuda
(
loops
,
datasetSize
,
spmvHost
,
spmvCuda
,
check
,
reset
);
return
true
;
...
...
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