Skip to content

Cholesky: return info instead of RuntimeError #47608

@twoertwein

Description

@twoertwein

🚀 Feature

cholesky raises a RuntimeError if the matrix is not (numerically) positive-definite. This makes it impossible to use it with TorchScript (for loop over increasing regularization of try-except with cholesky).

Similar to lu, return info to indicate which of the batches matrices were successfully decomposed and which weren't.

Motivation

Use cholesky with TorchScript.

Pitch

Return lu-like info instead of raising a RuntimeError.

cc @vishwakftw @jianyuh @nikitaved @pearu @mruberry @heitorschueroff

Metadata

Metadata

Assignees

No one assigned

    Labels

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