From dc76271c89a53fe46b2b1f37b2e1e49c1eb274e3 Mon Sep 17 00:00:00 2001 From: Artem Yerofieiev <169092593+ayerofieiev-tt@users.noreply.github.com> Date: Fri, 6 Sep 2024 12:01:57 -0700 Subject: [PATCH] =?UTF-8?q?#0:=20Fix=20TT-NN=20wheel=20update=20issue=20by?= =?UTF-8?q?=20making=20sure=20rpath=20is=20updated=20when=E2=80=A6=20(#123?= =?UTF-8?q?36)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #0: Fix TT-NN wheel update issue by making sure rpath is updated when needed --- ttnn/ttnn/library_tweaks.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ttnn/ttnn/library_tweaks.py b/ttnn/ttnn/library_tweaks.py index 33fb564a71d..4903b942c26 100644 --- a/ttnn/ttnn/library_tweaks.py +++ b/ttnn/ttnn/library_tweaks.py @@ -19,9 +19,6 @@ def _has_not_found(target_so): def _setup_so_rpath(site_pkgs_ttnn, so_name, new_rpath): directory = site_pkgs_ttnn - check_f = directory / f".rpath_checked_{so_name}" - if os.path.exists(check_f): - return target_so = None for f in os.listdir(directory): @@ -35,17 +32,14 @@ def _setup_so_rpath(site_pkgs_ttnn, so_name, new_rpath): if _has_not_found(target_so): subprocess.check_call(f"patchelf --set-rpath {new_rpath} {target_so}", shell=True) - subprocess.check_call(f"touch {check_f}", shell=True) def _setup_so_rpath_in_build_lib(site_pkgs_ttnn): directory = site_pkgs_ttnn / "build/lib" - check_f = directory / ".rpath_checked" if not os.path.exists(directory): logger.trace(f"Directory {directory} does not exists") return - if os.path.exists(check_f): - return + import subprocess metal_so = directory / "libtt_metal.so" @@ -53,7 +47,6 @@ def _setup_so_rpath_in_build_lib(site_pkgs_ttnn): new_rpath = directory if _has_not_found(metal_so): subprocess.check_call(f"patchelf --set-rpath {new_rpath} {metal_so}", shell=True) - subprocess.check_call(f"touch {check_f}", shell=True) def _setup_env(site_pkgs_ttnn):