-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
jit-backlogoncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queuetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
Tracing ~ hard codes size.
import torch
def foo(x):
return ~x
y = torch.jit.trace(foo, torch.zeros(3,4, dtype=torch.uint8))
print(y.code)
Output:
def foo(x: Tensor) -> Tensor:
_0 = torch.empty([3, 4], dtype=0, layout=0, device=torch.device("cpu"), pin_memory=False)
_1 = torch.sub_(torch.fill_(_0, 1), x, alpha=1)
return _1
cc @suo
Metadata
Metadata
Assignees
Labels
jit-backlogoncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queuetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module