Skip to content

↔ [Converter] Add support for aten::atan2 in Torch-TensorRT #938

Closed
@Njuapp

Description

@Njuapp

Unsupported operator: aten::atan2(Tensor self, Tensor other) -> (Tensor)

  • Function Schema:
    aten::atan2(Tensor self, Tensor other) -> (Tensor)

  • Original PyTorch API:
    torch.atan2(input, other, *, out=None) → [Tensor]

  • Relevant TensorRT Documentation:
    None

Alternatives

Additional context

When using Fourier transformation in audio segmentation models, torch.atan2 will be used.
Because variable audio input lengths requires dynamic shape, fallback to pytorch would cause runtime error when creating example inputs by partitioning::generateRandomInputs.
It reports

RuntimeError: Trying to create tensor with negative dimension -1: [1, 1, -1]

Therefore, we need convertor for torch.atan2 to successfully convert such models.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions