Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
chhwang committed Oct 1, 2023
1 parent 58a8e28 commit 3493421
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions ark/ops/ops_matmul.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,8 @@ Tensor *Model::matmul(Tensor *mat_a, Tensor *mat_b, Tensor *mat_y,
Dims split_output_shape = output_shape;
split_output_shape[0] *= split_k;
Tensor *output_buffer = this->tensor(split_output_shape, mat_y->type);
vector<Tensor *> mat_y_shards =
this->sharding(output_buffer, 0, output_shape[0],
name + "/sharding_mat_y");
vector<Tensor *> mat_y_shards = this->sharding(
output_buffer, 0, output_shape[0], name + "/sharding_mat_y");

int axis_a;
int axis_b;
Expand Down
9 changes: 5 additions & 4 deletions ark/ops/ops_reduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ std::string ReduceEMeanOp::function_name(const OpConfig &cfg) const

template <typename ReduceOpType>
Tensor *Model::reduce(Tensor *input, int axis, Tensor *output,
const std::string &name)
const std::string &name)
{
assert(input != nullptr);
OpPrecType pt = OP_PREC_NONE;
Expand All @@ -158,12 +158,13 @@ Tensor *Model::reduce(Tensor *input, int axis, Tensor *output,
output = this->tensor(reduced_shape, input->type);
} else {
if (output->shape != reduced_shape) {
LOG(ERROR, "invalid output shape ", output->shape, " with input "
"shape ", input->shape, " and reduction axis ", axis);
LOG(ERROR, "invalid output shape ", output->shape,
" with input shape ", input->shape, " and reduction axis ",
axis);
}
if (output == input) {
LOG(ERROR, "output tensor cannot be the same as input tensor for "
"reduce_sum op");
"reduce_sum op");
}
}
ReduceOpType op{pt, input, output, axis, name};
Expand Down

0 comments on commit 3493421

Please sign in to comment.