-
Notifications
You must be signed in to change notification settings - Fork 863
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
T5 Translation with torch.compile & TensorRT backend #3223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, example discoverability would increase if we start from examples/torch_compile. Otherwise LGTM
- Verified to be working with `torch-tensorrt==2.3.0` | ||
Installation instructions can be found in [pytorch/TensorRT](https://github.com/pytorch/TensorRT) | ||
|
||
Change directory to examples directory `cd examples/torch_tensorrt/T5/torchcompile` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we revert the order and do examples/torch_compile/tensor_rt instead? Then we could move all examples/pt2 into there too so people find everything about compile in a single place? I assume there will be no other integration point for TRT in the future other than compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For tensorrt, onnx, we actually want the starting point to be tensorrt, onnx, since customers are looking specifically for these. There are github issues where customers are still looking for an onnx example. Will add an example on onnx next
# read configs for the mode, model_name, etc. from the handler config | ||
model_path = self.model_yaml_config.get("handler", {}).get("model_path", None) | ||
if not model_path: | ||
logger.warning("Missing model path") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. Thanks
Co-authored-by: Matthias Reso <13337103+mreso@users.noreply.github.com>
review comments
Description
This PR shows how to serve T5 model for translation with TensorRT using torch.compile
Fixes #(issue)
Type of change
Please delete options that are not relevant.
Feature/Issue validation/testing
Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.
Test A
Logs for Test A
Test B
Logs for Test B
Checklist: