Skip to content

Commit e103562

Browse files
yaroslavessayed
authored andcommitted
clipped tile size in conv and depthwise user tests
1 parent feb0130 commit e103562

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

user_tests/tests/mli_krn_conv2d_30/tests_mli_krn_conv2d_30.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@ void prepare_phase(const conv2d_test_operands* cur_test, uint32_t& num_tiles,
468468
assert(pad_left >= 0 && pad_top >= 0 && out_h_idx >= 0 && out_w_idx >= 0) failed.
469469
*/
470470
uint32_t tile_output_size[kConvIORank]{ BATCH_SIZE, 4, 4, NUM_GROUPS, 2 };
471+
tile_output_size[kGroupTensorHeightDim] = MIN(tile_output_size[kGroupTensorHeightDim], total_output_size[kGroupTensorHeightDim]);
472+
tile_output_size[kGroupTensorWidthDim] = MIN(tile_output_size[kGroupTensorWidthDim], total_output_size[kGroupTensorWidthDim]);
471473
// TODO: smaller H/W tile sizes will fail on 9-2, because of MLI_ASSERT I put inside IteratorCfg ctor - do something with it
472474

473475
#else

user_tests/tests/mli_krn_depthwise_conv_30/tests_mli_krn_depthwise_conv_30.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ void prepare_phase(const depthwise_conv2d_test_operands* cur_test,
385385
*
386386
*/
387387
uint32_t tile_output_size[kDepthwiseIORank]{ batch_tile_size, 4, 4, NUM_GROUPS, 2 };
388+
tile_output_size[kGroupTensorHeightDim] = MIN(tile_output_size[kGroupTensorHeightDim], total_output_size[kGroupTensorHeightDim]);
389+
tile_output_size[kGroupTensorWidthDim] = MIN(tile_output_size[kGroupTensorWidthDim], total_output_size[kGroupTensorWidthDim]);
388390
#else
389391
uint32_t tile_output_size[kDepthwiseIORank]{ batch_tile_size,
390392
total_output_size[kGroupTensorHeightDim],

0 commit comments

Comments
 (0)