Skip to content

Commit

Permalink
In place no new alloc multiply
Browse files Browse the repository at this point in the history
int32_t* = reinterpret_cast<float32*> for in-place no alloc multiply.
  • Loading branch information
jerinphilip committed Apr 20, 2022
1 parent d908352 commit 3c03bcf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions MozIntGemm/moz_intgemm_ruy.inl
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ void int8MultiplyAndAddBias(const int8_t *input_A_prepared, float scale_A,
ruy::MakeSimpleLayout(rows_A, cols_B, ruy::Order::kRowMajor,
dst.mutable_layout());

detail::AlignedVector<std::int32_t> dst_data(rows_A * cols_B);
std::int32_t *dest_ptr = dst_data.data();

std::int32_t *dest_ptr = reinterpret_cast<std::int32_t *>(output);
dst.set_data(dest_ptr);

// When Dst is int32, mul_params is unused.
Expand Down

0 comments on commit 3c03bcf

Please sign in to comment.