Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
curioyang committed May 12, 2023
1 parent 3046412 commit 76d36a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/kernels/cpu/optimized/riscv64/instancenorm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ using namespace nncase::kernels::cpu::optimized;
// }
// #endif

// template <>
template <>
result<void> optimized::instancenorm<float>(const float *input, float *output, float *scale, float *bias, const runtime_shape_t &in_shape, float epsilon) noexcept
{
// #if __riscv_vector
Expand Down
10 changes: 5 additions & 5 deletions src/kernels/cpu/reference/instancenorm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ template result<void> reference::instancenorm<float>(const float *input, float *
template <typename T>
result<void> reference::instancenorm(const T *input, T *output, T *scale, T *bias, const runtime_shape_t &in_shape, float epsilon) noexcept
{
auto outer_size = in_shape[0];
auto outer_size = static_cast<int>(in_shape[0]);
auto inner_size = 1;
for (auto i = 2; i < static_cast<int>(in_shape.size()); i++)
inner_size *= in_shape[i];
for (int32_t batch = 0; batch < outer_size; batch++)
for (size_t i = 2; i < in_shape.size(); i++)
inner_size *= static_cast<int>(in_shape[i]);
for (auto batch = 0; batch < outer_size; batch++)
{
for (int32_t c = 0; c < in_shape[1]; c++)
for (size_t c = 0; c < in_shape[1]; c++)
{
auto src = input + batch * inner_size * in_shape[1] + c * inner_size;
auto dest = output + batch * inner_size * in_shape[1] + c * inner_size;
Expand Down

0 comments on commit 76d36a8

Please sign in to comment.