Skip to content

Add trt_executed_modules & default_torch_execution interface #1122

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

Closed
wants to merge 2 commits into from

Conversation

Njuapp
Copy link
Contributor

@Njuapp Njuapp commented Jun 16, 2022

Signed-off-by: Cheng Hang [email protected]

Description

According to the current design, every module is by default compiled to TensorRT execpt those modules included in torch_executed_modules.

However, in some cases, for example, a multi-modal model where ResNet and BERT are present, BERT is optimized by custom op implementation (FasterTransformer). Developers may only want to compile ResNet, and leave everything in BERT (embedding, custom op, FC) run in torch. Although it is fine to explicitly assign values for torch_executed_modules, it will be much more convenient to have an interface like trt_executed_modules, and a switch-mode interface like default_torch_execution.

When the switch is turned on, every module would by default run in Torch, and only modules explicitly included in trt_executed_modules would be compiled.

Fixes # ()

Type of change

Please delete options that are not relevant and/or add your own.

  • New feature (non-breaking change which adds functionality)
  • 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

@github-actions github-actions bot added component: api [Python] Issues re: Python API component: core Issues re: The core compiler component: lowering Issues re: The lowering / preprocessing passes labels Jun 16, 2022
@narendasan narendasan added the WIP Work is in progress, pull request should not be merged yet label Jun 17, 2022
@narendasan
Copy link
Collaborator

Notes left on the design in the RFC #1119. This PR should be WIP until the design is finalized

@github-actions
Copy link

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

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: lowering Issues re: The lowering / preprocessing passes No Activity WIP Work is in progress, pull request should not be merged yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants