Files
test/extern/Eigen3/eigen-update.sh
Brecht Van Lommel da9a9093ec Refactor: Eigen: Switch from OpenMP to TBB
Only the parallel sparse matrix code was updated. This is used by e.g.
LSCM and ABF unwrap, and performance seems about the same or better.

Parallel GEMM (dense matrix-matrix multiplication) is used by libmv,
for example in libmv_keyframe_selection_test for a 54 x 54 matrix.
However it appears to harm performance, removing parallelization makes
that test run 5x faster on a Apple M3 Max.

There has been no new Eigen release since 2021, however there is active
development in master and it includes support for a C++ thread pool for
GEMM. So we could upgrade, but the algorithm remains the same and
looking at the implementation it just does not seem designed for modern
many core CPUs. Unless the matrix is much larger, there's too much thread
synchronization overhead. So it does not seem useful to enable that
thread pool for us.

Pull Request: https://projects.blender.org/blender/blender/pulls/136865
2025-04-02 16:50:50 +02:00

32 lines
848 B
Bash
Executable File

#!/bin/sh
echo "*** EIGEN#-HG Update utility"
echo "*** This gets a new eigen3-hg tree and adapts it to blenders build structure"
echo "*** Warning! This script will wipe all the header file"
if [ "x$1" = "x--i-really-know-what-im-doing" ] ; then
echo Proceeding as requested by command line ...
else
echo "*** Please run again with --i-really-know-what-im-doing ..."
exit 1
fi
# get the latest revision from repository.
git clone https://gitlab.com/libeigen/eigen.git eigen.git
if [ -d eigen.git ]
then
rm -rf Eigen
cd eigen.git
# put here the version you want to use
git checkout 3.4.0
rm -f `find Eigen/ -type f -name "CMakeLists.txt"`
cp -r Eigen ..
cd ..
rm -rf eigen.git
find Eigen -type f -exec chmod 644 {} \;
patch -p3 < patches/blender.patch
else
echo "Did you install Git?"
fi