KEMBAR78
Mixing symints with tensors may break inductor · Issue #108067 · pytorch/pytorch · GitHub
Skip to content

Mixing symints with tensors may break inductor #108067

@lezcano

Description

@lezcano

🐛 Describe the bug

The following two functions break for dynamic inputs:

import torch

@torch.compile(dynamic=True)
def fn1(a):
    return a + torch.zeros((3,))


@torch.compile(dynamic=True)
def fn2(a):
    return torch.full((3,), a)

fn1(5)
fn2(5)

Versions

master

cc @ezyang

Metadata

Metadata

Assignees

Labels

module: dynamic shapestriagedThis 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