[fx2trt] Add acc_ops.sign and converter for it (#63876)
authorShiyan Deng <dsy842974287@fb.com>
Tue, 31 Aug 2021 18:29:07 +0000 (11:29 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 31 Aug 2021 18:31:53 +0000 (11:31 -0700)
commit845bc89811f59822fe585cf44e774857adefcff7
tree58b85f92b776c62b1e68140c3a6532ded5de58d8
parent83e28a7d281c91a6d1a12b86bd5fb212dd424a85
[fx2trt] Add acc_ops.sign and converter for it (#63876)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63876

Add `acc_ops.sign` which maps from `torch.sign`.

Add a plugin (not support dynamic shape currently) for `acc_ops.sign`. The plugin calls `at::sign` directly.

Test Plan: buck test mode/opt -c python.package_style=inplace -c fbcode.nvcc_arch=a100 caffe2/torch/fb/fx2trt:test_unary_ops

Reviewed By: yinghai

Differential Revision: D30518081

fbshipit-source-id: a0b9e6c30deac0b04b8cb09a162579e229985330
torch/fx/experimental/fx2trt/converters/acc_ops_converters.py
torch/fx/experimental/fx2trt/fx2trt.py
torch/fx/experimental/fx_acc/acc_ops.py