ttnn-visualizer 0.46.0__py3-none-any.whl → 0.47.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ttnn_visualizer/app.py CHANGED
@@ -25,6 +25,7 @@ from ttnn_visualizer.exceptions import (
25
25
  )
26
26
  from ttnn_visualizer.instances import create_instance_from_local_paths
27
27
  from ttnn_visualizer.settings import Config, DefaultConfig
28
+ from ttnn_visualizer.utils import create_path_resolver
28
29
  from werkzeug.debug import DebuggedApplication
29
30
  from werkzeug.middleware.proxy_fix import ProxyFix
30
31
 
@@ -78,6 +79,7 @@ def create_app(settings_override=None):
78
79
  js_config = {
79
80
  "SERVER_MODE": app.config["SERVER_MODE"],
80
81
  "BASE_PATH": app.config["BASE_PATH"],
82
+ "TT_METAL_HOME": app.config["TT_METAL_HOME"],
81
83
  }
82
84
  js = f"window.TTNN_VISUALIZER_CONFIG = {json.dumps(js_config)};"
83
85
 
@@ -192,6 +194,9 @@ def parse_args():
192
194
  parser.add_argument(
193
195
  "--performance-path", help="Specify a performance path", default=None
194
196
  )
197
+ parser.add_argument(
198
+ "--tt-metal-home", help="Specify a TT-Metal home path", default=None
199
+ )
195
200
  return parser.parse_args()
196
201
 
197
202
 
@@ -220,10 +225,40 @@ def main():
220
225
 
221
226
  instance_id = session.instance_id
222
227
 
228
+ if args.tt_metal_home:
229
+ config.TT_METAL_HOME = args.tt_metal_home
230
+
231
+ # Display mode information
232
+ app = create_app()
233
+ with app.app_context():
234
+ resolver = create_path_resolver(app)
235
+ mode_info = resolver.get_mode_info()
236
+
237
+ if mode_info["mode"] == "tt_metal":
238
+ print(
239
+ "🚀 TT-METAL MODE: Working directly with tt-metal generated directory"
240
+ )
241
+ print(f" TT_METAL_HOME: {mode_info['tt_metal_home']}")
242
+ print(f" Profiler reports: {mode_info['profiler_base']}")
243
+ print(f" Performance reports: {mode_info['performance_base']}")
244
+
245
+ # Validate setup
246
+ is_valid, message = resolver.validate_tt_metal_setup()
247
+ if is_valid:
248
+ print(f" ✓ {message}")
249
+ else:
250
+ print(f" ⚠️ Warning: {message}")
251
+ else:
252
+ print(
253
+ "📁 UPLOAD/SYNC MODE: Using local data directory for uploaded/synced reports"
254
+ )
255
+ print(f" Local directory: {mode_info['local_dir']}")
256
+ print(f" Remote directory: {mode_info['remote_dir']}")
257
+
223
258
  # Check if DEBUG environment variable is set
224
259
  debug_mode = os.environ.get("DEBUG", "false").lower() == "true"
225
260
  if config.PRINT_ENV:
226
- print("ENVIRONMENT:")
261
+ print("\nENVIRONMENT:")
227
262
  for key, value in config.to_dict().items():
228
263
  print(f"{key}={value}")
229
264
 
@@ -1,6 +1,7 @@
1
1
  # SPDX-License-Identifier: Apache-2.0
2
2
  #
3
- # SPDX-FileCopyrightText: © 2025 Tenstorrent Inc.
3
+ # SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
4
+
4
5
  import csv
5
6
  import json
6
7
  import os
@@ -1,6 +1,6 @@
1
1
  # SPDX-License-Identifier: Apache-2.0
2
2
  #
3
- # SPDX-FileCopyrightText: © 2025 Tenstorrent Inc.
3
+ # SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
4
4
 
5
5
  import logging
6
6
  import os
@@ -42,6 +42,7 @@ class DefaultConfig(object):
42
42
  APPLICATION_DIR = os.path.abspath(os.path.join(__file__, "..", os.pardir))
43
43
  APP_DATA_DIRECTORY = os.getenv("APP_DATA_DIRECTORY", APPLICATION_DIR)
44
44
  STATIC_ASSETS_DIR = Path(APPLICATION_DIR).joinpath("ttnn_visualizer", "static")
45
+ TT_METAL_HOME = os.getenv("TT_METAL_HOME", None)
45
46
  SEND_FILE_MAX_AGE_DEFAULT = 0
46
47
 
47
48
  LAUNCH_BROWSER_ON_START = str_to_bool(os.getenv("LAUNCH_BROWSER_ON_START", "true"))
@@ -1 +1 @@
1
- import{I as s}from"./index-03c8d4Gh.js";import{I as r}from"./index-PKNBViIU.js";import{p as n,I as c}from"./index-BANm1CMY.js";function p(t,a){const o=n(t);return a===c.STANDARD?s[o]:r[o]}export{s as IconSvgPaths16,r as IconSvgPaths20,p as getIconPaths};
1
+ import{I as s}from"./index-03c8d4Gh.js";import{I as r}from"./index-PKNBViIU.js";import{p as n,I as c}from"./index-CmA3KkTi.js";function p(t,a){const o=n(t);return a===c.STANDARD?s[o]:r[o]}export{s as IconSvgPaths16,r as IconSvgPaths20,p as getIconPaths};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-OR2-IW-_.js","assets/index-03c8d4Gh.js","assets/index-PKNBViIU.js","assets/index-CmA3KkTi.js","assets/index-DJA68-a6.css"])))=>i.map(i=>d[i]);
2
+ import{_ as e}from"./index-CmA3KkTi.js";const s=async(t,a)=>{const{getIconPaths:o}=await e(async()=>{const{getIconPaths:r}=await import("./allPaths-OR2-IW-_.js");return{getIconPaths:r}},__vite__mapDeps([0,1,2,3,4]));return o(t,a)};export{s as allPathsLoader};