Skip to content

[jit] Support for range(n) as a value #22483

@Chillee

Description

@Chillee

This is of particular use in list comprehensions:
This should work:

@torch.jit.script
def f():
    x = [i for i in range(5)]
    print(x)

Metadata

Metadata

Assignees

Labels

oncall: jitAdd this issue/PR to JIT oncall triage queuetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions