Skip to content

Commit

Permalink
[Kernels] fix gcc13 error (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
DDEle committed Jun 29, 2023
1 parent 67af8ba commit 37a4a3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static const std::vector<std::vector<std::vector<dim_t>>> perm_list = {
bool matmul_ref_kd_t::init() {
auto shapes = op_desc_.tensor_shapes();
std::transform(shapes.begin(), shapes.end(), shapes.begin(),
[](auto&& x) { return (x.size() != 1 || x[0] != 1) ? pre_pad1<dim_t>(4, x) : x; });
[](auto x) { return (x.size() != 1 || x[0] != 1) ? pre_pad1<dim_t>(4, x) : x; });

for (auto mat : {io::SRC0, io::SRC1, io::SRC2, io::DST0}) {
if (shapes[mat].size() != 4 && shapes[mat].size() != 0) {
Expand Down Expand Up @@ -123,7 +123,7 @@ bool matmul_ref_k_t::execute(const std::vector<const void*>& rt_data) const {
auto& attrs = op_desc.attrs();
auto shapes = op_desc.tensor_shapes();
std::transform(shapes.begin(), shapes.end(), shapes.begin(),
[](auto&& x) { return (x.size() != 1 || x[0] != 1) ? pre_pad1<dim_t>(4, x) : x; });
[](auto x) { return (x.size() != 1 || x[0] != 1) ? pre_pad1<dim_t>(4, x) : x; });
std::vector<data_type> dtypes(descs.size());
std::transform(descs.begin(), descs.end(), dtypes.begin(), [&](tensor_desc d) { return d.dtype(); });
bool has_binary_add = shapes.size() > io::SRC2 && !shapes[io::SRC2].empty();
Expand Down Expand Up @@ -290,7 +290,7 @@ bool matmul_ref_k_t::execute(const exec_context_t& context) {
auto& attrs = op_desc.attrs();
auto shapes = op_desc.tensor_shapes();
std::transform(shapes.begin(), shapes.end(), shapes.begin(),
[](auto&& x) { return (x.size() != 1 || x[0] != 1) ? pre_pad1<dim_t>(4, x) : x; });
[](auto x) { return (x.size() != 1 || x[0] != 1) ? pre_pad1<dim_t>(4, x) : x; });
std::vector<data_type> dtypes(descs.size());
std::transform(descs.begin(), descs.end(), dtypes.begin(), [&](tensor_desc d) { return d.dtype(); });
bool has_binary_add = shapes.size() > io::SRC2 && !shapes[io::SRC2].empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ bsr_data_t<T> reorder_to_bsr_group(dim_t rows, dim_t cols, dim_t blk_row, dim_t
}
}
padded_indptr[num_row] = padded_indices.size() / group;
return std::move(bsr_data_t<T>({blk_row, blk_col}, {rows, cols}, padded_indptr, padded_indices, padded_data, group));
return bsr_data_t<T>({blk_row, blk_col}, {rows, cols}, padded_indptr, padded_indices, padded_data, group);
}
template bsr_data_t<int8_t> reorder_to_bsr_group<int8_t, 4>(dim_t rows, dim_t cols, dim_t blk_row, dim_t blk_col,
const int8_t* uncoded_data);
Expand Down

0 comments on commit 37a4a3e

Please sign in to comment.