Skip to content

Commit

Permalink
Remove usage of "-DISABLE_OPENACC" for artificial cells
Browse files Browse the repository at this point in the history
See neuronsimulator/nrn/pull/2653 for details/motivation
  • Loading branch information
pramodk committed Jan 9, 2024
1 parent 7fd8221 commit 1f0648f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/codegen/codegen_acc_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,8 @@ void CodegenAccVisitor::print_atomic_reduction_pragma() {


void CodegenAccVisitor::print_backend_includes() {
/**
* Artificial cells are executed on CPU. As Random123 is allocated on GPU by default,
* we have to disable GPU allocations using `DISABLE_OPENACC` macro.
*/
if (info.artificial_cell) {
printer->add_line("#undef DISABLE_OPENACC");
printer->add_line("#define DISABLE_OPENACC");
} else {
printer->add_line("#include <coreneuron/utils/offload.hpp>");
printer->add_line("#include <cuda_runtime_api.h>");
}
printer->add_line("#include <coreneuron/utils/offload.hpp>");
printer->add_line("#include <cuda_runtime_api.h>");
}


Expand Down

0 comments on commit 1f0648f

Please sign in to comment.