Skip to content

Complex dispatch should be disabled on min/max functions #50064

@ngimel

Description

@ngimel

As of #36377, min/max functions were disabled for complex inputs (via dtype checks), however, min/max kernels are still compiled and dispatched for complex, see e.g.

AT_DISPATCH_ALL_TYPES_AND_COMPLEX(input.scalar_type(), "min_all", [&] {

This dispatch should be disabled, and we should rely on errors produced by dispatch macro to not run those ops on complex, instead of doing redundant dtype checks.

cc @ezyang @anjali411 @dylanbespalko @mruberry
cc @t-vi, thanks for reporting!

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuemodule: complexRelated to complex number support in PyTorchtriagedThis 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