-
Notifications
You must be signed in to change notification settings - Fork 363
Support new FX Legacy Registry in opset coverage tool #2366
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
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/tools/opset_coverage.py 2023-10-06 01:35:27.859438+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/tools/opset_coverage.py 2023-10-06 01:38:03.371191+00:00
@@ -144,14 +144,23 @@
_, registry_data = c_registry.get_all_converters_with_target(
target, return_registry_info=True
)
if registry_data is not None:
- if DYNAMO_REGISTRY_NAME in registry_data and registry_data[DYNAMO_REGISTRY_NAME] >= 1:
+ if (
+ DYNAMO_REGISTRY_NAME in registry_data
+ and registry_data[DYNAMO_REGISTRY_NAME] >= 1
+ ):
status = SupportStatus.CONVERTED
support_count += 1
- elif (FX_REGISTRY_NAME in registry_data and registry_data[FX_REGISTRY_NAME] >= 1) or (FX_LEGACY_REGISTRY_NAME in registry_data and registry_data[FX_LEGACY_REGISTRY_NAME] >= 1):
+ elif (
+ FX_REGISTRY_NAME in registry_data
+ and registry_data[FX_REGISTRY_NAME] >= 1
+ ) or (
+ FX_LEGACY_REGISTRY_NAME in registry_data
+ and registry_data[FX_LEGACY_REGISTRY_NAME] >= 1
+ ):
status = SupportStatus.LEGACY_CONVERTED
legacy_count += 1
support_status[target_str] = {
"schema": f"{target_str.split('.')[0]}.{opset_schemas[target_str]}",
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/tools/opset_coverage.py 2023-10-06 01:38:34.264390+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/tools/opset_coverage.py 2023-10-06 01:41:34.649301+00:00
@@ -144,14 +144,23 @@
_, registry_data = c_registry.get_all_converters_with_target(
target, return_registry_info=True
)
if registry_data is not None:
- if DYNAMO_REGISTRY_NAME in registry_data and registry_data[DYNAMO_REGISTRY_NAME] >= 1:
+ if (
+ DYNAMO_REGISTRY_NAME in registry_data
+ and registry_data[DYNAMO_REGISTRY_NAME] >= 1
+ ):
status = SupportStatus.CONVERTED
support_count += 1
- elif (FX_REGISTRY_NAME in registry_data and registry_data[FX_REGISTRY_NAME] >= 1) or (FX_LEGACY_REGISTRY_NAME in registry_data and registry_data[FX_LEGACY_REGISTRY_NAME] >= 1):
+ elif (
+ FX_REGISTRY_NAME in registry_data
+ and registry_data[FX_REGISTRY_NAME] >= 1
+ ) or (
+ FX_LEGACY_REGISTRY_NAME in registry_data
+ and registry_data[FX_LEGACY_REGISTRY_NAME] >= 1
+ ):
status = SupportStatus.LEGACY_CONVERTED
legacy_count += 1
else:
raise Exception(f"Op belongs to unknown registry: {registry_data}")
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/tools/opset_coverage.py 2023-10-06 01:41:32.426768+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/tools/opset_coverage.py 2023-10-06 01:44:53.379336+00:00
@@ -145,18 +145,18 @@
target, return_registry_info=True
)
if registry_data is not None:
if (
- DYNAMO_REGISTRY_NAME in registry_data
- and registry_data[DYNAMO_REGISTRY_NAME] >= 1
+ DYNAMO_REGISTRY_NAME in registry_data
+ and registry_data[DYNAMO_REGISTRY_NAME] >= 1
):
status = SupportStatus.CONVERTED
support_count += 1
elif (
- FX_REGISTRY_NAME in registry_data
- and registry_data[FX_REGISTRY_NAME] >= 1
+ FX_REGISTRY_NAME in registry_data
+ and registry_data[FX_REGISTRY_NAME] >= 1
) or (
FX_LEGACY_REGISTRY_NAME in registry_data
and registry_data[FX_LEGACY_REGISTRY_NAME] >= 1
):
status = SupportStatus.LEGACY_CONVERTED
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.
LGTM
Description
The opset_coverage.py tool was failing with the following error:
For some reason, some ATen and Prims ops appear with the registry name "FX Legacy ATen Converters Registry"
Type of change
Checklist: