Skip to content

supported cross serialization and runtime merge#4286

Open
cehongwang wants to merge 2 commits into
mainfrom
cross-serialization
Open

supported cross serialization and runtime merge#4286
cehongwang wants to merge 2 commits into
mainfrom
cross-serialization

Conversation

@cehongwang
Copy link
Copy Markdown
Collaborator

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

@meta-cla meta-cla Bot added the cla signed label May 21, 2026
@github-actions github-actions Bot added component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: runtime component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels May 21, 2026
@github-actions github-actions Bot requested a review from narendasan May 21, 2026 21:59
Copy link
Copy Markdown
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.

One minor thing then looks good

from torch_tensorrt.dynamo.runtime._TRTEngine import TRTEngine

self.engine = TRTEngine(
self.engine = TRTEngine( # type: ignore[assignment]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Think you can just add a :Optional[torch.classes.tensorrt.Engine|TRTEngine] above

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants