Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the kernel needs to be compiled at run time

Are there examples of other programs that require this?



Any OpenCL/CUDA program for GPGPU would require this. Different GPUs may have different characteristics (core count, available instructions, memory sizes and speeds), that need to be taken into account and can be optimized for. This can only be done when you know the run-time target device, which is only at run-time.

This is the reason why for GPGPU programs, you often supply the kernel/shader as C code or another intermediate representation (vendor-specific assembly), and the final compilation step is done by the GPU driver.


I believe the Varnish cache server generates C code from its config rules and compile a new kernel based in it.

This all rules are optimized binary code that work directly on the data stream instead if having a runtime that applies the rules.


Many template engines do this.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: