aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela
diff options
context:
space:
mode:
authorFredrik Svedberg <Fredrik.Svedberg@arm.com>2020-12-11 13:42:22 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-18 12:16:19 +0000
commit5b513886ab120023eb1319d4883b175db8b7de3a (patch)
tree8ed296f6567daac9c1a564ad417f3d14ab1b7186 /ethosu/vela
parent6c74c3bcaa733aa062c15d606726722b19c0dfdb (diff)
downloadethos-u-vela-5b513886ab120023eb1319d4883b175db8b7de3a.tar.gz
[MLBEDSW-297] Setup and run on Microsoft Windows
Various updates to make vela run and produce identical output on Microsoft Windows. * Fixed overflow errors * Fixed compile warnings * Avoid problematic numpy version * Updated README.md Signed-off-by: Fredrik Svedberg <Fredrik.Svedberg@arm.com> Change-Id: Ie48c63a92a00c81b3247d07f05b75d881319ddbb
Diffstat (limited to 'ethosu/vela')
-rw-r--r--ethosu/vela/fp_math.py2
-rw-r--r--ethosu/vela/softmax.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/fp_math.py b/ethosu/vela/fp_math.py
index 66375611..5228f031 100644
--- a/ethosu/vela/fp_math.py
+++ b/ethosu/vela/fp_math.py
@@ -41,7 +41,7 @@ def saturating_rounding_mul(a, b):
if a == b and a == np.iinfo(np.int32).min:
return np.int32(np.iinfo(np.int32).max)
divider = 1 << 31
- ab = a * b
+ ab = np.int64(a) * np.int64(b)
if ab >= 0:
nudge = 1 << 30
return (ab + nudge) // divider
diff --git a/ethosu/vela/softmax.py b/ethosu/vela/softmax.py
index 1bdab740..8b061297 100644
--- a/ethosu/vela/softmax.py
+++ b/ethosu/vela/softmax.py
@@ -520,7 +520,7 @@ class SoftMax:
[1, 1, 1, 512],
DataType.int32,
self.ONE_OVER_ONE_PLUS_X_LUT,
- np.int32,
+ np.uint32,
TensorPurpose.LUT,
)
)