KEMBAR78
addmv_() allows resizing the tensor it operates on and produces wrong results · Issue #55589 · pytorch/pytorch · GitHub
Skip to content

addmv_() allows resizing the tensor it operates on and produces wrong results #55589

@mruberry

Description

@mruberry
a = torch.randn((1,))
b = torch.randn((3, 4))
c = torch.randn((4,))

# this should error out
a.addmv_(b, c)
: tensor([ 2.2854,  1.4802, -1.4424])

This operation should fail. Discovered by @Lilyjjo (see #55539).

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @jianyuh @nikitaved @pearu @mruberry @heitorschueroff @walterddr @IvanYashchuk

Metadata

Metadata

Assignees

No one assigned

    Labels

    high prioritymodule: correctness (silent)issue that returns an incorrect result silentlymodule: linear algebraIssues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmultriagedThis 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