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

Building Taco failed #551

Open
ValouBambou opened this issue Aug 2, 2023 · 1 comment
Open

Building Taco failed #551

ValouBambou opened this issue Aug 2, 2023 · 1 comment

Comments

@ValouBambou
Copy link

Hi, I've tried to clone and build taco from the master branch (last commit is 2b8ece4 alias "Merge pull request #526 from zhang677/test-target") and get this compilation error.

Is this normal ? Should I ignore this error on a test file and still use the library ?

[  2%] Built target taco-gtest
[ 64%] Built target taco
[ 68%] Built target taco-tool
[ 68%] Built target tensor_times_vector
[ 71%] Building CXX object test/CMakeFiles/taco-test.dir/tests-windowing.cpp.o
[ 71%] Building CXX object test/CMakeFiles/taco-test.dir/tests-type.cpp.o
[ 71%] Building CXX object test/CMakeFiles/taco-test.dir/tests-tensor_types.cpp.o
[ 72%] Building CXX object test/CMakeFiles/taco-test.dir/tests-workspaces.cpp.o
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = unsigned char]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘unsigned char’ [-Wnarrowing]
   48 |   map<vector<int>,TypeParam> vals = {{{0}, 1.0}, {{2}, 2.0}};
      |                              ^~~~
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = long long int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘long long int’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = long int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘long int’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘int’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = short int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘short int’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = long long unsigned int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘long long unsigned int’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = signed char]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘signed char’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = long unsigned int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘long unsigned int’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = unsigned int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘unsigned int’ [-Wnarrowing]
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = short unsigned int]’:
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:42:1:   required from here
/home/val/Coding/dumbtests/tacorust/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘short unsigned int’ [-Wnarrowing]
make[2]: *** [test/CMakeFiles/taco-test.dir/build.make:496: test/CMakeFiles/taco-test.dir/tests-tensor_types.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:249: test/CMakeFiles/taco-test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@SharmaRithik
Copy link

The problem is due to the conversion error, and static casting will resolve the error.

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