-
Notifications
You must be signed in to change notification settings - Fork 401
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
[Bug] Fails to compile with TBB and XSIMD enabled #2736
Comments
Example of failed build https://github.com/spectre-ns/xtensor/actions/runs/6706077908/job/18221831529 |
I guess we need to capture |
@JohanMabille yes the same issue exists in MSVC 2022 |
@JohanMabille looks like this is a bug as Specifically MSVC: |
Also there are issues out of the box around tbb defining min and max that need to be mitigated using |
@tdegeus this issue isn't C++20 specific. Not sure what that label means though. |
@spectre-ns @JohanMabille hello, did you find a workaround for this problem? Activating the flag xtensor/include/xtensor/xassign.hpp Line 1252 in 8c0a484
|
Hi @PerretB I have not found a workaround. It works in clang and GCC so it is a compiler issue... |
This small example triggers the error #include <xtensor/xarray.hpp>
#include <xtensor/xrandom.hpp>
#include <xtensor-blas/xlinalg.hpp>
int main()
{
auto W1 = xt::random::rand<float>({10, 50}) - 0.5f;
auto X = xt::random::rand<float>({10, 50}) - 0.5f;
xt::xarray<float> d1 = xt::linalg::dot(W1, X);
return 0;
} cmake_minimum_required(VERSION 3.14)
project(xt_tbb)
set(XTENSOR_USE_XSIMD 1)
set(XTENSOR_USE_TBB 1)
find_package(xtensor REQUIRED)
find_package(xtensor-blas REQUIRED)
add_executable(xt_tbb main.cpp)
target_compile_options(xt_tbb PUBLIC "/Zc:lambda")
target_include_directories(xt_tbb PUBLIC ${xtensor-blas_INCLUDE_DIRS})
target_link_libraries(xt_tbb PUBLIC xtensor)
|
Windows 10
MSVC 2019 Enterprise
C++20
Fails to compile with both XSIMD and TBB enabled. Fails with the following
syntax error: 'template'
On line 1252 of xassign.hpp
The text was updated successfully, but these errors were encountered: