tenstorrent / tt-metal

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

Decouple `build` folder name from metal #8767

Open vtangTT opened 1 month ago

vtangTT commented 1 month ago

We want to let devs decide what the build folder is called.

There are hardcoded paths in metal right now assuming the build folder is called build

Insidett_metal/jit_build/build.cpp we have stuff like:

this->lflags_ += "-T" + env_.root_ + "build/hw/toolchain/idle-erisc.ld ";

Inside tt_metal/tools/profiler/common.py we have:

PROFILER_BIN_DIR = TT_METAL_HOME / "build/tools/profiler/bin

CC: @TT-billteng @pgkeller @mo-tenstorrent

mo-tenstorrent commented 1 month ago

The location is used by automation scripts to grab the necessary tools. What would be the method to extract that info? Will the build folder be an env var similar to TT_METAL_HOME?

vtangTT commented 1 month ago

Yes, I think the idea is to pass in a build folder as an env var when using Tracy with named build folders. Correct me if I'm wrong @TT-billteng.

Would this be a very invasive change?

TT-billteng commented 1 month ago

Yes, I think the idea is to pass in a build folder as an env var when using Tracy with named build folders. Correct me if I'm wrong @TT-billteng.

Would this be a very invasive change?

I would hope we could pass it in as an option somehow

tt-rkim commented 3 weeks ago

Is this done?

vtangTT commented 3 weeks ago

I think we still need to decouple the profiler files. @mo-tenstorrent do you have cycles for this?

mo-tenstorrent commented 3 weeks ago

This is a minor change, providing an option for tracy.py which is the only user of this location is no problem. I am just thinking if there is any way we can extract info on the latest build folder so tracy.py can use that by default, instead of just build as default. tracy.py is getting pretty cli option heavy it would be nice to be able to have smarts here.