-
Notifications
You must be signed in to change notification settings - Fork 363
Fixing some issues with the master branch #1033
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
Conversation
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: 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]>
There was a problem hiding this 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
There was a problem hiding this 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/conversion/evaluators/aten.cpp b/tmp/changes.txt
index 018b565..4632744 100644
--- a/workspace/core/conversion/evaluators/aten.cpp
+++ b/tmp/changes.txt
@@ -353,11 +353,9 @@ auto aten_registrations TORCHTRT_UNUSED =
return {};
}
},
- EvalOptions().validSchemas({
- "aten::add.int(int a, int b) -> (int)",
- "aten::add.float(float a, float b) -> (float)",
- "aten::add.str(str a, str b) -> (str)"
- })})
+ EvalOptions().validSchemas({"aten::add.int(int a, int b) -> (int)",
+ "aten::add.float(float a, float b) -> (float)",
+ "aten::add.str(str a, str b) -> (str)"})})
.evaluator({c10::Symbol::fromQualString("aten::add_"),
[](const torch::jit::Node* n, kwargs& args) -> c10::optional<torch::jit::IValue> {
if (args.at(n->input(0)).IValue()->isList()) {
diff --git a/workspace/core/partitioning/partitioning.cpp b/tmp/changes.txt
old mode 100755
new mode 100644
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
diff --git a/workspace/core/lowering/passes/exception_elimination.cpp b/tmp/changes.txt
index 77aec78..abed644 100644
--- a/workspace/core/lowering/passes/exception_elimination.cpp
+++ b/tmp/changes.txt
@@ -44,9 +44,9 @@ struct ExceptionOrPassPatternElimination {
bool arm1_starts_with_exception = (*arm1_start)->kind() == prim::RaiseException;
bool arm2_starts_with_exception = (*arm2_start)->kind() == prim::RaiseException;
- //if (!arm1_starts_with_exception && !arm2_starts_with_exception) {
- // Neither arm matches the pattern
- // return false;
+ // if (!arm1_starts_with_exception && !arm2_starts_with_exception) {
+ // Neither arm matches the pattern
+ // return false;
//}
/// Check if this Node hosts a pattern like so:
diff --git a/workspace/tests/core/lowering/test_exception_elimination_pass.cpp b/tmp/changes.txt
index 5a0931e..b7e4ac0 100644
--- a/workspace/tests/core/lowering/test_exception_elimination_pass.cpp
+++ b/tmp/changes.txt
@@ -44,7 +44,7 @@ TEST(LoweringPasses, EliminateExceptionOrPassPattern_Block0) {
auto if_block0 = if_node->addBlock();
auto exception_node = g->create(torch::jit::prim::RaiseException, {except_val, none_const_val}, 0);
if_block0->appendNode(exception_node);
- /*auto if_block1 =*/ if_node->addBlock();
+ /*auto if_block1 =*/if_node->addBlock();
g->insertNode(if_node);
auto cat_node = g->create(torch::jit::aten::cat, {list_node->output(), zero_const_val});
g->insertNode(cat_node);
@@ -97,7 +97,7 @@ TEST(LoweringPasses, EliminateExceptionOrPassPattern_Block1) {
bool_node->output()->setType(torch::jit::BoolType::get());
g->insertNode(bool_node);
auto if_node = g->create(torch::jit::prim::If, {bool_node->output()}, 0);
- /*auto if_block0 = */if_node->addBlock();
+ /*auto if_block0 = */ if_node->addBlock();
auto if_block1 = if_node->addBlock();
auto exception_node = g->create(torch::jit::prim::RaiseException, {except_val, none_const_val}, 0);
if_block1->appendNode(exception_node);
@@ -154,7 +154,7 @@ TEST(LoweringPasses, EliminateExceptionOrPassPattern_Negative) {
auto if_block0 = if_node->addBlock();
auto append_node = g->create(torch::jit::aten::append, {list_node->output(), y});
if_block0->appendNode(append_node);
- /*auto if_block1 = */if_node->addBlock();
+ /*auto if_block1 = */ if_node->addBlock();
g->insertNode(if_node);
auto cat_node = g->create(torch::jit::aten::cat, {list_node->output(), zero_const_val});
g->insertNode(cat_node);
ERROR: Some files do not conform to style guidelines
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
There was a problem hiding this 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
There was a problem hiding this 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/partitioning/partitioning.cpp b/tmp/changes.txt
old mode 100755
new mode 100644
ERROR: Some files do not conform to style guidelines
There was a problem hiding this 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
There was a problem hiding this 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
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
Please delete options that are not relevant and/or add your own.
Checklist: