-
Notifications
You must be signed in to change notification settings - Fork 364
feat: support aten.any related converters in dynamo #2578
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
Conversation
ff8f043
to
5a4daf6
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2024-01-05 04:37:44.368463+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2024-01-05 04:39:32.661484+00:00
@@ -2571,10 +2571,11 @@
src,
src.dtype,
force_layer=True,
)
+
@dynamo_tensorrt_converter(torch.ops.aten.any.default)
@dynamo_tensorrt_converter(torch.ops.aten.any.dim)
@dynamo_tensorrt_converter(torch.ops.aten.any.dims)
def aten_ops_any(
ctx: ConversionContext,
@@ -2589,6 +2590,6 @@
SourceIR.ATEN,
name,
args[0],
args_bounds_check(args, 1, replacement=[]),
args_bounds_check(args, 2, replacement=False),
- )
\ No newline at end of file
+ )
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.
Do you have a bool test case? Its probably a common variant of any
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.
Added a few suggestions on the implementation. Also needs a rebase to resolve merge conflict.
8fd1f4b
to
556d43a
Compare
556d43a
to
f80fd27
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.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2024-01-19 18:47:29.428220+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py 2024-01-19 18:49:20.020601+00:00
@@ -2623,10 +2623,11 @@
args[0],
args_bounds_check(args, 1, replacement=None),
args_bounds_check(args, 2, replacement=False),
)
+
@dynamo_tensorrt_converter(torch.ops.aten._pdist_forward.default)
@enforce_tensor_types(
{
0: (TRTTensor,),
}
f80fd27
to
56cca05
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.
Looks good to me; it seems that the test failures are unrelated to the PR.
Description
support aten.any converter
Type of change
Checklist: