buddy-compiler / buddy-benchmark

Benchmark Framework for Buddy Projects
Apache License 2.0
45 stars 36 forks source link

[DeepLearning/Models] add MobileNet-V3 Model benchmark #131

Closed ShiHaoGao closed 2 weeks ago

ShiHaoGao commented 1 month ago

k230: image-20240712144722362

local: image-20240712145055758

ShiHaoGao commented 1 month ago

MobileNet-V3 benchmark on local hardware platform is upated. But, build mobileNet-V3 benchmark lib on RV platform has some errors about LLVM.

LLVM ERROR: Incomplete scavenging after 2nd pass
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc -O0 -mtriple=riscv64 -mattr=+v,+m -filetype=obj -o /home/gaoshihao/project/buddy-benchmark/build/bin/../benchmarks/DeepLearning/Models/MobileNet-V3/subgraph0_scalar.o
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@_mlir_ciface_subgraph0_scalar'
 #0 0x0000564f422cd850 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x1d65850)
 #1 0x0000564f422cac5f llvm::sys::RunSignalHandlers() (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x1d62c5f)
 #2 0x0000564f422cadb5 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f2024a71520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007f2024ac59fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x00007f2024ac59fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x00007f2024ac59fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x00007f2024a71476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007f2024a577f3 abort ./stdlib/abort.c:81:7
 #9 0x0000564f40a07910 llvm::RISCVISAInfo::updateImplication() (.cold) RISCVISAInfo.cpp:0:0
#10 0x0000564f42221e8e (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x1cb9e8e)
#11 0x0000564f41748654 llvm::scavengeFrameVirtualRegs(llvm::MachineFunction&, llvm::RegScavenger&) (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x11e0654)
#12 0x0000564f416a778b (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) PrologEpilogInserter.cpp:0:0
#13 0x0000564f4151f837 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#14 0x0000564f41ae80de llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x15800de)
#15 0x0000564f41ae8329 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x1580329)
#16 0x0000564f41ae8c65 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x1580c65)
#17 0x0000564f40a8177e compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#18 0x0000564f40a0cfb6 main (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x4a4fb6)
#19 0x00007f2024a58d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#20 0x00007f2024a58e40 call_init ./csu/../csu/libc-start.c:128:20
#21 0x00007f2024a58e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#22 0x0000564f40a78495 _start (/home/gaoshihao/project/buddy-mlir/build/../llvm/build/bin/llc+0x510495)
Aborted (core dumped)
ninja: build stopped: subcommand failed.

local:

image-20240717163842163
zhanghb97 commented 1 month ago
[18/18] Linking CXX executable bin/dl-model-mobileNetV3-benchmark
FAILED: bin/dl-model-mobileNetV3-benchmark 
: && /home/zhanghongbin/buddy-mlir/build/thirdparty/riscv-gnu-toolchain/bin/riscv64-unknown-linux-gnu-g++ -no-pie -O3 -DNDEBUG -static benchmarks/DeepLearning/Models/MobileNet-V3/CMakeFiles/dl-model-mobileNetV3-benchmark.dir/GoogleBenchmarkMain.cpp.o -o bin/dl-model-mobileNetV3-benchmark  vendor/benchmark/lib/libbenchmark.a  benchmarks/DeepLearning/Models/MobileNet-V3/libMOBILENETV3_SCALAR.a  benchmarks/DeepLearning/Models/MobileNet-V3/libMOBILENETV3_AUTO_VECTORIZATION.a  /home/zhanghongbin/buddy-mlir/build-cross-rv//lib/libStaticMLIRCRunnerUtils.a && :
/home/zhanghongbin/buddy-mlir/build/thirdparty/riscv-gnu-toolchain/lib/gcc/riscv64-unknown-linux-gnu/13.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: benchmarks/DeepLearning/Models/MobileNet-V3/libMOBILENETV3_SCALAR.a(forward_scalar.o): Relocations in generic ELF (EM: 62)
/home/zhanghongbin/buddy-mlir/build/thirdparty/riscv-gnu-toolchain/lib/gcc/riscv64-unknown-linux-gnu/13.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: benchmarks/DeepLearning/Models/MobileNet-V3/libMOBILENETV3_SCALAR.a(forward_scalar.o): Relocations in generic ELF (EM: 62)
/home/zhanghongbin/buddy-mlir/build/thirdparty/riscv-gnu-toolchain/lib/gcc/riscv64-unknown-linux-gnu/13.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: benchmarks/DeepLearning/Models/MobileNet-V3/libMOBILENETV3_SCALAR.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ShiHaoGao commented 3 weeks ago

k230:

image
zhanghb97 commented 2 weeks ago
  1. The README does not contain tips and guidance for the Python environment

    image
  2. The RVV target file has the wrong format

image