Skip to content
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

test_complex_conj fails with xsimd 8 #1943

Closed
drew-parsons opened this issue Dec 5, 2021 · 7 comments
Closed

test_complex_conj fails with xsimd 8 #1943

drew-parsons opened this issue Dec 5, 2021 · 7 comments

Comments

@drew-parsons
Copy link

drew-parsons commented Dec 5, 2021

Running pythran tests, all pass with xsimd 7.6 (xtensor 0.23).

But with xsimd 8.0.3 (xtensor 0.24.0), TestBase.test_complex_conj fails, with the following errors collected in stderr:

In file included from /projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/__dispatch__/conjugate.hpp:4,
                 from /tmp/tmpytnjb9kb.cpp:10:
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:22:36: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class A> class xsimd::batch’
   22 |     xsimd::batch<std::complex<T>, N>
      |                                    ^
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:22:36: note:   expected a type, got ‘N’
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:23:46: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class A> class xsimd::batch’
   23 |     conjugate(xsimd::batch<std::complex<T>, N> const &v)
      |                                              ^
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:23:46: note:   expected a type, got ‘N’
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp: In function ‘int {anonymous}::pythonic::numpy::wrapper::conjugate(const int&)’:
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:25:25: error: no matching function for call to ‘conj(const int&)’
   25 |       return xsimd::conj(v);
      |              ~~~~~~~~~~~^~~
In file included from /usr/include/xsimd/xsimd.hpp:24,
                 from /projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:8,
                 from /projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/__dispatch__/conjugate.hpp:4,
                 from /tmp/tmpytnjb9kb.cpp:10:
/usr/include/xsimd/types/xsimd_api.hpp:392:35: note: candidate: ‘template<class A, class T> xsimd::complex_batch_type_t<xsimd::batch<T, A> > xsimd::conj(const xsimd::batch<T, A>&)’
  392 | complex_batch_type_t<batch<T, A>> conj(batch<T, A> const& z) {
      |                                   ^~~~
/usr/include/xsimd/types/xsimd_api.hpp:392:35: note:   template argument deduction/substitution failed:
In file included from /projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/__dispatch__/conjugate.hpp:4,
                 from /tmp/tmpytnjb9kb.cpp:10:
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:25:25: note:   mismatched types ‘const xsimd::batch<T, A>’ and ‘const int’
   25 |       return xsimd::conj(v);
      |              ~~~~~~~~~~~^~~
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp: At global scope:
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:28:22: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class A> class xsimd::batch’
   28 |     xsimd::batch<T, N> conjugate(xsimd::batch<T, N> const &v)
      |                      ^
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:28:22: note:   expected a type, got ‘N’
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:28:51: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, class A> class xsimd::batch’
   28 |     xsimd::batch<T, N> conjugate(xsimd::batch<T, N> const &v)
      |                                                   ^
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:28:51: note:   expected a type, got ‘N’
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:28:24: error: redefinition of ‘template<class T, long unsigned int N> int {anonymous}::pythonic::numpy::wrapper::conjugate(const int&)’
   28 |     xsimd::batch<T, N> conjugate(xsimd::batch<T, N> const &v)
      |                        ^~~~~~~~~
/projects/python/build/pythran/.pybuild/cpython3_3.9_pythran/build/pythran/pythonic/include/numpy/conjugate.hpp:23:5: note: ‘template<class T, long unsigned int N> int {anonymous}::pythonic::numpy::wrapper::conjugate(const int&)’ previously declared here
   23 |     conjugate(xsimd::batch<std::complex<T>, N> const &v)
      |     ^~~~~~~~~
@serge-sans-paille
Copy link
Owner

Which version of pythran is that? It seems to pass correctly on master.
Support for xsimd 8> got introduced in 418bd3e which is not included in pythran 0.10.0.

@drew-parsons
Copy link
Author

This is pythran 0.10.0
(0.10.0+ds-1 for debian packaging, https://salsa.debian.org/python-team/packages/pythran ).
Sounds like you've already fixed it. I'll try applying 418bd3e .

@serge-sans-paille
Copy link
Owner

serge-sans-paille commented Dec 5, 2021 via email

@drew-parsons
Copy link
Author

drew-parsons commented Dec 5, 2021

In a sense :) You are right, 418bd3e does not apply cleanly to 0.10.0. So I'll wait for the new version before testing again with xsimd 8.

But no rush. pythran is a new package for debian, it's in the NEW queue (https://ftp-master.debian.org/new.html). It may take some time to get processed and placed into the package archive. So it won't be available to our users until that is done anyway.

Is the patch backwards-compatible, i.e. does the latest git head, with the patch applied, still build against the older xsimd 7.6 as well as xsimd 8?

@serge-sans-paille
Copy link
Owner

ok, it's good to have xsimd 8 in a new release anyway. And no, xsimd 8 and xsimd 7 are not compatible (thus the major version bump)

@serge-sans-paille
Copy link
Owner

@drew-parsons I believe we can close that issue: the new release depends on xsimd 8, and that should be enough for you, correct?

@drew-parsons
Copy link
Author

That's fine for me, thanks Serge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants