RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]
Magnus Ihse Bursie
ihse at openjdk.org
Mon Nov 27 15:25:12 UTC 2023
On Mon, 27 Nov 2023 15:11:32 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> You still need to separate out the SVE detection from the libsleef code, and provide a way to enable/disable it from the configure command line. It is not okay to auto-detect if features should be turned on or off by default, but it should always be possible to override.
>
>> You still need to separate out the SVE detection from the libsleef code, and provide a way to enable/disable it from the configure command line.
>
> Why? I don't think this should be a build-time option at all, because it puts the people who build binaries in an impossible position. Can't this all be built unconditionally, with run-time feature detection?
Apparently the situation is this: If your build machine happens to have SVE, then you will get SVE support in the vmath library. The SVE support will be used during runtime if the machine you run on has SVE support.
If your build host happens to to not have SVE, then the vmath library will be built without SVE support, and no matter if your runtime machine has SVE or not, it will not provide SVE support in the vmath library.
Now, if your CI farm has an arbitrarily selection of aarch64 machines with and without SVE, then you have no idea what you are going to get in your build.
We have been very careful in staying clear of this kind of "random" build system behavior. The system you build on should not affect the output -- at least, not without a chance to override the default value.
In fact, I am not even sure why it seems to the PR author to be a good idea to let the default be dependent on the build machine at all. My personal opinion is that it would be better to select either "SVE enabled" or "SVE disabled" as the default, and then let the user override this on the configure command line, if they target a platform with different SVE availability.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16234#discussion_r1406326711
More information about the core-libs-dev
mailing list