6 ms·
Where exactly is this in the range from running an actual JVM on a GPU to scheduling some tasks using a restricted Java subset limited to specialized libraries
by dukoid 7y ago
Where exactly is this in the range from running an actual JVM on a GPU to scheduling some tasks using a restricted Java subset limited to specialized libraries on a GPU? The title seems to suggest the former but I'd be quite surprised by anything other than the latter?
- bilbo0s 7y agoIt's closer to the latter, but obviously it isn't using specialized hardware libraries. It's a compiler. It just compiles Java down to VHDL for instance. The Java doesn't run on the FPGA at all. Obviously he's still hit an extremely useful sweet spot right there. I don't know many non-masochists who would choose to use VHDL over Java, that's for sure. Who out there would really rather work out the intricacies of VHDL instead of just compiling a Java class and calling it a day? Ditto for the GPU. You could learn Vulkan, but if what you're doing is just GPGPU type stuff, why? Just throw it in a Java class and call it be done with it.
- krapht 7y agoAs someone who occasionally has to program fpgas, the syntax of vhdl is not why performance fpga programming is difficult.
- h91wka 7y agoSame goes for GPGPU
- imtringued 7y agoThe restrictions in language features make the limitations of GPUs visible to high level language users. The reason why GPGPU is hard is that most tasks simply don't satisfy these constraints. You don't need to be a genius to run a multiplication of two arrays on a GPU.
- h91wka 7y ago> You don't need to be a genius to run a multiplication of two arrays on a GPU. You don't need to be a genius, but you need to know a lot about low-level stuff. "Simple" matrix-vector multiplication is a task where quirks of hardware already make quirks of the language fade in comparison. You need to find out how to split your task into blocks to minimize access to global memory, you need to manage your shared memory, etc, etc. _Somewhat_ performant matrix-vector multiplication algorithm looks nowhere close to textbook definition because of this. So sticking Java or whatever popular language on the problem is not going to make it much more accessible, as you still need very specific knowledge to not waste electricity by writing an algorithm that is 5-10 times slower than it should be, because all it does is waiting for global memory.
- LeifCarrotson 7y agoIt's been a few years for me too, but I think the answer to why it is difficult is why a higher-level or more general language would be useful: it's all about organizing your process to match the tooling available to you. When I spend a couple weeks every couple years in the Xilinx ISE, all my organization is done out-of-band in Excel and Emacs, I end up writing a lot in pseudocode before translating to VHDL. It's tempting to think I could write Java instead of pseudocode and have it just run.