ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

ComputeLibrary compile time "ERROR" using scons flags Werror=1 -j8 debug=0 neon=1 opencl=0 os=linux arch=armv7a build=cross_compile

Open prasannaonchip opened this issue 8 years ago • 20 comments

    (************Cross Compiling from x86 PC to Target raspberry pi 3 b ******************)

src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp:1441:40: required from here src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp:751:50: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] out_val += out_values[0];

cc1plus: error: unrecognized command line option ‘-Wno-implicit-fallthrough’ [-Werror]

if i replace Werror=1 with Werror=0 errors are replaced with warning BUT.... when i run "UnitTests" on target below is result

Running 284 test cases...

*** No errors detected *** Error in `./UnitTests': corrupted double-linked list: 0x00574f88 *** Aborted

prasannaonchip avatar Oct 25 '18 11:10 prasannaonchip

Hello @prasannaonchip,

Thanks for raising this. Which toolchain/compiler do you use?

GeorgeARM avatar Oct 25 '18 11:10 GeorgeARM

Hello @prasannaonchip,

Thanks for raising this. Which toolchain/compiler do you use?

we are using : arm-linux-gnueabihf-g++ (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

prasannaonchip avatar Oct 25 '18 12:10 prasannaonchip

I am facing the following error during compile time with the same flags

src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp:606:50: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] out_val += out_values[0];

My compiler is arm-linux-gnueabihf-g++

tsantosh1098 avatar Oct 25 '18 13:10 tsantosh1098

I am facing the following error during compile time with the same flags

src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp:606:50: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] out_val += out_values[0];

My compiler is arm-linux-gnueabihf-g++

hi tsantosh1098 same error for me too i think so u have build ComputeLibrary using scons with flag Werror=1, once you compile with Werror=0 and run UnitTests on target let me know the result

pavanonchip avatar Oct 25 '18 16:10 pavanonchip

Hello @pavanonchip,

Issue has been identified and fixed. Will be part of next release.

GeorgeARM avatar Oct 25 '18 17:10 GeorgeARM

I have tried with making werror=0,actually it builds and gives message as successfully built, but some functions are actually missing, for example i want to test for neon/convolution function,when i go and c in build file, they are missing...

tsantosh1098 avatar Oct 26 '18 02:10 tsantosh1098

src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp:1441:40: required from here src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp:751:50: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] out_val += out_values[0];

cc1plus: error: unrecognized command line option ‘-Wno-implicit-fallthrough’ [-Werror]

if i replace Werror=1 with Werror=0 errors are replaced with warning BUT.... when i run "UnitTests" on target below is result

Running 284 test cases...

*** No errors detected *** Error in `./UnitTests': corrupted double-linked list: 0x00574f88 *** Aborted

prasannaonchip avatar Oct 26 '18 06:10 prasannaonchip

@prasannaonchip

I have used this below command to build compute library """scons Werror=1 debug=0 asserts=0 neon=1 opencl=1 examples=1 os=linux arch=armv7a -j4""" and i have replaced werror=1 by werror=0 and tried to build, but i m not able to call neon/convolution functions as test examples... To build compute library i have refered following page https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/running-alexnet-on-raspberry-pi-with-compute-library/compile-the-compute-library

plz help me to build acl successfuly...

tsantosh1098 avatar Oct 26 '18 07:10 tsantosh1098

  1. Try a clean build (i.e delete your build folder)
  2. If it still doesn't work, please use the same version of gcc as us gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf

It can be downloaded from here

AnthonyBarbier avatar Oct 26 '18 08:10 AnthonyBarbier

@prasannaonchip As per the link i provided above, the build command i used did not include "flags". There is no such folder in my ACL directory. I have used scons Werror=1 debug=0 asserts=0 neon=1 opencl=1 examples=1 os=linux arch=armv7a -j8 How exactly did you run the Unit Tests? The neon binary files seem to be missing.

tsantosh1098 avatar Oct 26 '18 12:10 tsantosh1098

i run Unit Test on raspberry pi 3 ,while running the Unit Test on raspberry pi . I copied the file of armnn build generated files that is named as libarmnn.so, libarmnnTfParser.so files to the /usr/lib/ of raspberry pi .

prasannaonchip avatar Oct 26 '18 13:10 prasannaonchip

@prasannaonchip How exactly did you run the Unit Tests? The neon binary files seem to be missing.

i run Unit Test on raspberry pi 3 ,while running the Unit Test on raspberry pi . I copied the file of armnn build generated files that is named as libarmnn.so, libarmnnTfParser.so files to the /usr/lib/ of raspberry pi .

prasannaonchip avatar Oct 26 '18 13:10 prasannaonchip

sir did u get any neon function based files when u built ????

tsantosh1098 avatar Oct 26 '18 13:10 tsantosh1098

@AnthonyARM i tried building that also.. it didnt work it is giving the same error as previous

tsantosh1098 avatar Oct 26 '18 14:10 tsantosh1098

And ignoring Unit Tests (which is a 3rd party binary), can you run the Compute Library examples and unit tests?

AnthonyBarbier avatar Oct 26 '18 14:10 AnthonyBarbier

No I didn't get any neon function based files when I am building the armnn sdk.

prasannaonchip avatar Oct 28 '18 03:10 prasannaonchip

when i am building the compute library natively on raspberry pi .I used flags are scons Werror=1 debug=0 asserts=0 neon=1 opencl=1 examples=1 build=native –j2 .Here we are using the flags neon =1 opencl=1 for this flags is there any need to add this two flags -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 when building armnn sdk for tensorflow.

prasannaonchip avatar Oct 29 '18 05:10 prasannaonchip

compute library is support for openGL? For building ARMNN SDK for openGL.

prasannaonchip avatar Oct 30 '18 10:10 prasannaonchip

Compute Library has limited support on OpenGL as you can see in the repo. If you have problems building with armnn please open an issue in their project: https://github.com/ARM-software/armnn

Finally, are you still getting errors? If yes could you provide scons compilation command and running command with the results?

Thanks, Manuel

ManubARM avatar Feb 05 '19 17:02 ManubARM

Closing for inactivity, feel free to reopen otherwise

ManubARM avatar Feb 19 '19 10:02 ManubARM