Open exenGT opened 3 years ago
Thanks for the detailed report. Your example compiles fine on my side, but I'm running a Linux host, so I'd say it's an architecture-dependent issue. @JohanMabille does that ring any bell?
Yes, the hell of long
;)
@serge-sans-paille Can you define XSIMD_ENABLE_FALLBACK
in Pythran (or have an option that let the user define it)? This would allow to use the fallback batch (that is, batch<X, 1>
) when the library does not find a specialiazed batch for the considered type. I guess in this particular case, this would be a workaround since vectorization should work with long int.
@exenGT can you compile and run the following code:
#include <cstdint>
#include <iostream>
#include <type_traits>
int main(int argc, char* argv)
{
std::cout << "size of long: " << sizeof(long) << std::endl;
std::cout << "long == int: " << std::is_same<long, int>::value << std::endl;
std::cout << "lont == long long: " << std::is_same<long, long long>::value << std::endl;
std::cout << "long == int32_t: " << std::is_same<long, int32_t>::value << std::endl;
std::cout << "long == int64_t: " << std::is_same<long, int64_t>::value << std::endl;
return 0;
}
@serge-sans-paille I remember asking the same to another user here, but I could not retrieve the issue (just in case of you remember it too)
Hi @JohanMabille, the output of your code on my machine is:
size of long: 8
long == int: 0
lont == long long: 0
long == int32_t: 0
long == int64_t: 0
Hope that helps!
@exenGT thanks, that's definitely helpful! (and super weird Oo)
I'm not really sure it's exactly the same issue, I got a simillar error with this example using USE_XSIMD
# pythran export mysum(int[]) # failed
# pythran export mysum(int8[]) # work
# pythran export mysum(int16[]) # work
# pythran export mysum(int32[]) # failed
# pythran export mysum(int64[]) # work
# pythran export mysum(float[]) # failed and all variant of float also fail
def mysum(v0):
return v0 + 1
OS: Windows 10 clang-cl python: 3.7.6 and 3.9 pythran: 0.9.8.post2 and master
@JohanMabille sorry quite a bit delay. You asked me for that info in #1646 (my answer is provided there).
Here is a minimal example that generates this error:
pythran_test.py:
Using the command
pythran -vv pythran_test.py -DUSE_XSIMD
, a long error message appears:My system configuration is:
OS: MacOS Catalina 10.15.7 gcc: 10.2.0 python: 3.7.7 pythran: 0.9.8.post2 transonic: 0.4.7.post0
Thanks a lot!
Jingyang Wang