MCHPR / MCHPRS

A multithreaded Minecraft server built for redstone.
MIT License
1.56k stars 67 forks source link

[Question] Redpiler on a GPU? #97

Open ghost opened 1 year ago

ghost commented 1 year ago

Is it possible to make Redpiler utilize the GPU for even higher performance with something like Vulkano?

Yey007 commented 1 year ago

Hello :)

I think this sounds super cool. I'm new here and I don't know anything about the redpiler, so I don't know if this is possible. But I was thinking that if the weighted graph it generates can be represented as a linear system of equations it might be possible to solve on the GPU. I would have to think more about it and understand more about the redpiler though :)

Edit: now that I think about it time and delays will be a difficult thing to deal with. I'll have to think more about this.

ghost commented 1 year ago

Thank you for looking into it, if you create something, please let me now, I'm ready to compile and test it on my machine (Fedora Linux, Nvidia GPU)

Yey007 commented 1 year ago

Honestly, I've spent some time thinking about it, and this seems difficult to do on the GPU, at least the way I originally described it. Some components in redstone (like repeaters) inherently have non-linear outputs, and approximating them with a linear function didn't do any good for me.

If anyone has any ideas, please let me know! I'm not very well versed in math or CS, so input is appreciated.