From c9382c69a9962bcbf51780a433c955b5d6dcd6f3 Mon Sep 17 00:00:00 2001 From: kairos03 Date: Fri, 25 Mar 2022 13:42:19 +0900 Subject: [PATCH 1/2] Add torch.Tensor.transpose converter --- torch2trt/converters/transpose.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/torch2trt/converters/transpose.py b/torch2trt/converters/transpose.py index c5131592..440cf274 100644 --- a/torch2trt/converters/transpose.py +++ b/torch2trt/converters/transpose.py @@ -3,6 +3,7 @@ @tensorrt_converter("torch.transpose", enabled=trt_version() < '7.0') +@tensorrt_converter("torch.Tensor.transpose", enabled=trt_version() < '7.0') def convert_transpose(ctx): input = ctx.method_args[0] input_trt = add_missing_trt_tensors(ctx.network, [input])[0] @@ -19,6 +20,7 @@ def convert_transpose(ctx): @tensorrt_converter('torch.transpose', enabled=trt_version() >= '7.0') +@tensorrt_converter('torch.Tensor.transpose', enabled=trt_version() >= '7.0') def convert_transpose_trt7(ctx): input = ctx.method_args[0] input_trt = add_missing_trt_tensors(ctx.network, [input])[0] From 58d0080b23da67021a002a28d567ec51278faeeb Mon Sep 17 00:00:00 2001 From: kairos03 Date: Fri, 25 Mar 2022 13:53:44 +0900 Subject: [PATCH 2/2] I have read and agree to the Contributor License Agreement as written in the file CLA.md of this project. Signed, Eunseop Shin --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index cd3a32f5..d87d8d0c 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,6 +5,7 @@ who have agreed to torch2trt's Contributor License Agreement. - [John Welsh](https://github.com/jaybdub) (CLA) - John Welsh +- [Eunseop Shin](https://github.com/kairos03) (CLA) ## Becoming a Contributor