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

fix: fix misleading skipping partitioning msg #1289

Merged
merged 1 commit into from
Aug 19, 2022
Merged

Conversation

bowang007
Copy link
Collaborator

@bowang007 bowang007 commented Aug 18, 2022

Signed-off-by: Bo Wang bowa@nvidia.com

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 #1276

Type of change

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 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

Signed-off-by: Bo Wang <bowa@nvidia.com>
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/compiler.cpp b/tmp/changes.txt
index 898f2f1..bf128b7 100644
--- a/workspace/core/compiler.cpp
+++ b/tmp/changes.txt
@@ -426,7 +426,8 @@ torch::jit::Module CompileGraph(const torch::jit::Module& mod, CompileSpec cfg)
      auto outputIsCollection = conversion::OutputIsCollection(g->block());
      if (cfg.partition_info.enabled &&
          (cfg.lower_info.forced_fallback_modules.size() == 0 &&
-           cfg.partition_info.forced_fallback_operators.size() == 0 && isBlockConvertible) && !outputIsCollection) {
+           cfg.partition_info.forced_fallback_operators.size() == 0 && isBlockConvertible) &&
+          !outputIsCollection) {
        LOG_INFO("Skipping partitioning since model is fully supported");
      }

diff --git a/workspace/core/conversion/converters/impl/select.cpp b/tmp/changes.txt
index 20a03f6..6c8f5dd 100644
--- a/workspace/core/conversion/converters/impl/select.cpp
+++ b/tmp/changes.txt
@@ -484,7 +484,7 @@ auto select_registrations TORCHTRT_UNUSED =

               auto layer = ctx->net->addScatter(*self, *index, *value_tensor, nvinfer1::ScatterMode::kELEMENT);
               layer->setAxis(dim);
-               
+
               TORCHTRT_CHECK(layer, "Unable to create layer for aten::scatter.value");

               layer->setName(util::node_info(n).c_str());
@@ -503,7 +503,7 @@ auto select_registrations TORCHTRT_UNUSED =

               auto layer = ctx->net->addScatter(*self, *index, *src, nvinfer1::ScatterMode::kELEMENT);
               layer->setAxis(dim);
-               
+
               TORCHTRT_CHECK(layer, "Unable to create layer for aten::scatter.src");

               layer->setName(util::node_info(n).c_str());
diff --git a/workspace/core/conversion/converters/impl/element_wise.cpp b/tmp/changes.txt
index 0ad4c12..32c7050 100644
--- a/workspace/core/conversion/converters/impl/element_wise.cpp
+++ b/tmp/changes.txt
@@ -25,8 +25,6 @@ nvinfer1::ITensor* clamp_util(
  return clamp_layer_out;
}

-
-
auto element_wise_registrations TORCHTRT_UNUSED =
    RegisterNodeConversionPatterns()
        .pattern(
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
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.

This is fine feel free to merge. Please also open an issue about creating code generation for the collection IO

@bowang007 bowang007 merged commit 2fc413b into master Aug 19, 2022
@bowang007 bowang007 deleted the fix_misleading_msg branch August 19, 2022 18:09
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] Issues with partitioning showing that the model should be built e2e but running anyway
3 participants