Enable Conv fusion optimizations in optimizeForIdeep#9255
Enable Conv fusion optimizations in optimizeForIdeep#9255gujinghui wants to merge 4 commits intopytorch:masterfrom
Conversation
yinghai
left a comment
There was a problem hiding this comment.
Thanks for splitting it. Looks good overall. I have 2 minor comments regarding the interface.
caffe2/opt/converter.cc
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/opt/optimize_ideep.cc
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
@yinghai any other concerns? |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
yinghai
left a comment
There was a problem hiding this comment.
Please clang-format your code.
caffe2/opt/optimize_ideep.cc
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/opt/optimize_ideep.cc
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/opt/optimize_ideep.cc
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/opt/converter.cc
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/opt/converter.cc
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
|
@yinghai |
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
yinghai
left a comment
There was a problem hiding this comment.
Let's have a separate pass to fix the pass-by-value issue.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@yinghai |
yinghai
left a comment
There was a problem hiding this comment.
Sorry, Let's use CAFFE_ENFORCE
|
|
||
| int getGroup(std::map<std::string, caffe2::Argument>& argMap) { | ||
| if (argMap.count("group")) { | ||
| CAFFE_ENFORCE(argMap["group"].has_i() && "Invalid group argument"); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
caffe2/opt/optimize_ideep.cc
Outdated
|
|
||
| Blob *getBlob(repr::NNGraph::NodeRef node, caffe2::Workspace *ws) { | ||
| auto tensor = repr::nn::get<repr::Tensor>(node); | ||
| assert(ws->HasBlob(tensor->getName()) && "Blob not in workspace"); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
|
@yinghai |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Enable fusion for IDEEP in optimizeForIdeep including Conv+ReLU, Conv+Sum, Conv+Sum+ReLU, Conv+BN Pull Request resolved: pytorch#9255 Reviewed By: bddppq Differential Revision: D8809030 Pulled By: yinghai fbshipit-source-id: af30bad3b96cb965bd26a4dfa810370faec4bb88
Summary: Enable fusion for IDEEP in optimizeForIdeep including Conv+ReLU, Conv+Sum, Conv+Sum+ReLU, Conv+BN Pull Request resolved: pytorch#9255 Reviewed By: bddppq Differential Revision: D8809030 Pulled By: yinghai fbshipit-source-id: af30bad3b96cb965bd26a4dfa810370faec4bb88
Summary: Enable fusion for IDEEP in optimizeForIdeep including Conv+ReLU, Conv+Sum, Conv+Sum+ReLU, Conv+BN Pull Request resolved: pytorch#9255 Reviewed By: bddppq Differential Revision: D8809030 Pulled By: yinghai fbshipit-source-id: af30bad3b96cb965bd26a4dfa810370faec4bb88
Enable fusion for IDEEP in optimizeForIdeep
including Conv+ReLU, Conv+Sum, Conv+Sum+ReLU, Conv+BN