3 ms·
no it won't, because while hitting ioctls in python is cute https://github.com/tinygrad/tinygrad/blob/master/extra/hip_gpu_driver/hip_ioctl.py https://github.c
by almostgotcaught 2y ago
no it won't, because while hitting ioctls in python is cute
https://github.com/tinygrad/tinygrad/blob/master/extra/hip_gpu_driver/hip_ioctl.py https://github.com/tinygrad/tinygrad/blob/master/extra/hip_g...
it is definitely not shippable
- deleted 2y ago[deleted]
- georgehotz 2y agoUmm, why not? We wrote entire NVIDIA, AMD, and QCOM drivers in that style. https://github.com/tinygrad/tinygrad/blob/master/tinygrad/runtime/ops_nv.py https://github.com/tinygrad/tinygrad/blob/master/tinygrad/ru... https://github.com/tinygrad/tinygrad/blob/master/tinygrad/runtime/ops_amd.py https://github.com/tinygrad/tinygrad/blob/master/tinygrad/ru... https://github.com/tinygrad/tinygrad/blob/master/tinygrad/runtime/ops_qcom.py https://github.com/tinygrad/tinygrad/blob/master/tinygrad/ru...
- almostgotcaught 2y agoBecause it's slow duh
- georgehotz 2y agoThis sounds like prejudice. Have you benchmarked it?
- almostgotcaught 2y agoYes I literally duplicated your approach for my driver stack last week and surprise surprise the FFI overhead into libc is too high.
- georgehotz 2y agoFFI? This isn't how GPUs work...they are MMIO (mostly) Those drivers are faster than anything else when used to run fixed command queues (what neural network runs are)
- timkq 2y agoI can't say anything on the performance, but inline assembly in Python is crazy
- almostgotcaught 2y agoIt's not inline assembly it's just ioctl through ctypes via libc.