Hi
I know this is an OpenBLAS specific question, probably better posted on an
OpenBLAS forum, but I just want to check that I have followed the correct steps
to rebuild the Debian/Ubuntu OpenBLAS package on my Raspberry Pi 4 Model B
running Ubuntu 20.04 aarch64.
Following the instructions in the source debian/README.Debian and the Debian
BuildingTutorial I did:
$ mkdir -p build/openblas
$ chown -R _apt:root build
$ cd build/openblas
$ sudo apt-get source openblas
$ sudo apt-get build-dep openblas
$ cd openblas-0.3.8+ds
$ sudo cp cpuid_arm64.c cpuid_arm64.c.original
$ sudo vim cpuid_arm64.c
$ diff cpuid_arm64.c cpuid_arm64.c.original
275c275
< printf("#define L2_SIZE 1048576\n");
---
> printf("#define L2_SIZE 524288\n");
278c278
< printf("#define DTB_DEFAULT_ENTRIES 32\n");
---
> printf("#define DTB_DEFAULT_ENTRIES 64\n");
$ DEB_BUILD_OPTIONS=custom dpkg-buildpackage -uc -b
cd ..
$ sudo apt remove libopenblas0-serial
$ sudo dpkg -i libopenblas0-serial_0.3.8+ds-1_arm64.deb
$ sudo update-alternatives --config libblas.so.3-aarch64-linux-gnu
Everything appears to have worked fine.
Note, the DTB_DEFAULT_ENTRIES is directly from the Arm Cortex-A72 TRM.
And, the result was that the performance of my Pi running a Linpack benchmark
was exactly the same as pre-L2 change. I was, possibly naively, expected a
modest improvement with a doubling of L2 cache size.
I would be grateful for confirmation that I have followed the correct procedure
to make a change to the package source code.
Kind regards