Skip to content
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

Add operators necessary for mobilenet #29

Merged
merged 15 commits into from
Mar 31, 2020

Conversation

narendasan
Copy link
Collaborator

  • Adds reduce ops and hardtanh.
  • Enhances Args to check types before unwrapping.
  • Adds a method to the conversion context to reduce boiler plate in the converters
  • Conversion now checks to see that all Values have corresponding ITensors, and emits a warning otherwise. This means the contract for converters has changed, now they must declare an association for all output tensors for suppress this warning (even if its a nullptr).
  • ConvertersLUT key changed to c10::OperatorName to support operator overloading in TorchScript
  • Fixes a bug in linear which would include the batch size when flattening
  • Adds a slightly reduced threshold to module level tests

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
and add some checking

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
values and tensors to a method in the conversion ctx

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
c10::OperatorName allowing support for different converters for
overloaded operators

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
have tensor matches, and move to checking with execptions instead of
bool returns for the conversion stage

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
converter

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
as to not exhaust GPU memory

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
layers other than conv, did not remove batch size from tensor shape

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
reduction dimensions

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
Perhaps revisit in the future to see if we can reduce this back

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
functions

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
basic reduction operators

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
@narendasan narendasan added component: tests Issues re: Tests component: core Issues re: The core compiler component: converters Issues re: Specific op converters labels Mar 31, 2020
old comments

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
@narendasan narendasan merged commit aef6003 into pytorch:master Mar 31, 2020
@narendasan narendasan deleted the mobilenet branch March 31, 2020 07:44
@narendasan narendasan linked an issue Apr 1, 2020 that may be closed by this pull request
2 tasks
frank-wei pushed a commit that referenced this pull request Jun 4, 2022
Summary:
Pull Request resolved: https://github.com/pytorch/fx2trt/pull/29

BERT_pytorch model in torchbench:
1. masked_fill, repeat
2. fix a nit in embedding op

Reviewed By: yinghai, wushirong

Differential Revision: D35034664

fbshipit-source-id: 2c0e66df5a17f6960d71c3bc6e9bdca9a5daf3e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Solidify Arg class
1 participant