forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
libomptarget
Ye Luo edited this page Aug 6, 2020
·
18 revisions
micro steps in omptarget.
- Resolve dependency in. wait for events
- Enter data region. map handling, allocate memory and increase reference counting. Generate H2D and D2H pair lists (for 'always' modifier), first-private array list.
- Transfer H2D
- Launch kernel
- Transfer D2H
- Exit data region. map handling, decrease reference counting, delete first-private array items.
- Create dependency out. record events. Rules:
- q_start must be before 1. because some dependency may be enqueued.
- q_stop must be before 6. it also includes a sync. transfers triggered by refcount 1->0 can just call the blocking memcopy.
Decompose target constructs:
In nowait case,
- target: q_start, 1-5, q_stop, 6-7
- target data:. q_start 1-3, q_stop, host region, q_start, 5, q_stop, 6-7
- target enter data: q_start, 1-3, q_stop, 7
- target exit data: q_start, 1, 5, q_stop, 6-7
- target update q_start, 1-3, 5, q_stop, 6-7
Without nowait clause and depdency, remove step 1 and 7.