Skip to content

torch.nonzero(t, as_tuple=...) does not work with the JIT because the as_tuple signatures are not exposed properly #45499

@mruberry

Description

@mruberry
def foo(t):
  return torch.nonzero(t, as_tuple=False)
: RuntimeError: Arguments for call are not valid.

This is because of the Python arg parsing done to handle the "as_tuple" kwarg. Note that tracing works fine.

cc @mruberry @rgommers @heitorschueroff @pmeier @gmagogsfm

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: numpyRelated to numpy support, and also numpy compatibility of our operatorsmodule: python array apiIssues related to the Python Array APIoncall: jitAdd this issue/PR to JIT oncall triage queuetriagedThis 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