aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/softmax.py
diff options
context:
space:
mode:
authorDiqing Zhong <diqing.zhong@arm.com>2021-01-26 12:12:51 +0100
committerDiqing Zhong <diqing.zhong@arm.com>2021-01-29 16:17:40 +0100
commit189f748e1a79ed88044efbe7137963bca830cbb5 (patch)
tree4d3db8614574b5aedcf952941c2194e2bf7f8285 /ethosu/vela/softmax.py
parent2c2522dd44229a03d3d778cd239478fedc19ee57 (diff)
downloadethos-u-vela-189f748e1a79ed88044efbe7137963bca830cbb5.tar.gz
MLBEDSW-3224: Support HardSwish
Change-Id: If49abc31f093f1bd3393bee86f821fd35972086f Signed-off-by: Diqing Zhong <diqing.zhong@arm.com>
Diffstat (limited to 'ethosu/vela/softmax.py')
-rw-r--r--ethosu/vela/softmax.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/softmax.py b/ethosu/vela/softmax.py
index 656a7e69..c3b0611a 100644
--- a/ethosu/vela/softmax.py
+++ b/ethosu/vela/softmax.py
@@ -203,7 +203,7 @@ class SoftMax:
for x in range(256):
input_diff = x - 255
if input_diff >= diff_min:
- rescale = fp_math.saturating_rounding_mul(input_diff * (1 << shift), scale)
+ rescale = fp_math.saturating_rounding_mul32(input_diff * (1 << shift), scale)
lut.append(fp_math.exp_on_negative_values(rescale))
else:
lut.append(0)