Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/codegen/codegen_acc_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ void CodegenAccVisitor::print_channel_iteration_block_parallel_hint(BlockType ty
}
present_clause << ')';
printer->add_line(
"nrn_pragma_acc(parallel loop {} async(nt->stream_id) if(nt->compute_gpu))"_format(
"nrn_pragma_acc(parallel loop {} async(nt->streams[nt->stream_id]) if(nt->compute_gpu))"_format(
present_clause.str()));
printer->add_line(
"nrn_pragma_omp(target teams distribute parallel for is_device_ptr(inst) "
"if(nt->compute_gpu))");
"if(nt->compute_gpu) depend(inout: nt->streams[nt->stream_id]) nowait)");
}


Expand Down Expand Up @@ -319,7 +319,7 @@ void CodegenAccVisitor::print_device_atomic_capture_annotation() const {

void CodegenAccVisitor::print_device_stream_wait() const {
printer->start_block("if(nt->compute_gpu)");
printer->add_line("nrn_pragma_acc(wait(nt->stream_id))");
printer->add_line("nrn_pragma_acc(wait async(nt->streams[nt->stream_id]))");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iomaganaris / @olupton: doesacc wait async(stream_id) change any execution semantics here compared to previous acc wait (stream_id) ?

from what I read in the nvforum - “wait async” is used to create dependencies between different async queues. So if your parallel regions had different queue numbers, you add “wait(Q1) async(Q2)” where Q2 should wait for Q1 to finish before running.

printer->add_line("nrn_pragma_omp(taskwait)");
printer->end_block(1);
}
Expand Down