ROCm-Developer-Tools/LLVM-AMDGPU-Assembler-Extra

Make examples self-contained without using the C++ Dispatcher

almson opened this issue · 0 comments

The over-engineered Dispatcher class makes it more difficult to understand how to launch kernels. I suggest each asm example to have two host source files. One which uses C HSA code and another which uses C++ HCC code. If any common functionality should be factored out into a common file, then that functionality should take the form of simple non-OOP utility functions. Samples should be as simple as possible and easy to build on top of and incorporate into other code.

The choice to use C++ to call HSA is especially odd. We have HCC for that. The HSA examples should use pure C and not attempt to create yet another layer of abstraction.

Thankfully, there is currently /opt/rocm/hsa/sample/vector_copy.c, although it doesn't load HSACO files.