-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
oncall: 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
🚀 Feature
Add support for tuple unpacking in for loops
Motivation
Makes working with tuples a better experience and the code shorter.
Pitch
This should be possible:
import torch
@torch.jit.script
def test():
fm = [(64, 32), (32, 16), (16, 8)]
for width, height in fm:
passAlternatives
A current workaround is to use:
import torch
@torch.jit.script
def test():
fm = [(64, 32), (32, 16), (16, 8)]
for f in fm:
width, height = f
passmdlockyer
Metadata
Metadata
Assignees
Labels
oncall: 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