Skip to content
Draft
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions offload/liboffload/API/Queue.td
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,12 @@ def olLaunchHostFunction : Function {
];
let returns = [];
}

def olDataFence : Function {
let desc = "Insert a data fence between previous data operations and the following operations if necessary for the device.";
let details = [];
let params = [
Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN>
];
let returns = [];
}
9 changes: 9 additions & 0 deletions offload/liboffload/src/OffloadImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1214,5 +1214,14 @@ Error olLaunchHostFunction_impl(ol_queue_handle_t Queue,
Queue->AsyncInfo);
}

Error olDataFence_impl(ol_queue_handle_t Queue) {
if (Queue->AsyncInfo->Queue) {
if (auto Err = Queue->Device->Device->dataFence(Queue->AsyncInfo))
return Err;
}

return Error::success();
}

} // namespace offload
} // namespace llvm