Skip to content

Commit 434a3c7

Browse files
committed
remove unroll factor table
1 parent 4ad7454 commit 434a3c7

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

lib/src/kernels/eltwise/impl/mli_krn_eltwise_vdsp.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,6 @@
1818
#include "mli_mem_info.h"
1919
#include "arc_vector.h"
2020

21-
const int unroll_factor[2][5] = {
22-
{
23-
/* ELTWISE_ADD_NO_CONVERT = */ 4,
24-
/* ELTWISE_SUB_NO_CONVERT = */ 4,
25-
/* ELTWISE_MUL_NO_CONVERT = */ 4,
26-
/* ELTWISE_MAX_NO_CONVERT = */ 4,
27-
/* ELTWISE_MIN_NO_CONVERT = */ 4
28-
} ,
29-
{
30-
/* ELTWISE_ADD_CONVERT = */ 4,
31-
/* ELTWISE_SUB_CONVERT = */ 4,
32-
/* ELTWISE_MUL_CONVERT = */ 4,
33-
/* ELTWISE_MAX_CONVERT = */ 4,
34-
/* ELTWISE_MIN_CONVERT = */ 4
35-
}
36-
};
37-
3821
namespace mli {
3922
namespace krn {
4023
namespace vdsp {
@@ -576,8 +559,6 @@ MLI_FORCE_INLINE void eltwise_innerloop(
576559
int remaining_part = count & (num_lanes - 1);
577560
decltype(input) op1_scalar = op1_s;
578561
decltype(input) op2_scalar = op2_s;
579-
const int convert_int = static_cast<int>(convert);
580-
const int func_int = static_cast<int>(func_type);
581562

582563
if (remaining_part) {
583564
auto val1 = (scalar_op1) ? op1_scalar : mli_prv_load_1vec(op1_ptr + idx1);
@@ -591,7 +572,7 @@ MLI_FORCE_INLINE void eltwise_innerloop(
591572
idx_out += remaining_part;
592573
}
593574

594-
#pragma clang loop unroll_count(unroll_factor[convert_int][func_int])
575+
#pragma clang loop unroll_count(4)
595576
for (int pos = 0; pos < (count - remaining_part); pos+=num_lanes) {
596577
auto val1 = (scalar_op1) ? op1_scalar : mli_prv_load_1vec(op1_ptr + idx1);
597578
auto val2 = (scalar_op2) ? op2_scalar : mli_prv_load_1vec(op2_ptr + idx2);

0 commit comments

Comments
 (0)