Cambricon / mlu-ops

Efficient operation implementation based on the Cambricon Machine Learning Unit (MLU) .
MIT License
103 stars 102 forks source link

[Feature](mlu-ops): add stride tensor check #1066

Closed ZhouxiangZhouxiang closed 2 months ago

ZhouxiangZhouxiang commented 3 months ago

Thanks for your contribution and we appreciate it a lot. :rocket::rocket:

1. Motivation

对mlu-ops仓库中不支持stride特性的算子添加防呆。

2. Modification

在logging.h中添加STRIDE_TENSOR_CHECK宏,用来检查输入输出是否带有stride。对不支持stride的算子添加STRIDE_TENSOR_CHECK防呆,对仅支持dense and nonoverlapping的算子,添加strideCaseWithNotConsistentDense()防呆。

3. Test Report

测试现有的测例,大部分测例都能通过测试,不能通过测试的测例确定不是添加stride防呆的问题。 测试带有stride的测例,触发stride防呆。

mahxn0 commented 2 months ago

LGTM: bboxs_overlap, poly_nms, prior_box, generate_proposals_v2, voxelpoolingforward, voxelization