[Caffe2] Fix issues in IDEEP fallback ops and enable Detectron on IDEEP device#9164
[Caffe2] Fix issues in IDEEP fallback ops and enable Detectron on IDEEP device#9164gujinghui wants to merge 1 commit intopytorch:masterfrom
Conversation
yinghai
left a comment
There was a problem hiding this comment.
Hi @gujinghui, what issue does this PR fix and could you outline what the fix is?
Also please clang-format your code.
|
@yinghai Below are the fixes and improvements from this PR:
|
caffe2/python/pybind_state.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.
|
Added some comments and clang-format the codes. BTW, planned to clang-format all ideep-related code after PR these patches in hand. |
|
@yinghai pls help review and merge. |
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/python/pybind_state_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 rebased and fixed. pls help review. |
|
Still conflict with master? |
|
@yinghai |
caffe2/python/pybind_state_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.
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.
|
Please rebase as the failure tests are blocking merge. And do you have any tests for the in-place fallback op? |
1. Fix the correctness issue in fallback op implementation when the fallback op is in-place and its upstream op is with IDEEP device. The reorder would happen incorrectly from the same buffer then. 2. Support Mask-RCNN model from the Detectron, added all the fallbacks needed, e.g. Python op and other related ops. And also support feeding blobs with integer types using TensorCPU. Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
|
rebased & added test case. @yinghai |
|
@yinghai Any comments on the updates? OK to merge? |
|
@yinghai Hold on. We need to further polish the fix. |
|
Move to other PR |
Summary: 1. Support ops needed for inference of Faster-RCNN/Mask-RCNN needed in Detectron, mostly direct fallbacks. 2. Use CPU device to hold 0-dim tensors and integer tensors in both fallback op and blob feeder, needed by Detectron models. 3. Ignore 0-dim tensor in MKL-DNN concat operator. 4. Generate dynamic library of Detectron module for CPU device. This PR obsoletes #9164. Pull Request resolved: #10157 Differential Revision: D9276837 Pulled By: yinghai fbshipit-source-id: dc364932ae4a2e7fcefdee70b5fce3c0cee91b6f
…0157) Summary: 1. Support ops needed for inference of Faster-RCNN/Mask-RCNN needed in Detectron, mostly direct fallbacks. 2. Use CPU device to hold 0-dim tensors and integer tensors in both fallback op and blob feeder, needed by Detectron models. 3. Ignore 0-dim tensor in MKL-DNN concat operator. 4. Generate dynamic library of Detectron module for CPU device. This PR obsoletes pytorch#9164. Pull Request resolved: pytorch#10157 Differential Revision: D9276837 Pulled By: yinghai fbshipit-source-id: dc364932ae4a2e7fcefdee70b5fce3c0cee91b6f
Fix issues in IDEEP fallback ops and enable Detectron on IDEEP device
Fix the correctness issue in fallback op implementation when the fallback op is in-place and its upstream op is with IDEEP device. The reorder would happen incorrectly from the same buffer then.
Support Mask-RCNN model from the Detectron, added all the fallbacks needed, e.g. Python op and other related ops. And also support feeding blobs with integer types using TensorCPU.