Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup lrelu #44

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions common/inc/sfpu/ckernel_sfpu_relu.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

#pragma once

#include "ckernel_defs.h"
#include "ckernel.h"
#include "ckernel_defs.h"
#include "noc_nonblocking_api.h"
#include "ckernel_sfpu_converter.h"

#include "sfpi.h"

Expand All @@ -17,11 +18,10 @@ namespace ckernel
namespace sfpu
{

template <bool APPROXIMATION_MODE, int ITERATIONS>
template <bool APPROXIMATION_MODE>
inline void _calculate_lrelu_(const int iterations, uint slope)
{
// SFPU microcode
vFloat s = s2vFloat16b(slope);
vFloat s = Converter::to_float(slope);

#pragma GCC unroll 0
for (int d = 0; d < iterations; d++) {
Expand Down
Loading