Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for output data types in TRTInterpreter [2 / x] #2004

Merged

Conversation

gs-olive
Copy link
Collaborator

@gs-olive gs-olive commented Jun 8, 2023

Description

  • Add argument for specification of output data types of TRT engines in the interpreter, to avoid type mismatches at runtime
  • Add support for output data type provision in the Dynamo compile path, which simultaneously tests the feature via the backend testing and e2e frameworks

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

@gs-olive gs-olive requested a review from narendasan June 8, 2023 20:04
@gs-olive gs-olive self-assigned this Jun 8, 2023
@gs-olive gs-olive changed the title feat: Add support for output data types in TRTInterpreter [4 / x] feat: Add support for output data types in TRTInterpreter [4 / x] Jun 8, 2023
@github-actions github-actions bot added the component: api [Python] Issues re: Python API label Jun 8, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to Python style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to Python style guidelines

@gs-olive gs-olive force-pushed the dynamo_compile_new_trt_features branch from 4e2f090 to 93eee96 Compare June 8, 2023 23:28
@gs-olive gs-olive force-pushed the trt_interpreter_output_dtypes branch from f12670a to f3bdc49 Compare June 8, 2023 23:29
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to Python style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

Base automatically changed from dynamo_compile_new_trt_features to dynamo_compile_trt_module_next June 13, 2023 21:15
@narendasan
Copy link
Collaborator

Does this work with fx_ts_compat or just the torch compile backend?

@gs-olive
Copy link
Collaborator Author

This feature as written will work for both fx_ts_compat and compile, but this PR only utilizes it for compile.

@gs-olive gs-olive force-pushed the dynamo_compile_trt_module_next branch from 338ac94 to d369fa4 Compare June 14, 2023 00:20
@gs-olive gs-olive force-pushed the trt_interpreter_output_dtypes branch from f3bdc49 to 5b2e1cb Compare June 14, 2023 00:26
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to Python style guidelines

@gs-olive gs-olive changed the title feat: Add support for output data types in TRTInterpreter [4 / x] feat: Add support for output data types in TRTInterpreter [2 / x] Jun 14, 2023
- Add argument for specification of output data types of TRT engines in
the interpreter, to avoid type mismatches at runtime
- Add support for output data type provision in the Dynamo compile path,
which simultaneously tests the feature via the backend testing and e2e
frameworks
@gs-olive gs-olive force-pushed the trt_interpreter_output_dtypes branch from 5b2e1cb to f38e9c8 Compare June 20, 2023 21:15
@gs-olive gs-olive changed the base branch from dynamo_compile_trt_module_next to main June 20, 2023 21:15
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to Python style guidelines

@gs-olive gs-olive changed the base branch from main to torch_version_upgrade_jun23_nightly June 20, 2023 21:17
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.

This is fine but can you create an issue to remove some of the vestigial components? Like output_fp16 should just populate the output_dtypes accordingly.

@gs-olive gs-olive merged commit 784ec9b into torch_version_upgrade_jun23_nightly Jun 20, 2023
@narendasan narendasan deleted the trt_interpreter_output_dtypes branch June 20, 2023 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants