Compiling option for performance such as '-O2'


#1

HI!

I recently wrote a program that imports Tensorflow pb file and run autotvm for my ARM device. With the best autotvm result, my program generated *.tar file (by using module.export_library( … )).

Current target is as follows:

target = tvm.target.create('llvm -target=armv7l-linux-gnueabihf -mcpu=cortex-a15 -mattr=+neon -mfloat-abi=hard')

Interesting thing is that lib.o file in tar file has symbol information.
Running file command shows that it is not stripped. objdump also shows symbol information.

$ file lib.o
lib.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped

So I am curious that if the object file in tar is compiled with full optimization option. Can I use some optimization option string into target? Putting something like ‘-O2’ into target string didn’t work. (TVMError: [19:26:52] /home/eric/src/tvm/src/codegen/llvm/llvm_common.cc:92: unknown option -O2)

Could you let me know how to produce object file with strong optimization option without debug info?

Thank you!


#2

Regardless of debug symbol, I wonder if the target string I set was for the maximum performance. Since there is no option like -O2 at this moment, I think there could be more room for improvement.

FYI, one of my friends once tried the same network (inception v3) with ARM ACL on the same device. We compared the performance and found that the one using TVM took about 1000ms and my friend’s one with ARM ACL took about 700ms with inception v3.