Skip to content

Commit a1fb44f

Browse files
vmilosevicnvukobratTTazecevicTT
authored
Uplift third_party/tt-mlir to origin/main (54c5bb24909cc3a05fb993316a33083c047f5bf7) 2025-10-28 (#3004)
This PR uplifts the third_party/tt-mlir submodule to the origin/main --------- Co-authored-by: nvukobratTT <[email protected]> Co-authored-by: Aleksandar Zecevic <[email protected]>
1 parent fcf3cf2 commit a1fb44f

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

forge/csrc/passes/mlir_compiler.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ auto run_mlir_compiler_generic(tt::ForgeGraphModule& module, const std::optional
143143

144144
tt::log_info(LogMLIRCompiler, "C++ code for SharedObject generated successfully.");
145145

146-
const char* TT_METAL_HOME = std::getenv("TT_METAL_HOME");
146+
const char* TT_METAL_RUNTIME_ROOT = std::getenv("TT_METAL_RUNTIME_ROOT");
147147
const char* FORGE_HOME = std::getenv("FORGE_HOME");
148-
if (TT_METAL_HOME == nullptr)
148+
if (TT_METAL_RUNTIME_ROOT == nullptr)
149149
{
150-
throw std::runtime_error("TT_METAL_HOME environment variable is not set.");
150+
throw std::runtime_error("TT_METAL_RUNTIME_ROOT environment variable is not set.");
151151
}
152152
if (FORGE_HOME == nullptr)
153153
{
@@ -159,14 +159,14 @@ auto run_mlir_compiler_generic(tt::ForgeGraphModule& module, const std::optional
159159
fs::path standalone_dir;
160160
if (std::getenv("FORGE_IN_WHEEL"))
161161
{
162-
metal_src_dir = fs::path(std::string(TT_METAL_HOME));
162+
metal_src_dir = fs::path(std::string(TT_METAL_RUNTIME_ROOT));
163163
metal_lib_dir = fs::path(std::string(FORGE_HOME)) / "forge/lib";
164164
standalone_dir = fs::path(std::string(FORGE_HOME)) / "forge/tools/ttnn-standalone";
165165
}
166166
else if (std::getenv("FORGE_IN_SOURCE"))
167167
{
168-
metal_src_dir = fs::path(std::string(TT_METAL_HOME));
169-
metal_lib_dir = fs::path(std::string(TT_METAL_HOME)).parent_path() / "tt-metal/build/lib";
168+
metal_src_dir = fs::path(std::string(TT_METAL_RUNTIME_ROOT));
169+
metal_lib_dir = fs::path(std::string(TT_METAL_RUNTIME_ROOT)).parent_path() / "tt-metal/build/lib";
170170
standalone_dir =
171171
fs::path(std::string(FORGE_HOME)).parent_path() / "third_party/tt-mlir/tools/ttnn-standalone";
172172
}

forge/forge/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ def set_home_paths():
2626
logger.remove()
2727
logger.add(sys.stdout)
2828

29-
# TT_METAL_HOME should be one of the following:
29+
# TT_METAL_RUNTIME_ROOT should be one of the following:
3030
in_wheel_path = forge_path / "forge/tt-metal"
3131
in_source_path = (forge_path.parent.resolve() / "third_party/tt-mlir/third_party/tt-metal/src/tt-metal").resolve()
3232

33-
if "TT_METAL_HOME" not in os.environ:
33+
if "TT_METAL_RUNTIME_ROOT" not in os.environ:
3434
if in_wheel_path.exists():
35-
os.environ["TT_METAL_HOME"] = str(in_wheel_path)
35+
os.environ["TT_METAL_RUNTIME_ROOT"] = str(in_wheel_path)
3636
elif in_source_path.exists():
37-
os.environ["TT_METAL_HOME"] = str(in_source_path)
37+
os.environ["TT_METAL_RUNTIME_ROOT"] = str(in_source_path)
3838
else:
3939
logger.error(
40-
f"TT_METAL_HOME environment variable is not set. Tried setting it to {in_wheel_path} and {in_source_path}, but neither exists. Something is wrong with the installation."
40+
f"TT_METAL_RUNTIME_ROOT environment variable is not set. Tried setting it to {in_wheel_path} and {in_source_path}, but neither exists. Something is wrong with the installation."
4141
)
4242
exit(1)
4343

@@ -49,14 +49,14 @@ def set_home_paths():
4949
else:
5050
logger.error("Neither wheel nor source path exist for tt-metal. Please check your installation.")
5151

52-
if pathlib.Path(os.environ["TT_METAL_HOME"]) not in [in_wheel_path, in_source_path]:
53-
if pathlib.Path(os.environ["TT_METAL_HOME"]).exists():
52+
if pathlib.Path(os.environ["TT_METAL_RUNTIME_ROOT"]) not in [in_wheel_path, in_source_path]:
53+
if pathlib.Path(os.environ["TT_METAL_RUNTIME_ROOT"]).exists():
5454
logger.warning(
55-
f"TT_METAL_HOME environment variable is set to {os.environ['TT_METAL_HOME']}, which looks like a non-standard path. Please check if this is intentional. If set incorrectly, it will cause issues during runtime."
55+
f"TT_METAL_RUNTIME_ROOT environment variable is set to {os.environ['TT_METAL_RUNTIME_ROOT']}, which looks like a non-standard path. Please check if this is intentional. If set incorrectly, it will cause issues during runtime."
5656
)
5757
else:
5858
logger.error(
59-
f"TT_METAL_HOME environment variable is set to {os.environ['TT_METAL_HOME']}, which does not exist. Please check if this is intentional. Unset it so that the default path is used or set it to the correct path."
59+
f"TT_METAL_RUNTIME_ROOT environment variable is set to {os.environ['TT_METAL_RUNTIME_ROOT']}, which does not exist. Please check if this is intentional. Unset it so that the default path is used or set it to the correct path."
6060
)
6161
exit(1)
6262

third_party/tt-mlir

Submodule tt-mlir updated 66 files

0 commit comments

Comments
 (0)