Skip to content

✨[Feature] Compilation Dry-Run in Dynamo #2081

Closed
@gs-olive

Description

@gs-olive
Collaborator

Context

While many key aten converters are under development, the end-to-end performance of certain key models is greatly affected by segmentation. For instance, with min_block_size=5 we obtain nearly 100 distinct TRT Engines in the graph, as of the current main. This is an unreasonable amount of segmentation, which slows down inference. A temporary solution to this is to increase the block size via min_block_size, however this has the implication that every converter benefits the same from acceleration, which is not necessarily the case. For instance, convolution may benefit from conversion much more than add or sub.

Feature Proposal

In the converter registry, each converter can be assigned a weight based on the operation it is converting and the relative speedup which it would gain from conversion. For instance, convolution could have a weight of 5, while add has a weight of 1. From here, there are a few options for picking better segments:

  • Ensure the weighted sum of the converter weights is at least min_block_size
  • Remove min_block_size in favor of a simpler heuristic like allowed_segmentation - {"none", "minimal", "moderate", "large", "most"}

Activity

self-assigned this
on Jul 6, 2023
github-actions

github-actions commented on Oct 5, 2023

@github-actions

This issue has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days

narendasan

narendasan commented on Oct 23, 2023

@narendasan
Collaborator

Refocus on dry run providing rough recommendations and statistics on the graph partitioning

gs-olive

gs-olive commented on Oct 24, 2023

@gs-olive
CollaboratorAuthor

See #2413 for an adjacent feature request discussing dry-run mode.

changed the title [-]✨[Feature] Engine prioritization scheme for Dynamo[/-] [+]✨[Feature] Compilation Dry-Run in Dynamo[/+] on Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Story: Dynamo Compile ImprovementsIssues relating to improvement of the Dynamo compile pathStory: Export/Compile UnificationIssues relating to unification of Dynamo compile/export pathscomponent: dynamoIssues relating to the `torch.compile` or `torch._dynamo.export` pathsfeature requestNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @narendasan@gs-olive

    Issue actions

      ✨[Feature] Compilation Dry-Run in Dynamo · Issue #2081 · pytorch/TensorRT