Integrated: 8282711: Accelerate Math.signum function for AVX and AVX512 target.

Jatin Bhateja jbhateja at openjdk.java.net
Fri Apr 29 06:37:32 UTC 2022


On Mon, 7 Mar 2022 02:01:55 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

> - Patch auto-vectorizes Math.signum operation for floating point types.
> - Efficient JIT sequence is being generated for AVX512 and legacy X86 targets.
> - Following is the performance data for include JMH micro.
> 
> System : Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz  (40C 2S Icelake Server) 
> 
> Benchmark | (SIZE) | Baseline AVX (ns/op) | Withopt AVX (ns/op) | Gain Ratio | Basline AVX512 (ns/op) | Withopt AVX512 (ns/op) | Gain Ratio
> -- | -- | -- | -- | -- | -- | -- | --
> VectorSignum.doubleSignum | 256 | 177.01 | 58.457 | 3.028037703 | 175.46 | 40.996 | 4.279929749
> VectorSignum.doubleSignum | 512 | 340.244 | 115.162 | 2.954481513 | 340.697 | 78.779 | 4.324718516
> VectorSignum.doubleSignum | 1024 | 665.628 | 235.584 | 2.82543806 | 668.958 | 157.706 | 4.24180437
> VectorSignum.doubleSignum | 2048 | 1312.473 | 468.997 | 2.798467794 | 1305.233 | 1295.126 | 1.007803874
> VectorSignum.floatSignum | 256 | 175.895 | 31.968 | 5.502220971 | 177.95 | 25.438 | 6.995439893
> VectorSignum.floatSignum | 512 | 341.472 | 59.937 | 5.697182041 | 336.86 | 42.946 | 7.843803847
> VectorSignum.floatSignum | 1024 | 663.263 | 127.245 | 5.212487721 | 656.554 | 84.945 | 7.729165931
> VectorSignum.floatSignum | 2048 | 1317.936 | 236.527 | 5.572031946 | 1292.6 | 160.474 | 8.054887396
> 
> Kindly review and share feedback.
> 
> Best Regards,
> Jatin

This pull request has now been integrated.

Changeset: e4066628
Author:    Jatin Bhateja <jbhateja at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/e4066628ad7765082391433d64461eef66b5f508
Stats:     338 lines in 13 files changed: 336 ins; 1 del; 1 mod

8282711: Accelerate Math.signum function for AVX and AVX512 target.

Reviewed-by: sviswanathan, thartmann

-------------

PR: https://git.openjdk.java.net/jdk/pull/7717


More information about the hotspot-compiler-dev mailing list