On Tue, 17 Mar 2026 02:14:51 GMT, Xiaohong Gong <[email protected]> wrote:
>> Strict assertion added to jdk.incubator.vector.CPUFeatures does not take >> into account MaxVectorSize settings. As a result we observer serval >> VectorAPI VectorMathLibrary test failures when MaxVectorSize is smaller than >> vector size supported by target. >> >> Patch removes these assertions, all vector API tests are passing with >> smaller MaxVectorSize with assertions enabled (-ea -es). >> >> Kindly review and share your feedback. >> >> Best Regards, >> Jatin > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/CPUFeatures.java > line 79: > >> 77: assert SUPPORTS_AVX512F == >> (VectorShape.getMaxVectorBitSize(int.class) == 512); >> 78: assert SUPPORTS_AVX2 == >> (VectorShape.getMaxVectorBitSize(byte.class) >= 256); >> 79: assert SUPPORTS_AVX == >> (VectorShape.getMaxVectorBitSize(float.class) >= 256); > > So is there any issue for the `suffix` if `MaxVectorSize` is lower than the > hardware support max vector size? > > https://github.com/openjdk/jdk/blob/921da0a9734d9fae2e7b0e129d2cc6949ad0b5a6/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMathLibrary.java#L123-L136 Like other stubs (crypto, non copy fill stubs) , SVML stubs themselves are agnostic to MaxVectorSize it's just the selection of stub/suffix which is guarded by vectorBitSize / feature check. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30015#discussion_r2944233445
