-
Notifications
You must be signed in to change notification settings - Fork 360
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
Reorg for converters in hardtanh(FX Converter Refactor [5/N]) <Target: converter_reorg_proto> #1901
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
1696cd2
to
12f545c
Compare
e91a5ca
to
d438eaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to C++ style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code conforms to Python style guidelines
corrections and correcting python linting correcting linting error correcting nn_ops_converter.py Fixing acc op
d438eaa
to
5fd8003
Compare
…: converter_reorg_proto> (#1901)
…: converter_reorg_proto> (#1901)
…: converter_reorg_proto> (#1901)
No description provided.