-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
arm: optimize decoder on Arm SVE2 platform #92
Conversation
@cyb70289 What's unit of your benchmark results? HIB or LIB? |
Gi/s and Mi/s, bytes per second. As an example
|
see #56,support sve as a different arch. |
Thanks, will try to refactor following that PR. |
@xiegx94 , sve2-128 implementation is added. Arm common code is moved to common/arm_common/. |
Any convenient way to run clang-format job locally? |
Could you install clang in your machine? If you have a clang-format, run |
Thanks, format should be fixed now. |
"Test coverage" runs successfully on my local x86 server. Not sure why CI job fails. Looks it's only for x86? |
@cyb70289 pls update cmake/set_arch_flags.cmake. |
This patch improves sonic json decoder performance on Arm SVE2 CPU. It leverages SVMATCH instruction to locate multiple tokens in a vector efficiently. Enable this feature by specifying cmake option "-DENABLE_SVE2_128=ON". Please note the binary can only run on hardware with SVE2 supported, and the vector size must be 128 bits, like Neoverse-N2. Otherwise, the code behaviour is undefined. As shown in the table below, tested on bluewhale server, obvious performance uplift is observed from sonic decoder benchmarks. No side effect observed for other benchmarks. | Benchmark | Original | SVE2 | Improvement | |--------------------------------|----------|---------|-------------| | gsoc-2018/Decode_SonicDyn | 2.38736 | 2.76677 | 15.89% | | citm_catalog/Decode_SonicDyn | 1.41729 | 1.76191 | 24.32% | | otfcc/Decode_SonicDyn | 399.916 | 413.417 | 3.38% | | fgo/Decode_SonicDyn | 691.597 | 716.301 | 3.57% | | twitter/Decode_SonicDyn | 1.33604 | 1.58737 | 18.81% | | twitterescaped/Decode_SonicDyn | 1.24759 | 1.30216 | 4.37% | | github_events/Decode_SonicDyn | 1.38961 | 1.65635 | 19.20% | | canada/Decode_SonicDyn | 526.145 | 524.517 | -0.31% | | poet/Decode_SonicDyn | 2.06297 | 2.40383 | 16.52% | | lottie/Decode_SonicDyn | 419.902 | 438.824 | 4.51% | | book/Decode_SonicDyn | 456.615 | 487.196 | 6.70% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This patch improves sonic json decoder performance on Arm SVE2 CPU.
It leverages SVMATCH instruction to locate multiple tokens in a vector
efficiently.
Enable this feature by specifying cmake option "-DENABLE_SVE2_128=ON".
Please note the binary can only run on hardware with SVE2 supported,
and the vector size must be 128 bits, like Neoverse-N2. Otherwise,
the code behaviour is undefined.
As shown in the table below, tested on Bluewhale server, obvious
performance uplift is observed from sonic decoder benchmarks.
No side effect observed for other benchmarks.