-
Notifications
You must be signed in to change notification settings - Fork 1.4k
remove HAS_FAST_INTEGER_VECTORS checks from panama support. #14901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,8 +42,7 @@ final class PanamaVectorConstants { | |
| // to be fair, they do document this thing only works well with AVX2/AVX3 and Neon | ||
| boolean isAMD64withoutAVX2 = | ||
| Constants.OS_ARCH.equals("amd64") && PREFERRED_VECTOR_BITSIZE < 256; | ||
| HAS_FAST_INTEGER_VECTORS = | ||
| VectorizationProvider.TESTS_FORCE_INTEGER_VECTORS || (isAMD64withoutAVX2 == false); | ||
| HAS_FAST_INTEGER_VECTORS = isAMD64withoutAVX2 == false; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above and let's do it like that: HAS_FAST_INTEGER_VECTORS = isAMD64withoutAVX2 == false || TESTS_VECTOR_SIZE.isPresent()
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the special test mode I'd like to test our code, although CPU is wrong.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we can better contain this constant we can also give it a better name. The idea is: if you are on x86, you need AVX2 as a minimum baseline for us to support vectors.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's OK. I just want the condition to stay alive here. |
||
|
|
||
| PRERERRED_LONG_SPECIES = | ||
| VectorSpecies.of(long.class, VectorShape.forBitSize(PREFERRED_VECTOR_BITSIZE)); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,10 @@ final class PanamaVectorizationProvider extends VectorizationProvider { | |
| "Vector bit size is less than 128: " + PanamaVectorConstants.PREFERRED_VECTOR_BITSIZE); | ||
| } | ||
|
|
||
| if (PanamaVectorConstants.HAS_FAST_INTEGER_VECTORS == false) { | ||
| throw new UnsupportedOperationException("No integer vector support"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd change this message a bit more verbose as this is logged to enduser in a warning (see Maybe "CPU flags do not guarantee fast integer vectors". |
||
| } | ||
|
|
||
| this.vectorUtilSupport = new PanamaVectorUtilSupport(); | ||
|
|
||
| var log = Logger.getLogger(getClass().getName()); | ||
|
|
@@ -53,8 +57,7 @@ final class PanamaVectorizationProvider extends VectorizationProvider { | |
| Locale.ENGLISH, | ||
| "Java vector incubator API enabled; uses preferredBitSize=%d%s%s", | ||
|
uschindler marked this conversation as resolved.
|
||
| PanamaVectorConstants.PREFERRED_VECTOR_BITSIZE, | ||
| Constants.HAS_FAST_VECTOR_FMA ? "; FMA enabled" : "", | ||
| PanamaVectorConstants.HAS_FAST_INTEGER_VECTORS ? "" : "; floating-point vectors only")); | ||
| Constants.HAS_FAST_VECTOR_FMA ? "; FMA enabled" : "")); | ||
| } | ||
|
|
||
| @Override | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.