zlacker

[return to "Implementing a GPU's programming model on a CPU"]
1. samsar+nF1[view] [source] 2023-10-14 14:41:33
>>luu+(OP)
I helped make a really cursed RISC-V version of this for a class project last year! The idea was to first compile each program to WASM using clang, and lower the WASM back to C but this time with all opcodes implemented in terms of the RISC-V vector intrinsics. That was a hack to be sure, but a surprisingly elegant one since 1. WASM's structured control flow maps really well to lane masking 2. Stack and local values easily use "structure of arrays" layout 3. Heap values easily use "array of structures" layout

It never went anywhere but the code is still online if anyone wants to stare directly at the madness: https://gitlab.com/samsartor/wasm2simt

◧◩
2. vmlade+Yl3[view] [source] 2023-10-15 06:06:04
>>samsar+nF1
This is cool! If you wrote a blog post going detail about the insights, I'd read it
◧◩◪
3. mparte+vX3[view] [source] 2023-10-15 13:41:46
>>vmlade+Yl3
The linked github page has a link to a paper.
[go to top]