Skip to content

Conversation

andi4191
Copy link
Contributor

@andi4191 andi4191 commented Apr 21, 2022

Signed-off-by: Anurag Dixit [email protected]

Description

Aligned with prim::Enter API update in module fallback

Fixes # (issue)

Type of change

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

  • Bug fix (non-breaking change which fixes an issue)

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

@andi4191 andi4191 requested a review from narendasan April 21, 2022 02:14
@andi4191 andi4191 self-assigned this Apr 21, 2022
@github-actions github-actions bot added component: core Issues re: The core compiler component: lowering Issues re: The lowering / preprocessing passes labels Apr 21, 2022
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 C++ style guidelines:

diff --git a/workspace/core/lowering/register_trt_placeholder_ops.cpp b/tmp/changes.txt
index 5ba8171..17d7d3f 100644
--- a/workspace/core/lowering/register_trt_placeholder_ops.cpp
+++ b/tmp/changes.txt
@@ -10,7 +10,10 @@ c10::AliasAnalysisKind aliasAnalysisFromSchema() {
RegisterOperators trt_placeholder_ops_reg({
    /// Op marks a Tensor to be conveted from an Torch Tensor
    /// to a TRT constant Tensor
-    Operator("trt::const(Tensor val) -> Tensor", [](Stack& stack) { /*noop*/ }, aliasAnalysisFromSchema()),
+    Operator(
+        "trt::const(Tensor val) -> Tensor",
+        [](Stack& stack) { /*noop*/ },
+        aliasAnalysisFromSchema()),
});

} // namespace jit
ERROR: Some files do not conform to 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 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 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.

There are some changes that do not conform to C++ style guidelines:

diff --git a/workspace/core/lowering/register_trt_placeholder_ops.cpp b/tmp/changes.txt
index 5ba8171..17d7d3f 100644
--- a/workspace/core/lowering/register_trt_placeholder_ops.cpp
+++ b/tmp/changes.txt
@@ -10,7 +10,10 @@ c10::AliasAnalysisKind aliasAnalysisFromSchema() {
RegisterOperators trt_placeholder_ops_reg({
    /// Op marks a Tensor to be conveted from an Torch Tensor
    /// to a TRT constant Tensor
-    Operator("trt::const(Tensor val) -> Tensor", [](Stack& stack) { /*noop*/ }, aliasAnalysisFromSchema()),
+    Operator(
+        "trt::const(Tensor val) -> Tensor",
+        [](Stack& stack) { /*noop*/ },
+        aliasAnalysisFromSchema()),
});

} // namespace jit
ERROR: Some files do not conform to style guidelines

@narendasan narendasan added the Upstreaming PR Upstreaming changes from an NGC release branch label Apr 21, 2022
@peri044
Copy link
Collaborator

peri044 commented Apr 24, 2022

@andi4191 Can you briefly explain what these changes are doing ?

@andi4191
Copy link
Contributor Author

andi4191 commented Apr 25, 2022

@peri044 : This PR is using a compilation_context node for each prim::Enter and prim::Exit in the segmented blocks to align with the API update in torch. prim::Enter expects a Tensor as the argument. This issue was identified in DLFW staging.

@narendasan: The changes should be fine for master branch, right? Or should we keep it restricted to release/ngc/* branch for now?

@andi4191
Copy link
Contributor Author

/nvidia-ci

@andi4191 andi4191 force-pushed the anuragd/module_fallback_fix branch from 0a738cb to b8c398a Compare May 11, 2022 19:30
@andi4191
Copy link
Contributor Author

@narendasan @peri044 : Verified this fix working on ToT. Please review.

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

@narendasan narendasan added component: lowering Issues re: The lowering / preprocessing passes and removed component: lowering Issues re: The lowering / preprocessing passes labels May 20, 2022
Copy link
Collaborator

@narendasan narendasan 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 2c787ad into master May 23, 2022
@narendasan narendasan deleted the anuragd/module_fallback_fix branch May 23, 2022 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: core Issues re: The core compiler component: lowering Issues re: The lowering / preprocessing passes Upstreaming PR Upstreaming changes from an NGC release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants