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
2ce54688
Commit
2ce54688
authored
Feb 14, 2019
by
Leonardo Solis
Browse files
#53, correction on adadelta genotype update: using fire as example
parent
9cecefcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
device/kernel_ad.cl
View file @
2ce54688
...
...
@@ -568,6 +568,13 @@ gradient_minAD(
barrier(CLK_LOCAL_MEM_FENCE);
#endif
// Original block works as expectd only on GPUs.
// Alternative code works correctly on both CPUs and GPUs.
// Problem in original block:
// Energy values were computed correctly on the both device types (GPU and CPU),
// however incorrect energy values were recalculated on host.
// The alternative code was taken from FIRE kernel implementation.
#if 0
// If this energy is the best so far, save the genotype
if (energy < best_energy){
...
...
@@ -613,6 +620,19 @@ gradient_minAD(
#endif
}
barrier(CLK_LOCAL_MEM_FENCE);
#else
if (get_local_id(0) == 0) {
if (energy < best_energy) {
best_energy = energy;
for(uint i = 0; i < dockpars_num_of_genes; i++) {
best_genotype[i] = genotype[i];
}
}
}
barrier(CLK_LOCAL_MEM_FENCE);
#endif
for(uint i = get_local_id(0);
i < dockpars_num_of_genes;
...
...
Write
Preview
Supports
Markdown
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