Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
La programmation parallèle pour les gens
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
baptiste.coudray
La programmation parallèle pour les gens
Commits
6993fa57
Verified
Commit
6993fa57
authored
3 years ago
by
baptiste.coudray
Browse files
Options
Downloads
Patches
Plain Diff
Updated benchmark for GPU
parent
9cebc10b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
elementary/benchmark/main.c
+13
-4
13 additions, 4 deletions
elementary/benchmark/main.c
with
13 additions
and
4 deletions
elementary/benchmark/main.c
+
13
−
4
View file @
6993fa57
...
...
@@ -27,19 +27,28 @@ void init_chunk_elems(chunk_info_t *ci) {
void
compute_next_chunk_elems
(
struct
dispatch_context
*
dc
,
struct
futhark_context
*
fc
,
chunk_info_t
*
ci
)
{
envelope_t
*
outer_envelope
=
get_outer_envelope
(
dc
,
fc
,
1
);
struct
futhark_opaque_envelope_1d_i8
*
fut_outer_envelope
=
futhark_outer_envelope_new
(
dc
,
fc
,
outer_envelope
,
futhark_
restore_
opaque_envelope_1d_i8
,
FUTHARK_I8
);
double
start0
=
MPI_Wtime
();
struct
futhark_opaque_envelope_1d_i8
*
fut_outer_envelope
=
futhark_outer_envelope_new
(
dc
,
fc
,
outer_envelope
,
futhark_restore_opaque_envelope_1d_i8
,
FUTHARK_I8
);
struct
futhark_i8_1d
*
fut_chunk_elems
=
futhark_new_i8_1d
(
fc
,
ci
->
data
,
ci
->
dimensions
[
1
]);
struct
futhark_i8_1d
*
fut_next_chunk_elems
;
futhark_context_sync
(
fc
);
double
finish0
=
MPI_Wtime
();
printf
(
"0. nce -> %f
\n
"
,
finish0
-
start0
);
double
start1
=
MPI_Wtime
();
futhark_entry_next_chunk_elems
(
fc
,
&
fut_next_chunk_elems
,
fut_chunk_elems
,
fut_outer_envelope
);
futhark_context_sync
(
fc
);
double
finish1
=
MPI_Wtime
();
printf
(
"1. nce -> %f
\n
"
,
finish1
-
start1
);
double
start2
=
MPI_Wtime
();
futhark_values_i8_1d
(
fc
,
fut_next_chunk_elems
,
ci
->
data
);
futhark_context_sync
(
fc
);
double
finish2
=
MPI_Wtime
();
printf
(
"2. values_i8 -> %f
\n
"
,
finish2
-
start2
);
futhark_free_i8_1d
(
fc
,
fut_next_chunk_elems
);
futhark_free_i8_1d
(
fc
,
fut_chunk_elems
);
...
...
@@ -61,7 +70,7 @@ int main(int argc, char *argv[]) {
struct
futhark_context_config
*
fut_config
=
futhark_context_config_new
();
int
nb_devices
=
atoi
(
argv
[
1
]);
#if defined(FUTHARK_BACKEND_cuda) || defined(FUTHARK_BACKEND_opencl)
#if defined(FUTHARK_BACKEND_opencl)
#if defined(FUTHARK_BACKEND_opencl)
futhark_context_config_list_devices
(
fut_config
);
#endif
char
device
[
4
]
=
{
0
};
...
...
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