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

refactor: Address some issues with enums and overhaul documentation #2974

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

narendasan
Copy link
Collaborator

Description

Addresses some issues with enums and refactors the documentation to more clearly reflect the current state of the project

Fixes #2902

Type of change

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

  • Bug fix (non-breaking change which fixes an issue)
  • 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 documentation Improvements or additions to documentation component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: build system Issues re: Build system component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Jul 1, 2024
@github-actions github-actions bot requested a review from peri044 July 1, 2024 17:10
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	2024-07-01 17:10:40.348842+00:00
+++ /home/runner/work/TensorRT/TensorRT/docsrc/conf.py	2024-07-01 17:12:30.584635+00:00
@@ -187,11 +187,11 @@
    "ConverterImplSignature": "ConverterImplSignature",
}

nbsphinx_execute = "never"

-autodoc_member_order = 'groupwise'
+autodoc_member_order = "groupwise"

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

from docutils import nodes

py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
py/torch_tensorrt/_enums.py Outdated Show resolved Hide resolved
@HolyWu
Copy link
Contributor

HolyWu commented Jul 2, 2024

I suggest that you can add a codespell workflow which is quite handy for checking common misspellings.

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/py/torch_tensorrt/dynamo/utils.py	2024-07-02 18:31:52.897696+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/dynamo/utils.py	2024-07-02 18:44:37.254421+00:00
@@ -369,10 +369,11 @@
                return f(*args, **kwargs)

        return function_wrapper

    return nested_decorator
+

def check_output(
    new_module: torch.fx.GraphModule,
    refitted_module: torch.fx.GraphModule,
    inputs: tuple[Any, ...],
@@ -383,6 +384,6 @@
            new_outputs, torch.Tensor
        ):
            if not torch.allclose(old_output, new_output, 1e-2, 1e-2):
                return False

-    return True
\ No newline at end of file
+    return True

@github-actions github-actions bot added the component: lowering Issues re: The lowering / preprocessing passes label Jul 2, 2024
Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>

ci: Adding typos pre-commit

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
Copy link
Collaborator

@zewenli98 zewenli98 left a comment

Choose a reason for hiding this comment

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

LGTM

@narendasan narendasan merged commit 250b9b7 into main Jul 8, 2024
55 of 61 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: build system Issues re: Build system 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: runtime component: tests Issues re: Tests documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] BF16 causing unspported numpy dtype error in create_constant
4 participants