by JonChesterfield · 3y ago · 0 comments
Involves getting a pointer to a HSA queue and writing a dispatch packet to it. Same interface the host has for launching kernels - easier in some ways (you've got the kernel descriptor as a symbol, not as a name to dlsym) and harder in others (dynamic memory allocation is a pain).
Implementing robust cross device function calls on that was fairly tough going, but these days you could rip the code with 'rpc' in the file name out of the llvm libc implementation where it underpins the GPU equivalent of syscall.
Non-cuda style programming models on GPUs is a pet interest of mine, feel free to email if you want to talk offline.