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

Bug in cpu_runtime.cpp: Missing <tuple> Include Causes build errors #180

Open
SwapnilGhanshyala opened this issue Nov 27, 2024 · 3 comments

Comments

@SwapnilGhanshyala
Copy link

Hi ,
Reporting a minor bug causing crash of the build process.
Error Logs

third_party/cpu/runtime/cpu_runtime.cpp:95:77: error: return type ‘class std::tuple<int, int, bool>’ is incomplete  
   95 | std::tuple<int, int, bool> computeDigitStats(const MemRefDescriptor<T> &desc) {  
      |                                                                             ^  
third_party/cpu/runtime/cpu_runtime.cpp:119:15: error: ‘make_tuple’ is not a member of ‘std’  
  119 |   return std::make_tuple(maxIntDigits, minIntDigits, hasNegative);  
      |               ^~~~~~~~~~  
third_party/cpu/runtime/cpu_runtime.cpp:11:1: note: ‘std::make_tuple’ is defined in header ‘<tuple>’; did you forget to ‘#include <tuple>’?  
   10 | #include <vector>  
  +++ | #include <tuple>  
   11 |  

Suggested Fix

#include <tuple>  

Steps to Reproduce:
Follow the build steps to pip install -e python

@PikachuHyA
Copy link

What's your OS?

@SwapnilGhanshyala
Copy link
Author

Ubuntu 24.04.1 LTS

@minjang
Copy link
Collaborator

minjang commented Nov 27, 2024

Please check your C++ compiler. TritonCPURuntime is a C++ library with a single C++ file with a dependency on LLVMSupport:

add_library(TritonCPURuntime SHARED ${CMAKE_CURRENT_SOURCE_DIR}/runtime/cpu_runtime.cpp)
target_link_libraries(TritonCPURuntime PRIVATE LLVMSupport)

The error seems like you're missing really a standard C++ library. Try to check whether your C++ compiler (either clang++ or g++) works okay.

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

3 participants