Improve Fused8BitRowwiseQuantizedSBFloatToFloatOrHalfNeon by 5%-15% #3860
+41
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
We are using SVE's pred to avoid the trailing loop, this technique shows an improved throughput of 5% to 15%.
Benchmarks carry a lot of variance, thus produced assembly was checked: https://godbolt.org/z/K6scf6P8s
Results are for the float32 case, used in AdRetriever
before:
rows, cols, elems_per_usec, GB/Sec
100, 16, 3536.86, 14.15
100, 64, 3363.99, 13.46
100, 128, 4674.71, 18.70
100, 256, 4708.46, 18.83
100, 512, 6247.59, 24.99
100, 1024, 6747.96, 26.99
100, 2048, 8719.72, 34.88
120, 16, 5210.26, 20.84
120, 64, 3850.57, 15.40
120, 128, 3688.19, 14.75
120, 256, 4566.65, 18.27
120, 512, 8684.83, 34.74
120, 1024, 8800.45, 35.20
120, 2048, 9396.97, 37.59
1000, 16, 5324.87, 21.30
1000, 64, 8846.61, 35.39
1000, 128, 8939.13, 35.76
1000, 256, 9537.45, 38.15
1000, 512, 9667.61, 38.67
1000, 1024, 7702.69, 30.81
1000, 2048, 8187.50, 32.75
after:
rows, cols, elems_per_usec, GB/Sec
100, 16, 4040.40, 16.16
100, 64, 3600.29, 14.40
100, 128, 4740.05, 18.96
100, 256, 4605.53, 18.42
100, 512, 7603.47, 30.41
100, 1024, 8693.21, 34.77
100, 2048, 9166.19, 36.66
120, 16, 3143.01, 12.57
120, 64, 3919.11, 15.68
120, 128, 4766.29, 19.07
120, 256, 5489.12, 21.96
120, 512, 8569.90, 34.28
120, 1024, 8916.10, 35.66
120, 2048, 9849.85, 39.40
1000, 16, 4903.63, 19.61
1000, 64, 9281.85, 37.13
1000, 128, 10090.42, 40.36
1000, 256, 10314.59, 41.26
1000, 512, 10142.08, 40.57
1000, 1024, 7991.56, 31.97
1000, 2048, 8030.02, 32.12
Differential Revision: D71602944