Skip to content

Commit

Permalink
RVV: ShuffleChannel, fp16& bf16, make C906 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
thelastlin committed Aug 29, 2023
1 parent 9428311 commit b03cd19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/layer/riscv/shufflechannel_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,14 @@ int ShuffleChannel_riscv::forward_bf16s_fp16s(const Mat& bottom_blob, Mat& top_b
size_t vl;
vl = vsetvl_e16m8(_group * elempack);
// create bitmask
#if C906
// C906 don't have vlm
vuint16m8_t _idx = vle16_v_u16m8(index_c906, vl);
#else
vbool2_t _mask = vlm_v_b2(bitmask, vl);
vuint16m8_t _idx_init = viota_m_u16m8(_mask, vl);
vuint16m8_t _idx = vadd_vx_u16m8(_idx_init, (_group - 1) * elempack, vl);
#endif
for (int shift = _group - 2; shift >= 0; shift--)
{
vuint16m8_t _idx_lower = vadd_vx_u16m8(_idx_init, shift * elempack, vl);
Expand Down

0 comments on commit b03cd19

Please sign in to comment.