RELU export fails
What commit version of aidge do you use
-
aidge_core
: dev f0b3f5f9730e01363c6789239e44041311b5241d -
aidge_export_cpp
: dev 14adfae5
I just pulled and did setup.sh
for all aidge branches, on dev.
I also applied commit from !64 (closed) (#pragma) to fix circular parameters inclusion.
Problem description
Run test_export.py
(multiple times) : the Relu export test fails "sometimes". Here is a failing output :
Log show errors with HALF_HI
, HALF_HO
, toInt64
and uint32_t
ReLU
gen : ReLU_test/data/_0_ReLU_0_input_0.h
gen : ReLU_test/data/_0_ReLU_0_output_0_expected.h
COMPILATION
g++ -Wall -Wextra -MMD -fopenmp -O2 -I. -I./dnn -I./dnn/include -I./dnn/layers -I./dnn/parameters -c main.cpp -o build/./main.o
In file included from ./dnn/include/layers/_0_ReLU_0.h:3,
from ./dnn/include/forward.hpp:5,
from main.cpp:4:
./dnn/include/network/rescaling_utils.hpp:7:24: error: ‘uint32_t’ was not declared in this scope; did you mean ‘u_int32_t’?
7 | static int64_t toInt64(uint32_t lo, uint32_t hi) {
| ^~~~~~~~
| u_int32_t
./dnn/include/network/rescaling_utils.hpp:7:37: error: ‘uint32_t’ was not declared in this scope; did you mean ‘u_int32_t’?
7 | static int64_t toInt64(uint32_t lo, uint32_t hi) {
| ^~~~~~~~
| u_int32_t
./dnn/include/network/rescaling_utils.hpp:7:48: error: expression list treated as compound expression in initializer [-fpermissive]
7 | static int64_t toInt64(uint32_t lo, uint32_t hi) {
| ^
./dnn/include/network/rescaling_utils.hpp:12:22: error: ‘uint32_t’ has not been declared
12 | uint32_t accumLo, uint32_t accumHi)
| ^~~~~~~~
./dnn/include/network/rescaling_utils.hpp:12:40: error: ‘uint32_t’ has not been declared
12 | uint32_t accumLo, uint32_t accumHi)
| ^~~~~~~~
./dnn/include/network/rescaling_utils.hpp: In function ‘int64_t smlal(int32_t, int32_t, int, int)’:
./dnn/include/network/rescaling_utils.hpp:14:72: error: ‘toInt64’ cannot be used as a function
14 | return ((int64_t) lhs) * ((int64_t) rhs) + toInt64(accumLo, accumHi);
| ^
./dnn/include/network/rescaling_utils.hpp: At global scope:
./dnn/include/network/rescaling_utils.hpp:55:18: error: ‘uint32_t’ does not name a type; did you mean ‘u_int32_t’?
55 | static const uint32_t HALF_LO = (SHIFT > 0)
| ^~~~~~~~
| u_int32_t
./dnn/include/network/rescaling_utils.hpp:57:18: error: ‘uint32_t’ does not name a type; did you mean ‘u_int32_t’?
57 | static const uint32_t HALF_HI = (SHIFT > 0)
| ^~~~~~~~
| u_int32_t
./dnn/include/network/rescaling_utils.hpp: In member function ‘Sum_T FixedPointScaling<SHIFT, COEF>::operator()(Sum_T, size_t) const’:
./dnn/include/network/rescaling_utils.hpp:51:41: error: ‘HALF_LO’ was not declared in this scope
51 | return smlal(weightedSum, COEF, HALF_LO, HALF_HI) >> SHIFT;
| ^~~~~~~
./dnn/include/network/rescaling_utils.hpp:51:50: error: ‘HALF_HI’ was not declared in this scope
51 | return smlal(weightedSum, COEF, HALF_LO, HALF_HI) >> SHIFT;
| ^~~~~~~
./dnn/include/network/rescaling_utils.hpp: At global scope:
./dnn/include/network/rescaling_utils.hpp:11:16: warning: ‘int64_t smlal(int32_t, int32_t, int, int)’ defined but not used [-Wunused-function]
11 | static int64_t smlal(int32_t lhs, int32_t rhs,
| ^~~~~
make: *** [Makefile:49: build/./main.o] Error 1
Edited by Louis Lerbourg