Skip to content
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

2.0 docs overhaul #2420

Merged
merged 4 commits into from
Oct 31, 2023
Merged

2.0 docs overhaul #2420

merged 4 commits into from
Oct 31, 2023

Conversation

narendasan
Copy link
Collaborator

Description

Restructures the documentation for 2.x.

@peri044: You need to implement the export function we discussed and make sure the docs match. Please just commit directly to this branch if there isnt another branch for it already. If there is let me know so I can adjust the docs.

N.b. This adjusts some imports to make more sense from a user prespective (cc: @gs-olive)

Fixes: #1924

Type of change

Please delete options that are not relevant and/or add your own.

  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@github-actions github-actions bot added component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: torch_compile documentation Improvements or additions to documentation labels Oct 30, 2023
Copy link

@github-actions github-actions bot left a 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

Copy link

@github-actions github-actions bot left a 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/docsrc/conf.py	2023-10-30 07:40:46.334258+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2023-10-30 07:43:30.556347+00:00
@@ -173,17 +173,17 @@
cpp_id_attributes = ["TORCHTRT_API"]

# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"

-autodoc_typehints_format = 'short'
+autodoc_typehints_format = "short"
python_use_unqualified_type_names = True

autodoc_type_aliases = {
-    'LegacyConverterImplSignature': 'LegacyConverterImplSignature',
-    'DynamoConverterImplSignature': 'DynamoConverterImplSignature',
-    'ConverterImplSignature': 'ConverterImplSignature',
+    "LegacyConverterImplSignature": "LegacyConverterImplSignature",
+    "DynamoConverterImplSignature": "DynamoConverterImplSignature",
+    "ConverterImplSignature": "ConverterImplSignature",
}

# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
# See http://stackoverflow.com/a/41184353/3343043

Copy link

@github-actions github-actions bot left a 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/docsrc/conf.py	2023-10-30 07:40:45.781026+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2023-10-30 07:43:35.157682+00:00
@@ -173,17 +173,17 @@
cpp_id_attributes = ["TORCHTRT_API"]

# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"

-autodoc_typehints_format = 'short'
+autodoc_typehints_format = "short"
python_use_unqualified_type_names = True

autodoc_type_aliases = {
-    'LegacyConverterImplSignature': 'LegacyConverterImplSignature',
-    'DynamoConverterImplSignature': 'DynamoConverterImplSignature',
-    'ConverterImplSignature': 'ConverterImplSignature',
+    "LegacyConverterImplSignature": "LegacyConverterImplSignature",
+    "DynamoConverterImplSignature": "DynamoConverterImplSignature",
+    "ConverterImplSignature": "ConverterImplSignature",
}

# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
# See http://stackoverflow.com/a/41184353/3343043

Copy link

@github-actions github-actions bot left a 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

@github-actions github-actions bot added the component: converters Issues re: Specific op converters label Oct 30, 2023
Copy link

@github-actions github-actions bot left a 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/docsrc/conf.py	2023-10-30 16:01:58.869498+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2023-10-30 16:04:31.338494+00:00
@@ -173,17 +173,17 @@
cpp_id_attributes = ["TORCHTRT_API"]

# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"

-autodoc_typehints_format = 'short'
+autodoc_typehints_format = "short"
python_use_unqualified_type_names = True

autodoc_type_aliases = {
-    'LegacyConverterImplSignature': 'LegacyConverterImplSignature',
-    'DynamoConverterImplSignature': 'DynamoConverterImplSignature',
-    'ConverterImplSignature': 'ConverterImplSignature',
+    "LegacyConverterImplSignature": "LegacyConverterImplSignature",
+    "DynamoConverterImplSignature": "DynamoConverterImplSignature",
+    "ConverterImplSignature": "ConverterImplSignature",
}

# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
# See http://stackoverflow.com/a/41184353/3343043

Copy link

@github-actions github-actions bot left a 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

Copy link
Collaborator

@gs-olive gs-olive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes overall look great - added a few comments on documentation and linting.

docsrc/index.rst Outdated Show resolved Hide resolved
@@ -1,22 +1,22 @@
.. _dynamo_export:

Torch-TensorRT Dynamo Backend
Torch-TensorRT Dynamo Frontend
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be renamed "AOT Path". Otherwise, the section (currently) looks like:

Dynamo Frontend
|
--- Torch-TensorRT torch.compile Backend
--- Torch-TensorRT Dynamo Frontend

Additionally, the words "backend" and "frontend" are used often in both articles, so the real meaning becomes more challenging to discern.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In line with the above, could this be "Torch-TensorRT torch.compile JIT Path"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to call it

  • "TensorRT backend for torch.compile"
  • "Torch-TensorRT Dynamo Frontend" or even "Compiling torch.export.ExportedPrograms"

docsrc/contributors/dynamo_converters.rst Outdated Show resolved Hide resolved
docsrc/contributors/dynamo_converters.rst Outdated Show resolved Hide resolved
docsrc/contributors/dynamo_converters.rst Outdated Show resolved Hide resolved
py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a 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

Copy link

@github-actions github-actions bot left a 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/docsrc/conf.py	2023-10-30 19:21:51.287971+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2023-10-30 19:24:50.213758+00:00
@@ -173,17 +173,17 @@
cpp_id_attributes = ["TORCHTRT_API"]

# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"

-autodoc_typehints_format = 'short'
+autodoc_typehints_format = "short"
python_use_unqualified_type_names = True

autodoc_type_aliases = {
-    'LegacyConverterImplSignature': 'LegacyConverterImplSignature',
-    'DynamoConverterImplSignature': 'DynamoConverterImplSignature',
-    'ConverterImplSignature': 'ConverterImplSignature',
+    "LegacyConverterImplSignature": "LegacyConverterImplSignature",
+    "DynamoConverterImplSignature": "DynamoConverterImplSignature",
+    "ConverterImplSignature": "ConverterImplSignature",
}

# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
# See http://stackoverflow.com/a/41184353/3343043

@github-actions github-actions bot added the component: tests Issues re: Tests label Oct 30, 2023
Copy link

@github-actions github-actions bot left a 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

Copy link

@github-actions github-actions bot left a 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/docsrc/conf.py	2023-10-30 22:33:08.829725+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2023-10-30 22:35:59.936332+00:00
@@ -173,17 +173,17 @@
cpp_id_attributes = ["TORCHTRT_API"]

# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"

-autodoc_typehints_format = 'short'
+autodoc_typehints_format = "short"
python_use_unqualified_type_names = True

autodoc_type_aliases = {
-    'LegacyConverterImplSignature': 'LegacyConverterImplSignature',
-    'DynamoConverterImplSignature': 'DynamoConverterImplSignature',
-    'ConverterImplSignature': 'ConverterImplSignature',
+    "LegacyConverterImplSignature": "LegacyConverterImplSignature",
+    "DynamoConverterImplSignature": "DynamoConverterImplSignature",
+    "ConverterImplSignature": "ConverterImplSignature",
}

# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
# See http://stackoverflow.com/a/41184353/3343043

Copy link

@github-actions github-actions bot left a 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

Copy link

@github-actions github-actions bot left a 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/docsrc/conf.py	2023-10-30 22:40:26.395976+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2023-10-30 22:43:23.047029+00:00
@@ -173,17 +173,17 @@
cpp_id_attributes = ["TORCHTRT_API"]

# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"

-autodoc_typehints_format = 'short'
+autodoc_typehints_format = "short"
python_use_unqualified_type_names = True

autodoc_type_aliases = {
-    'LegacyConverterImplSignature': 'LegacyConverterImplSignature',
-    'DynamoConverterImplSignature': 'DynamoConverterImplSignature',
-    'ConverterImplSignature': 'ConverterImplSignature',
+    "LegacyConverterImplSignature": "LegacyConverterImplSignature",
+    "DynamoConverterImplSignature": "DynamoConverterImplSignature",
+    "ConverterImplSignature": "ConverterImplSignature",
}

# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
# See http://stackoverflow.com/a/41184353/3343043

Naren Dasan and others added 3 commits October 31, 2023 14:09
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Dheeraj Peri <[email protected]>

chore: updates to export API

Signed-off-by: Dheeraj Peri <[email protected]>
Copy link

@github-actions github-actions bot left a 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/docsrc/conf.py	2023-10-31 21:11:38.487313+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2023-10-31 21:14:11.483794+00:00
@@ -173,11 +173,11 @@
cpp_id_attributes = ["TORCHTRT_API"]

# Tell sphinx what the pygments highlight language should be.
highlight_language = "cpp"

-autodoc_typehints_format = 'short'
+autodoc_typehints_format = "short"
python_use_unqualified_type_names = True

autodoc_type_aliases = {
    "LegacyConverterImplSignature": "LegacyConverterImplSignature",
    "DynamoConverterImplSignature": "DynamoConverterImplSignature",

Copy link

@github-actions github-actions bot left a 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

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
Copy link

@github-actions github-actions bot left a 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

Copy link

@github-actions github-actions bot left a 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

@peri044 peri044 merged commit 729cef5 into main Oct 31, 2023
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes component: tests Issues re: Tests component: torch_compile documentation Improvements or additions to documentation fx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor FX Documentation for Website
4 participants