xtensor-stack / xtensor-blas

BLAS extension to xtensor
BSD 3-Clause "New" or "Revised" License
158 stars 55 forks source link

-march=native is not supported on all architectures #196

Closed drew-parsons closed 1 year ago

drew-parsons commented 3 years ago

The xtensor-blas tests add a "-march=native" flag on non-Win32 systems, both gcc and clang, at ll.60,69 in test/CMakeLists.txt.

But this flag is not universal, and so the test build fails on most non-amd64 architectures, e.g. ppc64el, ia64, riscv64. Build logs can be found at https://buildd.debian.org/status/package.php?p=xtensor-blas&suite=experimental, and some test logs at https://ci.debian.net/packages/x/xtensor-blas/

The problem has been dealt with in xtensor, which tests for the flag and defines arch_native_supported before conditionally adding it to CMAKE_CXX_FLAGS.

james-d-mitchell commented 1 year ago

I had the same exact issue, I guess this is simple to resolve @wolfv @SylvainCorlay @JohanMabille would a pr fixing this be welcome?

wolfv commented 1 year ago

yes!