Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

[BUILD] Fix narrowing conversion from double to unsigned int build issue. #570

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

harrisonGPU
Copy link

@harrisonGPU harrisonGPU commented Nov 24, 2024

When I built the TACO compiler, I encountered a build issue:

/home/harrison/Projects/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘unsigned int’ [-Wnarrowing]
   48 |   map<vector<int>,TypeParam> vals = {{{0}, 1.0}, {{2}, 2.0}};
      |                              ^~~~
/home/harrison/Projects/taco/test/tests-tensor_types.cpp: In instantiation of ‘void gtest_case_VectorTensorTest_::types<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = short unsigned int]’:
/home/harrison/Projects/taco/test/tests-tensor_types.cpp:42:1:   required from here
17961 |   gtest_case_##TestCaseName##_
      |   ^~~~~~~~~~~
/home/harrison/Projects/taco/test/tests-tensor_types.cpp:48:30: error: narrowing conversion of ‘1.0e+0’ from ‘double’ to ‘short unsigned int’ [-Wnarrowing]
   48 |   map<vector<int>,TypeParam> vals = {{{0}, 1.0}, {{2}, 2.0}};
      |                              ^~~~
ninja: build stopped: subcommand failed.

This error indicates a narrowing conversion from double to unsigned int, causing the build to fail.

@harrisonGPU
Copy link
Author

Ping @zhang677 , @weiya711

@harrisonGPU harrisonGPU changed the title [BUILD] Fix narrowing conversion from double to unsigned char build issue. [BUILD] Fix narrowing conversion from double to unsigned int build issue. Nov 24, 2024
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

Successfully merging this pull request may close these issues.

1 participant