DROID action SFT currently runs ColorJitter inside the dataloader workers, which is
computationally expensive.
-
In principle: ColorJitter is a random augmentation to begin with, so moving it to
the GPU should only introduce CPU/CUDA kernel-level numerical differences, without
changing the training semantics — is that right?
-
In practice: ColorJitter and the tail after it can be moved out of the dataloader
worker and run in the main process on the GPU. The pipeline stage and the ordering stay exactly
the same; only the execution device changes. The worker also passes along its RNG
state, which keeps the final difference limited to CPU/CUDA kernel rounding.
The cost is that worker-to-main-process traffic doubles, since the tensor returned
by the worker goes from [T, C, 3H/2, W] to [3T, C, H, W].
Does this approach look viable?
DROID action SFT currently runs ColorJitter inside the dataloader workers, which is
computationally expensive.
In principle: ColorJitter is a random augmentation to begin with, so moving it to
the GPU should only introduce CPU/CUDA kernel-level numerical differences, without
changing the training semantics — is that right?
In practice: ColorJitter and the tail after it can be moved out of the dataloader
worker and run in the main process on the GPU. The pipeline stage and the ordering stay exactly
the same; only the execution device changes. The worker also passes along its RNG
state, which keeps the final difference limited to CPU/CUDA kernel rounding.
The cost is that worker-to-main-process traffic doubles, since the tensor returned
by the worker goes from [T, C, 3H/2, W] to [3T, C, H, W].
Does this approach look viable?