You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
… a pending read (#859)
BUG
FEATURE
PERF
All the work involves only the WebGL backend.
- Centralize async reading of data in a single setTimeout loop
- Postpone disposal if there is a pending read
- Use LRU cache to page textures out of the GPU memory and into CPU (Avoids crashing browser)
- Some optimizations:
- Cache the `ext.GPU_DISJOINT_EXT` parameter since reading it is expensive
- Do binary search for queryIsDone since checking is expensive
- Reuse download buffers for readPixels to minimize js memory trashing
Did a stress test using demos/mnist_eager where I made tensor.dispose() a no-op. There is significant slowdown (~10x) due to constant downloads and js GC trashing memory, but the browser doesn't crash. The optimizations I did were motivated by the profiling from this stress test.
Fixestensorflow/tfjs#394
Since we don't postpone disposal when there is a pending read, the following happens:
The text was updated successfully, but these errors were encountered: