You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CPU MobileBert performance regression starting from #5573 #5634
The performance number on Mako dashboard went from ~700 ms to ~11400 ms starting from #5573
It happens on both S20 and Pixel 4.
@asaadaldien and I had a few discussion in PR and discord. Filing an issue for tracking it.
Ahmed, could you share how you get ~690 ms on main branch? I suspect that the flags you used is different from the setting on configuration.py. The compilation flags are --iree-llvm-target-triple=aarch64-none-linux-android29 --iree-flow-inline-constants-max-byte-length=2048 --iree-flow-dispatch-formation-enable-operand-fusion on Mako. (I will also give it a shot on my local Pixel 4)
This is my full command for compilation: iree-translate --iree-mlir-to-vm-bytecode-module --iree-hal-target-backends=dylib-llvm-aot ~/MobileBertSquad/iree_input.mlir -iree-llvm-target-triple=aarch64-none-linux-android29 --iree-flow-inline-constants-max-byte-length=2048 --iree-flow-dispatch-formation-enable-operand-fusion -o a.vmfb
------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------------------------
BM_serving_default/process_time/real_time 17285 ms 17193 ms 1
With -iree-llvm-loop-unrolling=true, it is a bit better -- 16649 ms.
--iree-flow-dispatch-formation-enable-operand-fusion is causing regression and compilation error (unhandled multiple root operations in a dispatch region) that isn't failing the pass and I think it should.
Lets file a different issue to track why operand-fusion is broken for Mobilebert when linalg.generic are tiled and distributed.
Activity
hanhanW commentedon Apr 27, 2021
I got 17285 ms on my Pixel 4.
This is my full command for compilation:
iree-translate --iree-mlir-to-vm-bytecode-module --iree-hal-target-backends=dylib-llvm-aot ~/MobileBertSquad/iree_input.mlir -iree-llvm-target-triple=aarch64-none-linux-android29 --iree-flow-inline-constants-max-byte-length=2048 --iree-flow-dispatch-formation-enable-operand-fusion -o a.vmfbExecution command:
And you will see
With
-iree-llvm-loop-unrolling=true, it is a bit better --16649ms.asaadaldien commentedon Apr 27, 2021
--iree-flow-dispatch-formation-enable-operand-fusionis causing regression and compilation error (unhandled multiple root operations in a dispatch region) that isn't failing the pass and I think it should.Lets file a different issue to track why operand-fusion is broken for Mobilebert when
linalg.genericare tiled and distributed.hanhanW commentedon Apr 27, 2021
Issue #5636 already filed. I'll close this one after I fix it in configuration.py
Only add operand-fusion to MobileNetV2. (#5639)
Only add operand-fusion to MobileNetV2. (iree-org#5639)