tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
Apache License 2.0
454 stars 67 forks source link

[Bug Report] Build failing on Clang 18 due to use of VLA #11881

Open marty1885 opened 2 months ago

marty1885 commented 2 months ago

Describe the bug tt-metal currently fails to build on clang 18 due to the use of VLA. With the following error message. I'm using clang 18 as that's what Arch is shipping.

In file included from /home/marty/Documents/not-my-projects/tt-metal/tt_metal/common/utils.cpp:8:
In file included from /home/marty/Documents/not-my-projects/tt-metal/tt_metal/llrt/rtoptions.hpp:17:
/home/marty/Documents/not-my-projects/tt-metal/tt_metal/common/core_coord.h:291:30: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
  291 |         bool grid[max_y + 1][max_x + 2];

To Reproduce Steps to reproduce the behavior:

  1. Build tt-metal with clang 18 (cmake .. -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_COMPILER=clang-18 -DCMAKE_BUILD_TYPE=RelWithDebInfo)
  2. Observe the error

Expected behavior Should build successfully.

Screenshots If applicable, add screenshots to help explain your problem.

Please complete the following environment information:

Additional context Add any other context about the problem here.

jaykru-tt commented 1 month ago

Assigning @TT-billteng; I got mixed up in this due to some commit history snafus in a side branch.

milank94 commented 1 month ago

Currently don't support clang 18. Will prioritize as a feature request.