Skip to content

Fix CUDA device mismatch in RTC inference timestep#68

Open
junsooki wants to merge 1 commit into
physical-superintelligence-lab:mainfrom
junsooki:junsooki/rtc-timestep-device-fix
Open

Fix CUDA device mismatch in RTC inference timestep#68
junsooki wants to merge 1 commit into
physical-superintelligence-lab:mainfrom
junsooki:junsooki/rtc-timestep-device-fix

Conversation

@junsooki

Copy link
Copy Markdown

In predict_action_with_training_rtc_flow, torch.where(prefix_mask, 0, timestep) mixed a CUDA condition (prefix_mask) with a CPU scalar (the scheduler's timestep), triggering an illegal memory access on the second (RTC-conditioned) act call. The trailing .to(self.device) ran too late. Move timestep to the device inside the where. Safe no-op when timestep is already on-device; the non-RTC path was unaffected.

In predict_action_with_training_rtc_flow, torch.where(prefix_mask, 0, timestep)
mixed a CUDA condition (prefix_mask) with a CPU scalar (the scheduler's timestep),
triggering an illegal memory access on the second (RTC-conditioned) act call. The
trailing .to(self.device) ran too late. Move timestep to the device inside the
where. Safe no-op when timestep is already on-device; the non-RTC path was unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant