Skip to content

📖 [Story] Sharing Components between Torch export and compile Paths in Torch-TRT #1940

Closed
@gs-olive

Description

@gs-olive

TL;DR

Many of the existing and future proposed components for the torch_tensorrt.dynamo.fx_ts_compat (Torch export) and torch_tensorrt.dynamo.backend (Torch compile) paths are common between the two. This includes some lowering phases, aten converters, certain aspects of partitioning, and TRT modules. The goal of this story is to improve the unification between the two frontends to streamline the codebase and reduce code replication.

Goal(s)

  • Unification of the components used in the torch_tensorrt.dynamo.fx_ts_compat (Torch export) and torch_tensorrt.dynamo.backend (Torch compile) paths
  • Improving code cleanliness and reducing code replication
  • Centralizing component/unit tests
  • Increasing speed to diagnose, fix, and push changes for key issues

Implementation Phases

  1. Unify existing components of fx_ts_compat and backend that could reasonably be used together
  2. Combine lowering phases + testing for both paths
  3. Combine partitioning systems + testing for both paths (or determine plan/rationale for having two separate partitioning systems)
  4. Add a TRTInterpreter override class to dynamo for usage between the two frontends
  5. Add a TRTModule override class to dynamo for usage between the two frontends

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions