Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit db1a70d

Browse files
authored
Bug fix for GPU : Patternstim shouldn't be copied from GPU to CPU (#504)
- patternstim is a special mechanism whose data is not copied on gpu - when we update whole GPU data back to CPU, we should skip the patternstim fixes #503
1 parent b8d9fcd commit db1a70d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

coreneuron/gpu/nrn_acc_manager.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,12 @@ void update_nrnthreads_on_host(NrnThread* threads, int nthreads) {
610610
int is_art = corenrn.get_is_artificial()[type];
611611
int layout = corenrn.get_mech_data_layout()[type];
612612

613+
// PatternStim is a special mechanim of type artificial cell
614+
// and it's not copied on GPU. So we shouldn't update it from GPU.
615+
if (type == nrn_get_mechtype("PatternStim")) {
616+
continue;
617+
}
618+
613619
int pcnt = nrn_soa_padded_size(n, layout) * szp;
614620

615621
acc_update_self(ml->data, pcnt * sizeof(double));

0 commit comments

Comments
 (0)