commit | 3580a382980b27cf4d032b9ec5634d3df66ae24a | [log] [tgz] |
---|---|---|
author | Antonio Sanchez <cantonios@google.com> | Sun Mar 16 20:58:59 2025 -0700 |
committer | Antonio Sanchez <cantonios@google.com> | Tue Mar 18 10:46:32 2025 -0700 |
tree | bff201057f34e3934ede7500de7e0f10a407e4e4 | |
parent | 0259a52b0efe75c78f48f8a21b8092cd3fff319f [diff] |
Use native _Float16 for AVX512FP16 and update vectorization. This allows us to do faster native scalar operations. Also updated half/quarter packets to use the native type if available. Benchmark improvement: ``` Comparing ./2910_without_float16 to ./2910_with_float16 Benchmark Time CPU Time Old Time New CPU Old CPU New ------------------------------------------------------------------------------------------------------------------------------------ BM_CalcMat<float>/10000/768/500 -0.0041 -0.0040 58276392 58039442 58273420 58039582 BM_CalcMat<_Float16>/10000/768/500 +0.0073 +0.0073 642506339 647214446 642481384 647188303 BM_CalcMat<Eigen::half>/10000/768/500 -0.3170 -0.3170 92511115 63182101 92506771 63179258 BM_CalcVec<float>/10000/768/500 +0.0022 +0.0022 5198157 5209469 5197913 5209334 BM_CalcVec<_Float16>/10000/768/500 +0.0025 +0.0026 10133324 10159111 10132641 10158507 BM_CalcVec<Eigen::half>/10000/768/500 -0.7760 -0.7760 45337937 10156952 45336532 10156389 OVERALL_GEOMEAN -0.2677 -0.2677 0 0 0 0 ``` Fixes #2910.
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/ or https://libeigen.gitlab.io/docs/.
For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.