Skip to content

Commit

Permalink
[onert] Remove unnecessary variable in bias_op kernel
Browse files Browse the repository at this point in the history
This commit removes channel_dim because it does not use in release build.
Instead, the contents of this variable were immediately put into the
assertion function.

ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>
  • Loading branch information
jyoungyun committed Aug 2, 2024
1 parent 38cdc30 commit 362374f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compute/cker/include/cker/eigen/bias_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ template <typename T>
void biasHelper(const Shape &bias_shape, const T *bias_data, const Shape &input_shape,
T *input_data, T activation_min, T activation_max)
{
int channel_dim = input_shape.DimensionsCount() - 1;

assert(input_shape.Dims(channel_dim) == bias_shape.Dims(0));
assert(input_shape.Dims(input_shape.DimensionsCount() - 1) == bias_shape.Dims(0));
assert(input_data);
assert(bias_data);

Expand Down

0 comments on commit 362374f

Please sign in to comment.