Reorg for converters in hardtanh(FX Converter Refactor [5/N]) <Target: converter_reorg_proto>#1901
Merged
narendasan merged 1 commit intomainfrom May 30, 2023
Merged
Conversation
There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- py/torch_tensorrt/fx/converters/aten_ops_converters.py 2023-05-10 05:48:48.094928 +0000
+++ py/torch_tensorrt/fx/converters/aten_ops_converters.py 2023-05-10 05:49:06.307517 +0000
@@ -216,11 +216,11 @@
SourceIR.ATEN,
name,
args[0],
)
-
+
@tensorrt_converter(torch.ops.aten.linear)
def aten_ops_linear(
network: TRTNetwork,
target: Target,
args: Tuple[Argument, ...],
--- py/torch_tensorrt/fx/converters/nn_ops_converters.py 2023-05-10 05:48:48.094928 +0000
+++ py/torch_tensorrt/fx/converters/nn_ops_converters.py 2023-05-10 05:49:06.689486 +0000
@@ -33,6 +33,6 @@
network=network,
target="torch.nn.modules.activation.Hardtanh",
source_ir=SourceIR.NN,
name=layer_name,
input_val=kwargs["input"],
- )
\ No newline at end of file
+ )
--- py/torch_tensorrt/fx/converters/acc_ops_converters.py 2023-05-10 05:48:48.094928 +0000
+++ py/torch_tensorrt/fx/converters/acc_ops_converters.py 2023-05-10 05:49:08.587441 +0000
@@ -3596,11 +3596,11 @@
target,
SourceIR.ATEN,
name,
args[0],
)
-
+
@tensorrt_converter(acc_ops.interpolate)
def acc_ops_interpolate(
network: TRTNetwork,
target: Target,
--- py/torch_tensorrt/fx/test/converters/aten_op/test_hard_tanh_aten.py 2023-05-10 05:48:48.098928 +0000
+++ py/torch_tensorrt/fx/test/converters/aten_op/test_hard_tanh_aten.py 2023-05-10 05:49:08.918275 +0000
@@ -48,6 +48,6 @@
TestModule(), input_specs, expected_ops={torch.ops.aten.hardtanh.default}
)
if __name__ == "__main__":
- run_tests()
\ No newline at end of file
+ run_tests()There was a problem hiding this comment.
There are some changes that do not conform to Python style guidelines:
--- py/torch_tensorrt/fx/converters/aten_ops_converters.py 2023-05-11 23:31:10.187297 +0000
+++ py/torch_tensorrt/fx/converters/aten_ops_converters.py 2023-05-11 23:31:26.881529 +0000
@@ -209,17 +209,11 @@
kwargs: Dict[str, Argument],
name: str,
) -> Union[TRTTensor, Sequence[TRTTensor]]:
return activation.hardtanh(
- network,
- target,
- SourceIR.ATEN,
- name,
- args[0],
- args[1],
- args[2]
+ network, target, SourceIR.ATEN, name, args[0], args[1], args[2]
)
@tensorrt_converter(torch.ops.aten.linear)
def aten_ops_linear(
--- py/torch_tensorrt/fx/converters/impl/activation.py 2023-05-11 23:31:10.187297 +0000
+++ py/torch_tensorrt/fx/converters/impl/activation.py 2023-05-11 23:31:27.090627 +0000
@@ -93,11 +93,11 @@
source_ir,
name,
operation_type,
input_val,
alpha,
- beta,
+ beta,
dyn_range_fn=hardtanh_dyn_range_fn,
)
def relu(
--- py/torch_tensorrt/fx/converters/acc_ops_converters.py 2023-05-11 23:31:10.187297 +0000
+++ py/torch_tensorrt/fx/converters/acc_ops_converters.py 2023-05-11 23:31:28.868334 +0000
@@ -3596,11 +3596,11 @@
target,
SourceIR.ATEN,
name,
kwargs["input"],
kwargs["min_val"],
- kwargs["max_val"]
+ kwargs["max_val"],
)
@tensorrt_converter(acc_ops.interpolate)
def acc_ops_interpolate(1696cd2 to
12f545c
Compare
e91a5ca to
d438eaa
Compare
wushirong
approved these changes
May 25, 2023
corrections and correcting python linting correcting linting error correcting nn_ops_converter.py Fixing acc op
d438eaa to
5fd8003
Compare
narendasan
pushed a commit
that referenced
this pull request
Jun 2, 2023
…: converter_reorg_proto> (#1901)
narendasan
pushed a commit
that referenced
this pull request
Jun 2, 2023
…: converter_reorg_proto> (#1901)
narendasan
pushed a commit
that referenced
this pull request
Jun 3, 2023
…: converter_reorg_proto> (#1901)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.