Skip to content

fast gradcheck fails when outputs that do not require grad precede outputs that do #77230

@upupyy

Description

@upupyy

🐛 Describe the bug

gradcheck fails for torch.linalg.slogdet when fast_mode=True

import torch
from torch.autograd import gradcheck

A = torch.rand([1, 1], dtype=torch.float64, requires_grad=True)
gradcheck(torch.linalg.slogdet, (A), fast_mode=True)

Versions

pytorch: 1.11.0

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @lezcano @Varal7 @jianyuh @mruberry @walterddr @IvanYashchuk @xwang233

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionablemodule: autogradRelated to torch.autograd, and the autograd engine in generalmodule: 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