Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1053090: libxsimd-dev: arm64 error in xtensor: usage of batch type with unsupported type

5 views
Skip to first unread message

Drew Parsons

unread,
Sep 26, 2023, 10:30:06 PM9/26/23
to
Package: libxsimd-dev
Version: 10.0.0-3
Severity: serious
Justification: debci

libxsimd-dev 10 triggers an error in xtensor tests on arm64
xsimd passes its own tests, and xtensor passes on other arches (except
armel which has known issues)

The error output from
https://ci.debian.net/data/autopkgtest/unstable/arm64/x/xtensor/38197207/log.gz
is

127s [ 26%] Building CXX object CMakeFiles/test_xtensor_lib.dir/test_xoptional_assembly.cpp.o
127s /usr/bin/g++ -DXSIMD_ENABLE_XTL_COMPLEX -DXTENSOR_USE_XSIMD -DXSIMD_ENABLE_XTL_COMPLEX=1 -march=native -std=c++14 -Wunused-parameter -Wextra -Wreorder -Wconversion -Wno-sign-conversion -Wold-style-cast -Wunused-variable -ftemplate-backtrace-limit=0 -O3 -DNDEBUG -MD -MT CMakeFiles/test_xtensor_lib.dir/test_xoptional_assembly.cpp.o -MF CMakeFiles/test_xtensor_lib.dir/test_xoptional_assembly.cpp.o.d -o CMakeFiles/test_xtensor_lib.dir/test_xoptional_assembly.cpp.o -c /tmp/autopkgtest-lxc.1p570fd4/downtmp/autopkgtest_tmp/test_xoptional_assembly.cpp
131s In file included from /usr/include/xsimd/types/xsimd_batch.hpp:493,
131s from /usr/include/xsimd/xsimd.hpp:61,
131s from /usr/include/xtensor/xtensor_config.hpp:61,
131s from /usr/include/xtensor/xexception.hpp:24,
131s from /usr/include/xtensor/xstorage.hpp:21,
131s from /usr/include/xtensor/xbuffer_adaptor.hpp:21,
131s from /usr/include/xtensor/xarray.hpp:19,
131s from /tmp/autopkgtest-lxc.1p570fd4/downtmp/autopkgtest_tmp/test_xoperation.cpp:13:
131s /usr/include/xsimd/types/xsimd_traits.hpp: In instantiation of ‘struct xsimd::detail::static_check_supported_config_emitter<bool, xsimd::neon64>’:
131s /usr/include/xsimd/types/xsimd_traits.hpp:84:19: required from ‘void xsimd::detail::static_check_supported_config() [with T = bool; A = xsimd::neon64]’
131s /usr/include/xsimd/types/xsimd_api.hpp:437:55: required from ‘xsimd::simd_return_type<From, To, A> xsimd::broadcast_as(From) [with To = int; A = neon64; From = bool; simd_return_type<From, To, A> = batch_bool<int, neon64>]’
131s /usr/include/xtensor/xscalar.hpp:952:53: required from ‘xt_simd::simd_return_type<typename xt::xcontainer_inner_types<xt::xscalar<CT> >::value_type, requested_type> xt::xscalar<CT>::load_simd(size_type) const [with align = xt::inner_aligned_mode; requested_type = int; long unsigned int N = 4; CT = bool; xt_simd::simd_return_type<typename xt::xcontainer_inner_types<xt::xscalar<CT> >::value_type, requested_type> = xsimd::batch_bool<int, xsimd::neon64>; typename xt::xcontainer_inner_types<xt::xscalar<CT> >::value_type = bool; size_type = long unsigned int]’
...
131s /usr/include/xtensor/xarray.hpp:510:30: required from ‘xt::xarray_container<EC, L, SC, Tag>::xarray_container(const xt::xexpression<E>&) [with E = xt::xfunction<xt::detail::logical_and, const xt::xarray_container<xt::uvector<bool, xsimd::aligned_allocator<bool, 16> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&, xt::xscalar<bool> >; EC = xt::uvector<bool, xsimd::aligned_allocator<bool, 16> >; xt::layout_type L = xt::layout_type::row_major; SC = xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>; Tag = xt::xtensor_expression_tag]’
131s /tmp/autopkgtest-lxc.1p570fd4/downtmp/autopkgtest_tmp/test_xoperation.cpp:378:28: required from ‘void xt::DOCTEST_ANON_SUITE_131::DOCTEST_ANON_TMP_150() [with TypeParam = xt::xarray_container<xt::uvector<double, xsimd::aligned_allocator<double, 16> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>]’
131s /tmp/autopkgtest-lxc.1p570fd4/downtmp/autopkgtest_tmp/test_xoperation.cpp:372:9: required from ‘xt::DOCTEST_ANON_SUITE_131::{anonymous}::DOCTEST_ANON_TMP_150ITERATOR<std::tuple<_El0, _El ...> >::DOCTEST_ANON_TMP_150ITERATOR(const char*, unsigned int, int) [with Type = xt::xarray_container<xt::uvector<double, xsimd::aligned_allocator<double, 16> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>; Rest = {xt::xtensor_container<xt::uvector<double, xsimd::aligned_allocator<double, 16> >, 2, xt::layout_type::row_major, xt::xtensor_expression_tag>}]’
131s /tmp/autopkgtest-lxc.1p570fd4/downtmp/autopkgtest_tmp/test_xoperation.cpp:372:9: required from here
131s /usr/include/xsimd/types/xsimd_traits.hpp:64:43: error: static assertion failed: usage of batch type with unsupported type
131s 64 | static_assert(!A::supported() || xsimd::has_simd_register<T, A>::value,
131s | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131s /usr/include/xsimd/types/xsimd_traits.hpp:64:43: note: ‘((! xsimd::neon64::supported()) || ((bool)std::integral_constant<bool, false>::value))’ evaluates to false


Since xsimd passes it's own test, this might be a bug in xtensor.
Filing against libxsimd-dev to pause migration to testing.


-- System Information:
Debian Release: trixie/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

libxsimd-dev depends on no packages.

libxsimd-dev recommends no packages.

Versions of packages libxsimd-dev suggests:
ii libxsimd-doc 11.1.0-1exp3

-- no debconf information

Drew Parsons

unread,
Oct 3, 2023, 2:10:04 PM10/3/23
to
Package: libxsimd-dev
Followup-For: Bug #1053090
Control: reassign 1053090 libxtensor-dev
Control: forwarded 1053090 https://github.com/xtensor-stack/xtensor/issues/2733

xsimd upstream https://github.com/xtensor-stack/xsimd/issues/945
identified the problem that neon64 does not support bool.

A minimal test case using xtensor only was found:

#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;
}


That contains the problem inside xtensor, so transferring this bug to
the xtensor package.

Drew Parsons

unread,
Oct 18, 2023, 7:00:06 AM10/18/23
to
Source: xtensor
Version: 0.24.7-4
Followup-For: Bug #1053090
Control: severity 1053090 important

xsimd support is optional for xtensor.

Use of batch<bool> is apparently not expected to be routinely used
anyway. See further discussion at
https://github.com/xtensor-stack/xsimd/issues/945

In summary, xtensor can be run on arm64 (and armel) without xsimd,
and batch<bool> support should not be considered release-critical.

For these reasons I'm downgrading this bug to Severity: important.
It wouldn't be constructive to remove xtensor from testing.
0 new messages