[timesfm] Fix fp16 overflow on pad_val in _forward_transform (#50021)
* [timesfm] Fix fp16 overflow on pad_val in _forward_transform
`torch.full((), pad_val, dtype=fp16)` raises on CUDA because pad_val
(1123581321.0) does not fit in fp16. Pass the Python scalar to
`torch.where` instead: no host-to-device copy, no overflow check.
Fixes #50020
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* [timesfm] Keep padded inputs as-is instead of casting pad_val
A Python scalar in torch.where still goes through a checked on-device
fill and overflows in fp16 (reported by @hmellor on B200).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>