SIGN IN SIGN UP

FileDataLoader calls read() in a loop (#1978)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/1978

The low-level `read()` should always be called in a loop, since underlying devices can return short reads.

In our case a single read usually worked, but we saw a short read when trying to read > `1<<32` bytes of data. And there's always the chance of a signal interrupting the read.

Reviewed By: mcr229

Differential Revision: D53777094

fbshipit-source-id: 5624bbc4bcb00d0513ba2e51bdcfc013a1ae28a1
D
Dave Bort committed
0f2bd67f6c894f60be8bd3d66d7dd5be9d4190d5
Parent: 3c81c71
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 2/16/2024, 12:11:39 AM