Skip to content

Conversation

gs-olive
Copy link
Collaborator

@gs-olive gs-olive commented Nov 2, 2022

Description

  • TRT einsum implementation currently supports 2 tensor inputs, however the converter will accept any number of tensor arguments (it accepts a list of tensors) and TRT throws an error at compilation
  • aten::einsum converter now checks that the tensor argument list does not exceed 2 elements, and throws an informative error otherwise

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

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

- TRT einsum implementation currently supports 2 inputs, however the
converter will accept any number of inputs and TRT throws an error at
compilation
- `aten::einsum` converter now checks that the tensor argument list does
not exceed 2 elements, and throws an informative error otherwise
@github-actions github-actions bot added component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler labels Nov 2, 2022
@gs-olive gs-olive changed the title fix: Add check to ensure einsum converter has $\leq 2$ tensor inputs fix: Add check to ensure einsum converter has no more than 2 tensor inputs Nov 2, 2022
Copy link
Collaborator

@narendasan narendasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@narendasan narendasan merged commit 36da9fc into pytorch:master Nov 3, 2022
@gs-olive gs-olive deleted the einsum_error_handling branch November 3, 2022 21:42
@gs-olive gs-olive self-assigned this Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants