supported cross serialization and runtime merge#4286
Conversation
narendasan
left a comment
There was a problem hiding this comment.
One minor thing then looks good
| from torch_tensorrt.dynamo.runtime._TRTEngine import TRTEngine | ||
|
|
||
| self.engine = TRTEngine( | ||
| self.engine = TRTEngine( # type: ignore[assignment] |
There was a problem hiding this comment.
Think you can just add a :Optional[torch.classes.tensorrt.Engine|TRTEngine] above
There was a problem hiding this comment.
It gives me lots of other errors:
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:234: error: Item "None" of "Any | None" has no attribute "streamable_device_memory_budget" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:237: error: Item "None" of "Any | None" has no attribute "automatic_device_memory_budget" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:240: error: Item "None" of "Any | None" has no attribute "device_memory_budget" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:245: error: Item "None" of "Any | None" has no attribute "device_memory_budget" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:246: error: Item "None" of "Any | None" has no attribute "device_memory_budget" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:248: error: Item "None" of "Any | None" has no attribute "device_memory_budget" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:254: error: Item "None" of "Any | None" has no attribute "reset_captured_graph" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:260: error: Item "None" of "Any | None" has no attribute "use_dynamically_allocated_resources" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:384: error: Unused "type: ignore" comment [unused-ignore]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:399: error: Item "None" of "Any | None" has no attribute "use_pre_allocated_outputs" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:409: error: Item "None" of "Any | None" has no attribute "use_output_allocator_outputs" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:467: error: Item "None" of "Any | None" has no attribute "set_output_tensors_as_unowned" [union-attr]
py/torch_tensorrt/dynamo/runtime/_TorchTensorRTModule.py:470: error: Item "None" of "Any | None" has no attribute "are_output_tensors_unowned" [union-attr]
067ebe3 to
a863aad
Compare
a863aad to
3474e91
Compare
narendasan
left a comment
There was a problem hiding this comment.
Looks fine, please get an additional reviewer and make sure we are testing Python only in CI as a separate line of jobs for each channel
| warnings.warn( | ||
| "`use_python_runtime` is deprecated and has no effect. The Python and C++ " | ||
| "runtimes have been merged; the runtime is now selected automatically based " | ||
| "on whether the C++ Torch-TensorRT runtime is available. This argument will " | ||
| "be removed in a future release.", | ||
| DeprecationWarning, | ||
| stacklevel=2, |
There was a problem hiding this comment.
What's the path to test in CI currently? Do we have two jobs for each {CUDA-VERSION, GPU, OS, Flavor} combination (I realize CUDA-VERSION, GPU is fixed for now and flavor here refers to TRT standard vs TRT-RTX) : one with wheels built and one without?
From my read of the CI files : https://github.com/pytorch/TensorRT/blob/main/.github/workflows/build-test-linux-x86_64.yml it seems we only exercise the C++ route (build wheel, install it and run tests, which should pick the C++ runtime)? Is that right, or is my understanding off?
If so, can we first have a an MR updating CI to run both tests with python and C++ runtime and then put in this change? We are developing C++/python runtime features in parallel for TRT-RTX and want to test both paths if possible. Thanks!
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: