Repository navigation
Conversation
The RoboLab server built its uint8 [C,T,H,W] observation video on the CPU: the camera image in frame 0 and zero placeholder frames after it. The model then copied all of it, about 40 MB per request, from pageable memory to the GPU, although the VAE encodes only frame 0. Build the same video on the model device instead: allocate the zeros there and copy only frame 0. Videos with non-zero later frames keep the previous path. Signed-off-by: John Pohl <jpohl@nvidia.com>
jpohl-nv
marked this pull request as ready for review
December 4, 2026 14:47
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RobolabPolicyService._build_samplereturns auint8[C,T,H,W]observation video on the CPU: the camera image in frame 0 and zero placeholder frames after it, 33 frames at 544×736 for the DROID policy. The model then copies the whole clip, about 40 MB per request, from pageable host memory to the GPU and converts it to float there, although the VAE encodes only frame 0.This PR builds the same video on the model's device: if the video is a 4-D
uint8CPU tensor with at least 2 frames and every frame after the first is zero, it allocates the zeros on the device and copies only frame 0. The values are identical, so the normalization that follows gives the same result, now on the GPU. Videos that don't match keep the previous path. The device is the model's owntensor_kwargs["device"], so each rank under--cfg-paralleluses its own GPU.Impact
Measured with
nvidia/Cosmos3-Edge-Policy-DROIDand the RoboLab server's settings on an RTX PRO 6000 Blackwell, compiled bf16,BananaInBowlTask, interleaved runs in one session:Testing
action_policy_server_robolab_test.py:Tensor.tochecks that only frame 0 is copied;_build_sampletest passes with the device set to the CPU.ruff checkandruff formatare clean on the changed files.