-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[MLU] add_fluid_mluop_yolo_box #46573
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -73,7 +74,6 @@ detection_library(locality_aware_nms_op SRCS locality_aware_nms_op.cc DEPS gpc) | |||
detection_library(matrix_nms_op SRCS matrix_nms_op.cc DEPS gpc) | |||
detection_library(box_clip_op SRCS box_clip_op.cc box_clip_op.cu) | |||
detection_library(yolov3_loss_op SRCS yolov3_loss_op.cc) | |||
detection_library(yolo_box_op SRCS yolo_box_op.cc) |
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 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.
已修改,至else
std::vector<int64_t> tmp_dim_scores({n, s, class_num, h * w}); | ||
std::vector<int64_t> tmp_dim_scores_out({n, s, h * w, class_num}); | ||
|
||
MLUOpTensorDesc tmp_boxes_desc( |
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.
boxes_trans_desc_mluops
boxes_trans_desc_cnnl
scores_trans_desc_mluops
scores_trans_desc_cnnl
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.
已修改
paddle::framework::TensorFromVector( | ||
anchors, ctx.device_context(), &anchors_temp); | ||
MLUOpTensorDesc anchors_desc(anchors_temp); | ||
MLUCnnlTensorDesc boxes_out_desc( |
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.
boxes_desc_cnnl
scores_desc_cnnl
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.
已修改
iou_aware_factor=0.5) | ||
paddle.enable_static() | ||
|
||
# def test_eager(self): |
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.
delete
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.
已修改
9842aa9
to
7a291a2
Compare
public: | ||
void Compute(const framework::ExecutionContext& ctx) const override { | ||
auto* x = ctx.Input<framework::LoDTensor>("X"); | ||
auto* img_size = ctx.Input<framework::LoDTensor>("ImgSize"); |
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.
framework::LoDTensor后续也请不要再使用了,请直接使用phi::DenseTensor,背景见:#46432
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.
framework::LoDTensor已修改为phi::DenseTensor
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
7a291a2
to
641f66f
Compare
641f66f
to
a558e3b
Compare
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
* [MLU] fix compute error of dropout op (#45923) * [MLU] add mergedAdam kernel. (#45965) * [MLU] add int64 support for mlu one_hot_v2 (#46313) * [MLU] fix profiler compile failure (#46208) * [MLU] add barrier_op kernel. (#46417) * [MLU] fluid: add mluop (#46429) * [MLU] add huber_loss kernel. (#46455) * [MLU] add mlu kernel for add_reduce_max_grad (#45651) Co-authored-by: liupeiyu <liupeiyu@cambricon.com> * [MLU] add_fluid_mluop_yolo_box (#46573) * [MLU] fix phi::Tensor compile error of mlu. (#46649) * [MLU] add fluid MLUOps prior_box (#46585) * [MLU] fix cmake error (#46772) * [MLU]fix unittest of sync_bn (#46797) * [MLU] add masterparam support for mlu adamw. (#46804) * [MLU] add int64 support for allgather. (#46830) * [MLU] fix compile error & add mlu blacklist function. (#47439) * [MLU] fix softmax_with_cross_entropy failed in 370-X8. * [MLU] fix cncl stuck caused by multiple initializations. * [MLU] fix code style check. Co-authored-by: qipengh <huangqipeng@cambricon.com> Co-authored-by: cifar10 <41565156+cifar10@users.noreply.github.com> Co-authored-by: Lux et Veritas <1004239791@qq.com> Co-authored-by: liupeiyu <liupeiyu@cambricon.com> Co-authored-by: ronnywang <ronny1996@163.com>
PR types
New features
PR changes
OPs
Describe
add mluop yolo_box kernel