-
Notifications
You must be signed in to change notification settings - Fork 360
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: Handle nonetype pad value for Constant pad #1712
Conversation
Signed-off-by: Dheeraj Peri <[email protected]>
Signed-off-by: Dheeraj Peri <[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/home/runner/work/TensorRT/TensorRT/core/lowering/passes/replace_aten_pad.cpp b/tmp/changes.txt
index 23e62e1..dd5e721 100644
--- a/home/runner/work/TensorRT/TensorRT/core/lowering/passes/replace_aten_pad.cpp
+++ b/tmp/changes.txt
@@ -101,7 +101,7 @@ void ReplaceAtenPad(std::shared_ptr<torch::jit::Graph>& graph) {
torch::jit::Node* new_node;
auto pad_value = it->inputs()[3];
auto is_pad_none = torch::jit::toIValue(it->inputs()[3])->isNone();
- if(is_pad_none){
+ if (is_pad_none) {
pad_value = graph->insertConstant(0.0);
}
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.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/core/lowering/passes/replace_aten_pad.cpp b/tmp/changes.txt
index 23e62e1..dd5e721 100644
--- a/home/runner/work/TensorRT/TensorRT/core/lowering/passes/replace_aten_pad.cpp
+++ b/tmp/changes.txt
@@ -101,7 +101,7 @@ void ReplaceAtenPad(std::shared_ptr<torch::jit::Graph>& graph) {
torch::jit::Node* new_node;
auto pad_value = it->inputs()[3];
auto is_pad_none = torch::jit::toIValue(it->inputs()[3])->isNone();
- if(is_pad_none){
+ if (is_pad_none) {
pad_value = graph->insertConstant(0.0);
}
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
Signed-off-by: Dheeraj Peri <[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 C++ 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.
LGTM
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: