Open dariusarnold opened 5 years ago
I cannot reproduce this segmentation fault. Can you tell us how you build (on which platform, with which compiler, ...)?
I am using CMake 3.15.3 (bundled with CLion) on Debian 10. My minimal CMakeLists.txt:
cmake_minimum_required(VERSION 3.14)
project(doublebeam_cpp CXX)
set(CMAKE_CXX_STANDARD 17)
find_package(xtl REQUIRED)
find_package(xtensor REQUIRED)
find_package(xtensor-blas REQUIRED)
add_definitions(-DHAVE_CBLAS=1)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
add_executable(scratch_1 /home/darius/.CLion2019.2/config/scratches/scratch_1.cpp)
target_link_libraries(scratch_1 xtensor ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
target_include_directories(scratch_1 PRIVATE ${xtensor_blas_INCLUDE_DIRS})
compiler
$ c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.3.0 (Debian 8.3.0-6)
Is there any other information that would be helpful to you?
I want to do matrix multiplication for two tensors with shape (1, 2, 2). Using a (2, 2) shape works, but using an array with an empty dimension (shape (1, 2, 2)) gives
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
. I am usingxtensor-blas 0.16.1
from conda. I have the following blas library installed:Code example:
Output:
EDIT: I know using xt::squeeze to remove empty dimensions works. I am still curious why the error occurs.