openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

modeld: Move from SNPE to tinygrad

Open geohot opened this issue 3 years ago • 1 comments
trafficstars

~~A bit slower still, 24.5 ms instead of 22.5 ms.~~

Speed is mostly a wash now, switched from exp to native_exp in the ELU and removed some image conversions. There's another straightforward ms to gain with a bit more work too, and a potential 2x-5x speedup if you could maximize GPU usage.

While the replay test isn't perfect, I think it's still correct, and suspect it's actually closer to model on PC. What's our test to confirm this?

geohot avatar Jul 19 '22 03:07 geohot

I'm seeing pyopencl caching kernels in /home/, which is a tmpfs. It's not much right now (8MB), but this could become an issue later. Setting PYOPENCL_NO_CACHE should disable the cache.

adeebshihadeh avatar Aug 23 '22 18:08 adeebshihadeh

Ugh, it's slightly non deterministic. Think I know why, but gonna fix in the right way.

geohot avatar Aug 31 '22 03:08 geohot

Non determinism fixed, last bug is I think the first input frame not being black (why onnx replay is failing).

geohot avatar Aug 31 '22 22:08 geohot