-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
Outsource functions in bitset.pxi that can be optimized by intrinsics #30596
Comments
comment:2
LGTM. |
Reviewer: Travis Scrimshaw |
comment:3
Thank you. |
comment:4
I got an issue when building the documentation on sage-on-gentoo with this
when examining the module more closely I see the following
I am using gmp-6.0.2 with gcc-10. |
comment:5
I am not able to reproduce this on my machine. |
comment:6
And the bot is green. This is very weird and why just those three? Volker is trying to merge this ticket at the moment and I am suspecting he may be seeing this or a variation. Have you tried it together with #30572? Obviously same author and reviewers :) |
comment:7
Replying to @kiwifb:
I just tried both of them (well, more precisely, merging in #30572 and then rebuilding the doc), and I didn't have the problem either. Let me know if there is any information I can provide that might help you figure it out. |
comment:8
Which version of gcc do you use? It seems that in C99 which is the default for C of gcc-10 in Gentoo If I understand correctly some of these functions should be |
comment:9
My system gcc is 7.5.0, but I don't know if that is what Sage is using to compile. Is there an easy way for me to check if that is what Sage is using? IIRC, I have done a |
comment:10
I guess |
comment:11
It is using my system gcc:
|
comment:12
Maybe we then ask that this not be included in 9.2 this late in the process, but instead in 9.3.beta0 so it can get broad testing across the developer group? |
comment:13
I'd do a I am not sure how late we are in the 9.2 process. I have a feeling we have some objectives for 9.2 and we'll go for as long as it take. We already had a few more betas than usual. |
comment:14
Well, the documentation has started to build now - instead of bailing out straight away as it would previously. |
comment:15
Well --- a/sage/data_structures/bitset_intrinsics.h
+++ b/sage/data_structures/bitset_intrinsics.h
@@ -9,7 +9,7 @@
#############################################################################
*/
-inline int _bitset_isempty(mp_limb_t* bits, mp_bitcnt_t limbs){
+static inline int _bitset_isempty(mp_limb_t* bits, mp_bitcnt_t limbs){
/*
Test whether bits is empty. Return True (i.e., 1) if the set is
empty, False (i.e., 0) otherwise.
@@ -24,7 +24,7 @@ inline int _bitset_isempty(mp_limb_t* bits, mp_bitcnt_t limbs){
return mpn_cmp(bits+1, bits, limbs-1) == 0;
}
-inline int _bitset_eq(mp_limb_t* a, mp_limb_t* b, mp_bitcnt_t limbs){
+static inline int _bitset_eq(mp_limb_t* a, mp_limb_t* b, mp_bitcnt_t limbs){
/*
Compare bitset a and b. Return True (i.e., 1) if the sets are
equal, and False (i.e., 0) otherwise.
@@ -32,7 +32,7 @@ inline int _bitset_eq(mp_limb_t* a, mp_limb_t* b, mp_bitcnt_t limbs){
return mpn_cmp(a, b, limbs) == 0;
}
-inline int _bitset_issubset(mp_limb_t* a, mp_limb_t* b, mp_bitcnt_t limbs){
+static inline int _bitset_issubset(mp_limb_t* a, mp_limb_t* b, mp_bitcnt_t limbs){
/*
Test whether a is a subset of b (i.e., every element in a is also
in b). did the trick, I have a successful build now. |
Changed branch from u/gh-kliem/bitset_outsource_functions_optimizable_by_intrinsics to |
comment:17
I guess then perhaps we need to make it a followup ticket... |
Changed commit from |
comment:18
That would be nice. Although I must say I find it strange to be the only one spotting this. I would have expected some bots to fail too. There may be something more that causes the failure, even if adding |
comment:19
Follow up is at #30675. |
We move functions that can easily optimized by CPU-specific instructions to a new file
bitset_intrinsics.h
.CC: @tscrim
Component: cython
Keywords: bitset, intrinsics
Author: Jonathan Kliem
Branch:
49a95f3
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/30596
The text was updated successfully, but these errors were encountered: