Skip to content

Commit

Permalink
[Feature](bangc-ops):Roiaware_pool3d specify 'paramcheck'
Browse files Browse the repository at this point in the history
  • Loading branch information
chqy99 committed Oct 9, 2023
1 parent 7a61721 commit 8805f54
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bangc-ops/kernels/roiaware_pool3d/roiaware_pool3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,15 @@ mluOpStatus_t MLUOP_WIN_API mluOpRoiawarePool3dForward(
so it's limited by the size of NRAM memory space. */
if (rois_desc->dtype == MLUOP_DTYPE_FLOAT) {
if (max_pts_each_voxel > THRESHOLD_OF_MAX_PTS_EACH_VOXEL_FLOAT_FORWARD) {
LOG(ERROR) << API
<< ": When the data type is float, max_pts_each_voxel cannot "
"be greater than "
LOG(ERROR) << API << ": When the data type is float, "
"max_pts_each_voxel cannot be greater than "
<< THRESHOLD_OF_MAX_PTS_EACH_VOXEL_FLOAT_FORWARD << ".";
return MLUOP_STATUS_BAD_PARAM;
}
} else {
if (max_pts_each_voxel > THRESHOLD_OF_MAX_PTS_EACH_VOXEL_HALF_FORWARD) {
LOG(ERROR) << API
<< ": When the data type is half, max_pts_each_voxel cannot "
"be greater than "
LOG(ERROR) << API << ": When the data type is half, "
"max_pts_each_voxel cannot be greater than "
<< THRESHOLD_OF_MAX_PTS_EACH_VOXEL_HALF_FORWARD << ".";
return MLUOP_STATUS_BAD_PARAM;
}
Expand Down

0 comments on commit 8805f54

Please sign in to comment.