Comments (8)
A bit more additional info
-
All errors in the build log boil down to the instantiation of boolean operations, which seem to be unsupported on neon64 (no bool register declared in https://github.com/xtensor-stack/xsimd/blob/10.0.0/include/xsimd/types/xsimd_neon64_register.hpp).
-
Minimal example to reproduce the error on a Raspberry Pi 3 B (the commented line will trigger the error):
#include <xtensor/xtensor.hpp>
int main()
{
{
xt::xtensor<double, 1> a{0., 1.};
xt::xtensor<double, 1> b = a && 0.;
}
{
xt::xtensor<bool, 1> a{false, true};
//xt::xtensor<bool, 1> b = a && false;
}
return 0;
}
from xsimd.
It's a bug in neon64 then :p
from xsimd.
I confirm the following xsimd-only snippet works on x86-64 but not on aarch64
#include <xsimd/xsimd.hpp>
auto pain() {
xsimd::batch<bool> x,y;
return x && y;
}
I'll investigate, thanks for bringing that up!
from xsimd.
In that case it's worth noting that xsimd is passing its own tests on arm64,
for v11 in particular, as 11.1.0-1exp4,
https://ci.debian.net/data/autopkgtest/unstable/arm64/x/xsimd/38216389/log.gz
(from https://ci.debian.net/packages/x/xsimd/unstable/arm64/ )
Does that mean xsimd::batch<bool>
is not being tested in the xsimd unit tests?
from xsimd.
@JohanMabille We currently don't have support for batch<bool>
. We could alias to batch<uint8_t>
or try to be smart, à la std::vector<bool>
. The actual implementation would be generic for point-to-point operations, but rather complex for shuffles and the like. Likewise memory operations would be slightly more complex, so I advocate for an alias to batch<uint8_t>
. What do you think?
from xsimd.
After some extra digging: we actually don't really support xsimd::batch<bool, A>
because we try to outsmart the user and decide it should be an xsimd::batch_bool<T, A>
. It's all linked to simd_return_type
and if I recall correctly, that's something that got baked in for xtensor
. @JohanMabille, any thoughts?
from xsimd.
armhf is also affected, apparently the same problem from neon, https://ci.debian.net/data/autopkgtest/unstable/armhf/x/xtensor/38875115/log.gz
from xsimd.
It's all linked to simd_return_type and if I recall correctly, that's something that got baked in for xtensor
Not only for xtensor, it is required to promote types when playing with mixed arithmetic (std::complex<double>
and double
for instance) and to allow operations on "equivalent" types (like std::complex
and xtl::complex
for instance).
batch<bool>
should definitely not support the same operations as batch<other_arithmetic_type>
. I know the following is valid in C++:
bool b1 = true, b2 = false;
bool res = b1 + b2;
but I find it ugly and we should definitely avoid this in xsimd
.
Also batch_bool
must be constructible from bool
scalars, not integers (even if C++ allows implicit conversions, we should not encourgae them in the API), so that's another reason for not aliasing it to batch<uint8_t>
.
We could imagine aliasing it to batch_bool<uint8_t>
, but then it would feel inconsistent with the return type of batch<double> == batch<double>
for instance.
This issue is definitely a bug in the definition of simd_return_type
, but we also need to understand why and I don't remember why we allowed register for bool on x86/x64 architecture.batch<bool>
is allowed on x86/x64 architectures.
from xsimd.
Related Issues (20)
- sigabrt in armhf tests: Cannot access memory, store location is not properly aligned HOT 2
- Compilation fails on FreeBSD, which causes `pip install scipy` to fail
- test_exp10 is failing on Windows
- Issue detecting AVX architecture on MacOS HOT 2
- Tests fail HOT 4
- Shuffle generic function for NEON
- Provide arithmetic overloads for batch constant
- Clang segfaults during build HOT 6
- `erfc` inaccurate results in non-constant batches
- batch(batch_bool) docs don't match implementation HOT 2
- configuring XTL complex number support in tests HOT 1
- Wrong rounding mode in nearbyint_as_int testcase
- riscv64, s390x error: ‘aligned_mode’ in namespace ‘xsimd’ does not name a type; did you mean ‘aligned_free’? HOT 3
- CHECK_EQ( extract(xsimd::polar(T(val0), T(val1))), std::polar(val0, val1) ) is NOT correct! HOT 3
- [Feature request] Add an option to skip installation HOT 15
- Doc search doesn't work HOT 2
- Over branching creation due to specialisation choices HOT 2
- `xsimd::exp` broken on aarch64 and GCC 10.2.1 with `--fast-math` HOT 1
- How to implement an expand function / scatter for masks? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xsimd.