Closed nshmyrev closed 3 years ago
Unless you specify TARGET=CORE2 or something oldest you are targetting - ISAs from build machine get used for library's common code. Still stands with v0.3.13.
Your build log segment does not match function disassembled maybe attach complete log to get better insight.
I use this line:
make -C OpenBLAS ONLY_CBLAS=1 DYNAMIC_ARCH=1 USE_LOCKING=1 USE_THREAD=0 all
it used to work in 0.3.7 without target specification.
Readme says:
The TARGET option can be used in conjunction with DYNAMIC_ARCH=1 to specify which cpu model should be assumed for all the common code in the library, usually you will want to set this to the oldest model you expect to encounter. Please note that it is not possible to combine support for different architectures, so no combined 32 and 64 bit or x86_64 and arm64 in the same library.
I assume I don't have to specify the target.
I believe this is already fixed on the develop
branch (master
is currently stale). In 0.3.7 the codebase did not yet make use of Intel intrinsics, so compiler options to enable FMA etc. were not added automatically as they are now. Generally you would need to set TARGET to the oldest cpu that you expect to run the DYNAMIC_ARCH build on, but in earlier versions you were more likely to get away with leaving this out.
Ok, thank you for information. I'll set the TARGET as a workaround but I must warn that the pattern without TARGET is very common:
and you might get many complains about this change.
And develop branch still uses avx/avx2 which might not be available on atoms (one of the frequent targets).
it is not a change, it is there since GotoBLAS. At that time it was common HPC practice to set unpatched machine with old CPU to build software, so result worked well. Maybe it is worth setting old target for DYNAMIC_ARCH in place of native one.
I've even made the build system report the minimum required hardware at the end of DYNAMIC_ARCH builds, but I guess as soon as this gets incorporated into some build_my_dependencies thingy nobody actually reads the message anymore. (This is one of the things were the original GotoBLAS assumption breaks down, that the library will be purpose-built for the known range of computers in a user's possession.)
Thank you for comments guys, its up to you to close this.
Thanks for reporting. It already keeps coming, you were first one to point some source why....
Closing after finally confirming that 0.3.13 already (i.e. not just the develop branch) behaves as intended with DYNAMIC_ARCH. The fairly recent introduction of the -mfma
option only makes it more likely that omission of a suitable TARGET argument creates an unexpected dependency on cpu features of the build host.
Due to changes in Makfile.x86_64, in release 0.3.13 we have fma options used with DYNAMIC_ARCH:
This leads to illegal instructions in dgbmv_t as here https://github.com/alphacep/vosk-api/issues/355:
In master latest makefile changes are missing. Is something going wrong with the last release?