aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael McGeagh <michael.mcgeagh@arm.com>2020-12-03 13:53:56 +0000
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-07 14:56:13 +0000
commitd5cf7650b6bcfa5d81321661fa300763660d31ab (patch)
tree0d04503c6a2f43475888168a71c5e64b0071fd2c
parent6f72526b3c74c0e64075563be2ddf7f9708ad12c (diff)
downloadethos-u-vela-d5cf7650b6bcfa5d81321661fa300763660d31ab.tar.gz
vela: Modify CFLAGS for mlw_codec makefile
Fix signed/unsigned warning Removed from README.md as it adds no value. The standalone tool is not expected to be used by customers. Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com> Change-Id: I09034478a14c37d30874d5182a096591dfdd6eb2
-rw-r--r--README.md10
-rw-r--r--ethosu/mlw_codec/makefile3
-rw-r--r--ethosu/mlw_codec/mlw_main.c4
3 files changed, 4 insertions, 13 deletions
diff --git a/README.md b/README.md
index 214b10ec..12abc610 100644
--- a/README.md
+++ b/README.md
@@ -104,16 +104,6 @@ If you plan to contribute to the Vela project (highly encouraged!) then it is
recommended to install Vela along with the pre-commit tools (see
[Vela Testing](TESTING.md) for more details).
-### `mlw_codec`
-
-As part of the installation process, Vela will compile a C based module.
-
-The build flags used for this module are as follows:
-
-```none
--Wall -Werror -Wno-unused-function -Wno-unused-variable
-```
-
## Running
Vela is run with an input `.tflite` file passed on the command line. This file
diff --git a/ethosu/mlw_codec/makefile b/ethosu/mlw_codec/makefile
index 68eb0d94..aa214f9b 100644
--- a/ethosu/mlw_codec/makefile
+++ b/ethosu/mlw_codec/makefile
@@ -20,7 +20,8 @@
UNAME=$(shell uname -o)
-CFLAGS=-Wall -Werror -Wno-unused-function -Wno-unused-variable
+CFLAGS=-Wall -Werror -Wno-unused-variable
+CFLAGS+=-fwrapv -fstack-protector-strong -flto -fuse-linker-plugin -ffat-lto-objects
ifeq ($(DEBUG),1)
CFLAGS+=-g -O0 -DDEBUG
diff --git a/ethosu/mlw_codec/mlw_main.c b/ethosu/mlw_codec/mlw_main.c
index 9f720495..315c899d 100644
--- a/ethosu/mlw_codec/mlw_main.c
+++ b/ethosu/mlw_codec/mlw_main.c
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
if (!decode) {
// Encode
- int i, n = int16_format ? inbuf_size/sizeof(int16_t) : inbuf_size;
+ int i, n = int16_format ? inbuf_size/(int)sizeof(int16_t) : inbuf_size;
int16_t *weights = malloc( n * sizeof(int16_t) );
for(i=0; i<n; i++) {
weights[i] = int16_format ? ((int16_t*)inbuf)[i] : ((int8_t*)inbuf)[i];
@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
int i, n;
int16_t *weights;
n = mlw_decode( inbuf, inbuf_size, &weights, verbose);
- outbuf_size = int16_format ? n*sizeof(int16_t) : n;
+ outbuf_size = int16_format ? n*(int)sizeof(int16_t) : n;
outbuf = malloc( outbuf_size );
assert(outbuf);
for(i=0; i<n; i++) {