-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Open
Labels
oncall: profilerprofiler-related issues (cpu, gpu, kineto)profiler-related issues (cpu, gpu, kineto)
Description
🐛 Describe the bug
Engaging the profiler and calling .fill_
on a uint64
tensor with a large fill value incorrectly raises an overflow error.
import torch
value = 13921981265324640609 # number between 2^63 and 2^64
print(value < torch.iinfo(torch.uint64).max) # check that i'm not lying
signed_value = (value ^ 2**63) - 2**63 # view as a signed value
torch.zeros((), dtype=torch.uint64).fill_(value) # works outside the profiler
with torch.profiler.profile(record_shapes=True): # engage profiler with shape info
(torch.zeros((), dtype=torch.uint64)
.view(dtype=torch.int64).fill_(signed_value) # store signed value onto signed view of tensor
.view(dtype=torch.uint64)) # works
torch.zeros((), dtype=torch.uint64).fill_(value) # raises ***int64*** overflow
Versions
I'm not easily able to clean my development environment for sharing, but I did reproduce the bug at the Getting Started colab, so whatever that is running will do.
cc @robieta @chaekit @guotuofeng @guyang3532 @dzhulgakov @davidberard98 @briancoutinho @sraikund16 @sanrise
Metadata
Metadata
Assignees
Labels
oncall: profilerprofiler-related issues (cpu, gpu, kineto)profiler-related issues (cpu, gpu, kineto)