Skip to content
This repository has been archived by the owner on Feb 20, 2025. It is now read-only.

Commit

Permalink
Cleanup lrelu (#44)
Browse files Browse the repository at this point in the history
* #5424: Cleanup lrelu - wormhole

* Fix slope conversion to pass all tests
  • Loading branch information
pgardnerTT authored Oct 24, 2024
1 parent 56ec2f5 commit 38df924
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 38df924

Please sign in to comment.