Displaying 2 results from an estimated 2 matches for "driver_invoke_kernel".
2020 Jul 28
2
[RFC] Heterogeneous LLVM-IR Modules
...change, though.
Again, I'm not so sure. As long as the interface is opaque, e.g., calls
from host go through a driver API, I doubt there is really a problem.
I imagine it somehow like OpenMP looks, here my conceptual model:
---
// Host
static char KERNEL_ID;
void offload(void *payload) {
driver_invoke_kernel(&KERNEL_ID, payload);
}
__attribute__((callback (cb_fn, arg)))
void driver_invoke_kernel(void(*cb_fn)(void *), void *arg);
// Device
device 1 global alias KERNEL_ID = kernel; // "LLVM-IR-like syntax"
device 1 void kernel(void *payload) {
auto *typed_payload = static_cast&l...
2020 Jul 28
2
[RFC] Heterogeneous LLVM-IR Modules
On 7/28/20 2:24 PM, Renato Golin wrote:
> On Tue, 28 Jul 2020 at 20:07, Johannes Doerfert via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> Long story short, I think host & device need to, and in practice do,
>> agree on the data layout of the address space they use to communicate.
>
> You can design APIs that call functions into external hardware that