feat: Add converter for aten::isfinite by mfeliz-cruise · Pull Request #1841 · pytorch/TensorRT

Description

Adds a converter to support aten::isfinite https://pytorch.org/docs/stable/generated/torch.isfinite.html.

Implemented as (x-x)==(x-x). Relies on the fact that x-x = NaN for NaN, inf and -inf and NaN != NaN.

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified