Skip to content

max-sum operation #59545

@pengfzhou

Description

@pengfzhou

🚀 Feature

usual matrix operation are sum-product, could you please implement max-sum matrix operation?
sum-product matirx operation means:
\sum_j ( A_{ij}*B_{jk} ) = C_{ik}
but max-sum matrix operation means:
\max_j ( A_{ij}+B_{jk} )=C_{ik}

Motivation

In graphical model, matrix operation with sum-product are used to calculate partition fuction, If we want to calculate the
ground state of graphical model, we need matrix operation with max-sum; with this kind of operation , we can slove many optimization problems.

Additional context

cc @VitalyFedyunin @ngimel @heitorschueroff @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @lezcano

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: linear algebraIssues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmulmodule: reductionstriagedThis 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