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

Dynamic support for split #2871

Merged
merged 5 commits into from
Jun 7, 2024
Merged

Conversation

cehongwang
Copy link
Collaborator

@cehongwang cehongwang commented May 30, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Updated and added test cases for dynamic shape of split function
Add dynamic shape support tag in function decorator of converter

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

@cehongwang cehongwang requested a review from peri044 May 30, 2024 21:44
@github-actions github-actions bot added component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels May 30, 2024
@github-actions github-actions bot requested a review from gs-olive May 30, 2024 21:44
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/tests/py/dynamo/conversion/test_split_aten.py	2024-05-30 21:44:49.741396+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/test_split_aten.py	2024-05-30 21:46:43.525899+00:00
@@ -135,11 +135,11 @@
            Input(
                dtype=torch.float32,
                min_shape=[1, 10, 1],
                opt_shape=[1, 10, 10],
                max_shape=[1, 10, 10],
-                name = "input",
+                name="input",
            ),
        ]
        self.run_test_with_dynamic_shape(
            TestModule(),
            input_specs,
@@ -163,18 +163,17 @@
            Input(
                dtype=torch.float32,
                min_shape=[1, 10, 10],
                opt_shape=[3, 10, 10],
                max_shape=[5, 10, 10],
-                name = "input",
+                name="input",
            ),
        ]
        self.run_test_with_dynamic_shape(
            TestModule(),
            input_specs,
        )
-

    @parameterized.expand(
        [
            ("select_chunk_dim", 6, 0),
        ]

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/tests/py/dynamo/conversion/test_split_aten.py	2024-05-30 21:44:48.482825+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/test_split_aten.py	2024-05-30 21:47:47.511710+00:00
@@ -135,11 +135,11 @@
            Input(
                dtype=torch.float32,
                min_shape=[1, 10, 1],
                opt_shape=[1, 10, 10],
                max_shape=[1, 10, 10],
-                name = "input",
+                name="input",
            ),
        ]
        self.run_test_with_dynamic_shape(
            TestModule(),
            input_specs,
@@ -163,18 +163,17 @@
            Input(
                dtype=torch.float32,
                min_shape=[1, 10, 10],
                opt_shape=[3, 10, 10],
                max_shape=[5, 10, 10],
-                name = "input",
+                name="input",
            ),
        ]
        self.run_test_with_dynamic_shape(
            TestModule(),
            input_specs,
        )
-

    @parameterized.expand(
        [
            ("select_chunk_dim", 6, 0),
        ]

@narendasan
Copy link
Collaborator

@cehongwang have you set up the precommit system, it can help you with the linting?

Copy link
Collaborator

@peri044 peri044 left a comment

Choose a reason for hiding this comment

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

changes LGTM. pending CI

@narendasan narendasan merged commit e5afe0f into dyn_validator_cp Jun 7, 2024
46 of 51 checks passed
@narendasan narendasan deleted the dynamic-support-for-split branch June 7, 2024 00:49
peri044 pushed a commit that referenced this pull request Jun 12, 2024
peri044 pushed a commit that referenced this pull request Jun 13, 2024
peri044 added a commit that referenced this pull request Jun 13, 2024
Co-authored-by: cehongwang <123616592+cehongwang@users.noreply.github.com>
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: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants