Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock
Commits
bd633ddd
Commit
bd633ddd
authored
Aug 13, 2018
by
lvs
Browse files
added sync after asynch copies in krnls 3 & 4 & grad & fire,
#31
parent
e4374d85
Changes
5
Hide whitespace changes
Inline
Side-by-side
device/kernel1.cl
View file @
bd633ddd
...
...
@@ -92,7 +92,7 @@ gpu_calc_initpop(
}
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev
)
;
wait_group_events
(
1
,
&ev
)
;
//
Evaluating
initial
genotypes
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
...
...
device/kernel3.cl
View file @
bd633ddd
...
...
@@ -152,7 +152,7 @@ perform_LS(
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev
)
;
wait_group_events
(
1
,
&ev
)
;
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
...
...
@@ -437,7 +437,10 @@ perform_LS(
//
Updating
old
offspring
in
population
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
async_work_group_copy
(
dockpars_conformations_next+
(
run_id*dockpars_pop_size+entity_id
)
*GENOTYPE_LENGTH_IN_GLOBMEM,
offspring_genotype,
dockpars_num_of_genes,0
)
;
event_t
ev2
=
async_work_group_copy
(
dockpars_conformations_next+
(
run_id*dockpars_pop_size+entity_id
)
*GENOTYPE_LENGTH_IN_GLOBMEM,
offspring_genotype,
dockpars_num_of_genes,0
)
;
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev2
)
;
}
device/kernel4.cl
View file @
bd633ddd
...
...
@@ -219,7 +219,7 @@ gpu_gen_and_eval_newpops(
dockpars_num_of_genes,
0
)
;
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev
)
;
wait_group_events
(
1
,
&ev
)
;
}
//
End
of
crossover
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
...
...
@@ -316,8 +316,11 @@ gpu_gen_and_eval_newpops(
}
//
Copying
new
offspring
to
next
generation
async_work_group_copy
(
dockpars_conformations_next
+
GENOTYPE_LENGTH_IN_GLOBMEM*get_group_id
(
0
)
,
offspring_genotype,
dockpars_num_of_genes,
0
)
;
event_t
ev2
=
async_work_group_copy
(
dockpars_conformations_next
+
GENOTYPE_LENGTH_IN_GLOBMEM*get_group_id
(
0
)
,
offspring_genotype,
dockpars_num_of_genes,
0
)
;
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev2
)
;
}
}
device/kernel_fire.cl
View file @
bd633ddd
...
...
@@ -123,7 +123,7 @@ gradient_minFire(
dockpars_num_of_genes,
0
)
;
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev
)
;
wait_group_events
(
1
,
&ev
)
;
//
-----------------------------------------------------------------------------
//
Some
OpenCL
compilers
don
't
allow
declaring
...
...
@@ -685,7 +685,10 @@ gradient_minFire(
//
Updating
old
offspring
in
population
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
async_work_group_copy
(
dockpars_conformations_next+
(
run_id*dockpars_pop_size+entity_id
)
*GENOTYPE_LENGTH_IN_GLOBMEM,
genotype,
dockpars_num_of_genes,
0
)
;
event_t
ev2
=
async_work_group_copy
(
dockpars_conformations_next+
(
run_id*dockpars_pop_size+entity_id
)
*GENOTYPE_LENGTH_IN_GLOBMEM,
genotype,
dockpars_num_of_genes,
0
)
;
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev2
)
;
}
device/kernel_gradient.cl
View file @
bd633ddd
...
...
@@ -139,7 +139,7 @@ gradient_minimizer(
dockpars_num_of_genes, 0);
// Asynchronous copy should be finished by here
wait_group_events(1,&ev);
wait_group_events(1,
&ev);
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
...
@@ -814,7 +814,10 @@ gradient_minimizer(
//
Updating
old
offspring
in
population
barrier
(
CLK_LOCAL_MEM_FENCE
)
;
async_work_group_copy
(
dockpars_conformations_next+
(
run_id*dockpars_pop_size+entity_id
)
*GENOTYPE_LENGTH_IN_GLOBMEM,
genotype,
dockpars_num_of_genes,
0
)
;
event_t
ev2
=
async_work_group_copy
(
dockpars_conformations_next+
(
run_id*dockpars_pop_size+entity_id
)
*GENOTYPE_LENGTH_IN_GLOBMEM,
genotype,
dockpars_num_of_genes,
0
)
;
//
Asynchronous
copy
should
be
finished
by
here
wait_group_events
(
1
,
&ev2
)
;
}
Leonardo Solis
@solis
mentioned in issue
#31 (closed)
·
Aug 13, 2018
mentioned in issue
#31 (closed)
mentioned in issue #31
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment