News for hackers. Stuff that matters.
Re:Run CUDA, unmodified, on AMD GPUs by ckitching on Monday July 15, 2024 @09:43PM (#40973020)
Add one: it's trivial to add a compiler builtin to carry the instruction from the frontend to the backend if an instruction exists and the backend knows about it.

If there's no instruction, either, you can write a C++ function to replicate the behaviour and codegen a call to it. Since the PTX blocks are expanded during initial IR generation, it all inlines nicely by the end. Of course, such software emulation is potentially suboptimal (depends on the situation).

There are no comments on this comment yet.