ttnn-visualizer 0.68.0__py3-none-any.whl → 0.70.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.
Files changed (31) hide show
  1. ttnn_visualizer/app.py +2 -2
  2. ttnn_visualizer/csv_queries.py +2 -1
  3. ttnn_visualizer/models.py +0 -1
  4. ttnn_visualizer/queries.py +25 -2
  5. ttnn_visualizer/sftp_operations.py +0 -1
  6. ttnn_visualizer/static/assets/allPaths-DrpaDRaJ.js +1 -0
  7. ttnn_visualizer/static/assets/allPathsLoader-C78guN8s.js +2 -0
  8. ttnn_visualizer/static/assets/index-BVzPYDVR.css +1 -0
  9. ttnn_visualizer/static/assets/index-BmDjQHI0.js +1 -0
  10. ttnn_visualizer/static/assets/index-CzNKtOwn.js +1 -0
  11. ttnn_visualizer/static/assets/{index-ryWOUYjC.js → index-SMzJpwbG.js} +273 -283
  12. ttnn_visualizer/static/assets/splitPathsBySizeLoader-Cg4d_fbJ.js +1 -0
  13. ttnn_visualizer/static/index.html +2 -2
  14. ttnn_visualizer/tests/test_queries.py +1 -2
  15. ttnn_visualizer/tests/test_serializers.py +4 -12
  16. ttnn_visualizer/utils.py +2 -6
  17. ttnn_visualizer/views.py +24 -22
  18. {ttnn_visualizer-0.68.0.dist-info → ttnn_visualizer-0.70.0.dist-info}/METADATA +1 -1
  19. ttnn_visualizer-0.70.0.dist-info/RECORD +44 -0
  20. ttnn_visualizer/static/assets/allPaths-BZLVCrxa.js +0 -1
  21. ttnn_visualizer/static/assets/allPathsLoader-7-MAALae.js +0 -2
  22. ttnn_visualizer/static/assets/index-BZITDwoa.js +0 -1
  23. ttnn_visualizer/static/assets/index-DS75jGv-.css +0 -1
  24. ttnn_visualizer/static/assets/index-voJy5fZe.js +0 -1
  25. ttnn_visualizer/static/assets/splitPathsBySizeLoader-CpZbtknp.js +0 -1
  26. ttnn_visualizer-0.68.0.dist-info/RECORD +0 -44
  27. {ttnn_visualizer-0.68.0.dist-info → ttnn_visualizer-0.70.0.dist-info}/WHEEL +0 -0
  28. {ttnn_visualizer-0.68.0.dist-info → ttnn_visualizer-0.70.0.dist-info}/entry_points.txt +0 -0
  29. {ttnn_visualizer-0.68.0.dist-info → ttnn_visualizer-0.70.0.dist-info}/licenses/LICENSE +0 -0
  30. {ttnn_visualizer-0.68.0.dist-info → ttnn_visualizer-0.70.0.dist-info}/licenses/LICENSE_understanding.txt +0 -0
  31. {ttnn_visualizer-0.68.0.dist-info → ttnn_visualizer-0.70.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ import{p as r,I as s,_ as a}from"./index-SMzJpwbG.js";const n=async(o,_)=>{const i=r(o);let t;return _===s.STANDARD?t=await a(()=>import("./index-BmDjQHI0.js").then(e=>e.I),[]):t=await a(()=>import("./index-CzNKtOwn.js").then(e=>e.I),[]),t[i]};export{n as splitPathsBySizeLoader};
@@ -34,8 +34,8 @@
34
34
  /* SERVER_CONFIG */
35
35
  </script>
36
36
 
37
- <script type="module" crossorigin src="/static/assets/index-ryWOUYjC.js"></script>
38
- <link rel="stylesheet" crossorigin href="/static/assets/index-DS75jGv-.css">
37
+ <script type="module" crossorigin src="/static/assets/index-SMzJpwbG.js"></script>
38
+ <link rel="stylesheet" crossorigin href="/static/assets/index-BVzPYDVR.css">
39
39
  </head>
40
40
  <body>
41
41
 
@@ -119,7 +119,6 @@ class TestDatabaseQueries(unittest.TestCase):
119
119
  address_at_first_l1_cb_buffer int,
120
120
  num_banks_per_storage_core int,
121
121
  num_compute_cores int,
122
- num_storage_cores int,
123
122
  total_l1_memory int,
124
123
  total_l1_for_tensors int,
125
124
  total_l1_for_interleaved_buffers int,
@@ -336,7 +335,7 @@ class TestDatabaseQueries(unittest.TestCase):
336
335
 
337
336
  def test_query_devices(self):
338
337
  self.connection.execute(
339
- "INSERT INTO devices VALUES (1, 4, 4, 2, 2, 1024, 4, 256, 0, 0, 1, 2, 2, 4096, 2048, 2048, 2048, 256)"
338
+ "INSERT INTO devices VALUES (1, 4, 4, 2, 2, 1024, 4, 256, 0, 0, 1, 2, 4096, 2048, 2048, 2048, 256)"
340
339
  )
341
340
  results = list(self.db_queries.query_devices(filters={"device_id": 1}))
342
341
  self.assertEqual(len(results), 1)
@@ -65,9 +65,7 @@ class TestSerializers(unittest.TestCase):
65
65
  [25],
66
66
  ),
67
67
  ]
68
- devices = [
69
- Device(1, 4, 4, 2, 2, 256, 4, 64, 0, 0, 1, 2, 512, 256, 128, 64, 1, 512)
70
- ]
68
+ devices = [Device(1, 4, 4, 2, 2, 256, 4, 64, 0, 0, 1, 2, 256, 128, 64, 1, 512)]
71
69
  producers_consumers = [ProducersConsumers(1, [2], [3])]
72
70
  device_operations = [DeviceOperation(1, '[{"counter": 1, "op_id": 1}]')]
73
71
 
@@ -195,10 +193,8 @@ class TestSerializers(unittest.TestCase):
195
193
 
196
194
  def test_serialize_devices(self):
197
195
  devices = [
198
- Device(1, 4, 4, 2, 2, 256, 4, 64, 0, 0, 1, 2, 512, 256, 128, 64, 1, 512),
199
- Device(
200
- 2, 8, 8, 4, 4, 512, 8, 128, 1, 1, 2, 4, 1024, 512, 256, 128, 2, 1024
201
- ),
196
+ Device(1, 4, 4, 2, 2, 256, 4, 64, 0, 0, 1, 2, 256, 128, 64, 1, 512),
197
+ Device(2, 8, 8, 4, 4, 512, 8, 128, 1, 1, 2, 4, 512, 256, 128, 2, 1024),
202
198
  ]
203
199
 
204
200
  result = serialize_devices(devices)
@@ -213,7 +209,6 @@ class TestSerializers(unittest.TestCase):
213
209
  "l1_num_banks": 4,
214
210
  "num_banks_per_storage_core": 1,
215
211
  "num_compute_cores": 2,
216
- "num_storage_cores": 512,
217
212
  "num_x_compute_cores": 2,
218
213
  "num_x_cores": 4,
219
214
  "num_y_compute_cores": 2,
@@ -233,7 +228,6 @@ class TestSerializers(unittest.TestCase):
233
228
  "l1_num_banks": 8,
234
229
  "num_banks_per_storage_core": 2,
235
230
  "num_compute_cores": 4,
236
- "num_storage_cores": 1024,
237
231
  "num_x_compute_cores": 4,
238
232
  "num_x_cores": 8,
239
233
  "num_y_compute_cores": 4,
@@ -373,9 +367,7 @@ class TestSerializers(unittest.TestCase):
373
367
  [200, 300],
374
368
  )
375
369
  ]
376
- devices = [
377
- Device(1, 4, 4, 2, 2, 256, 4, 64, 0, 0, 1, 2, 512, 256, 128, 64, 1, 512)
378
- ]
370
+ devices = [Device(1, 4, 4, 2, 2, 256, 4, 64, 0, 0, 1, 2, 256, 128, 64, 1, 512)]
379
371
  producers_consumers = [ProducersConsumers(1, [2], [3])]
380
372
  device_operations = [DeviceOperation(1, '[{"counter": 1, "op_id": 1}]')]
381
373
 
ttnn_visualizer/utils.py CHANGED
@@ -428,13 +428,9 @@ def get_mesh_descriptor_paths(instance):
428
428
  return []
429
429
 
430
430
  parent = Path(instance.profiler_path).parent
431
- pattern = re.compile(r"physical_chip_mesh_coordinate_mapping_[1-8]_of_[1-8]\.yaml")
431
+ glob_pattern = "physical_chip_mesh_coordinate_mapping_[0-9]_of_[0-9].yaml"
432
432
 
433
- return sorted(
434
- str(path)
435
- for path in parent.iterdir()
436
- if path.is_file() and pattern.fullmatch(path.name)
437
- )
433
+ return sorted(str(path) for path in parent.glob(glob_pattern) if path.is_file())
438
434
 
439
435
 
440
436
  def read_last_synced_file(directory: str) -> Optional[int]:
ttnn_visualizer/views.py CHANGED
@@ -735,6 +735,7 @@ def get_performance_results_report(instance: Instance):
735
735
  stack_by_in0 = str_to_bool(request.args.get("stack_by_in0", "true"))
736
736
  hide_host_ops = str_to_bool(request.args.get("hide_host_ops", "true"))
737
737
  merge_devices = str_to_bool(request.args.get("merge_devices", "true"))
738
+ tracing_mode = str_to_bool(request.args.get("tracing_mode", "false"))
738
739
 
739
740
  if name and not current_app.config["SERVER_MODE"]:
740
741
  performance_path = Path(instance.performance_path).parent / name
@@ -750,6 +751,7 @@ def get_performance_results_report(instance: Instance):
750
751
  end_signpost=end_signpost,
751
752
  hide_host_ops=hide_host_ops,
752
753
  merge_devices=merge_devices,
754
+ tracing_mode=tracing_mode,
753
755
  )
754
756
  except DataFormatError:
755
757
  return Response(status=HTTPStatus.UNPROCESSABLE_ENTITY)
@@ -1164,29 +1166,25 @@ def get_cluster_descriptor(instance: Instance):
1164
1166
  @api.route("/mesh-descriptor", methods=["GET"])
1165
1167
  @with_instance
1166
1168
  def get_mesh_descriptor(instance: Instance):
1167
- if instance.remote_connection:
1169
+ paths = get_mesh_descriptor_paths(instance)
1170
+
1171
+ if not paths:
1168
1172
  return (
1169
- jsonify({"error": "Remote mesh descriptor is not yet supported"}),
1170
- HTTPStatus.NOT_IMPLEMENTED,
1173
+ jsonify(
1174
+ {"error": "physical_chip_mesh_coordinate_mapping_1_of_1.yaml not found"}
1175
+ ),
1176
+ HTTPStatus.NOT_FOUND,
1171
1177
  )
1172
- else:
1173
- paths = get_mesh_descriptor_paths(instance)
1174
- if not paths:
1175
- return jsonify({"error": "mesh.yaml not found"}), 404
1176
-
1177
- local_path = paths[0]
1178
1178
 
1179
- if not local_path:
1180
- return jsonify({"error": "mesh.yaml not found"}), 404
1181
-
1182
- try:
1183
- with open(local_path) as mesh_descriptor_path:
1184
- yaml_data = yaml.safe_load(mesh_descriptor_path)
1185
- return jsonify(yaml_data) # yaml_data is not compatible with orjson
1186
- except yaml.YAMLError as e:
1187
- return jsonify({"error": f"Failed to parse YAML: {str(e)}"}), 400
1188
-
1189
- return jsonify({"error": "Mesh descriptor not found"}), 404
1179
+ try:
1180
+ with open(paths[0]) as mesh_descriptor_path:
1181
+ yaml_data = yaml.safe_load(mesh_descriptor_path)
1182
+ return jsonify(yaml_data) # yaml_data is not compatible with orjson
1183
+ except yaml.YAMLError as e:
1184
+ return (
1185
+ jsonify({"error": f"Failed to parse YAML: {str(e)}"}),
1186
+ HTTPStatus.BAD_REQUEST,
1187
+ )
1190
1188
 
1191
1189
 
1192
1190
  @api.route("/remote/test", methods=["POST"])
@@ -1411,15 +1409,19 @@ def get_instance(instance: Instance):
1411
1409
 
1412
1410
 
1413
1411
  @api.route("/instance", methods=["PUT"])
1414
- def update_current_instance():
1412
+ @with_instance
1413
+ def update_current_instance(instance: Instance):
1415
1414
  try:
1416
1415
  update_data = request.get_json()
1417
1416
 
1418
1417
  if not update_data:
1419
1418
  return Response(status=HTTPStatus.BAD_REQUEST, response="No data provided.")
1420
1419
 
1420
+ # Use current instance unless a different one is specified
1421
+ instance_id = update_data.get("instance_id") or instance.instance_id
1422
+
1421
1423
  update_instance(
1422
- instance_id=update_data.get("instance_id"),
1424
+ instance_id=instance_id,
1423
1425
  profiler_name=update_data["active_report"].get("profiler_name"),
1424
1426
  profiler_location=update_data["active_report"].get("profiler_location"),
1425
1427
  performance_name=update_data["active_report"].get("performance_name"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ttnn_visualizer
3
- Version: 0.68.0
3
+ Version: 0.70.0
4
4
  Summary: TT-NN Visualizer
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -0,0 +1,44 @@
1
+ ttnn_visualizer/__init__.py,sha256=FCQeTWnXsf-Wx-fay53-lQsm0y5-GcPMUmzhE5upDx0,93
2
+ ttnn_visualizer/app.py,sha256=FuFrtGZViJM0pFN1kUr0LF55hgbk4G7V96LoYOS4Mb8,13348
3
+ ttnn_visualizer/csv_queries.py,sha256=3zt2TrxFtXxBm0D_p6bJR9GlJ9iyfnD4Sh_yp1drAKM,20538
4
+ ttnn_visualizer/decorators.py,sha256=YY_5zQdD9VOuBC5iP1Z9CEMjYz3ofD1Lc3ZrBvzQx8U,5779
5
+ ttnn_visualizer/enums.py,sha256=SEIqp1tlc_zw2vQ8nHH9YTaV0m3Cb8fjn_goqz5wurE,203
6
+ ttnn_visualizer/exceptions.py,sha256=KVZzb7YaWbq51DNMKPBcJHwG74RMYj_29WTSYOlXXeU,2096
7
+ ttnn_visualizer/extensions.py,sha256=6OIRJ8-_ccfjOaXSruRXiS29jEbxp4Pyk-0JlD8IHBQ,379
8
+ ttnn_visualizer/file_uploads.py,sha256=HFcC6TBt5I0oBkiKgM2Qw1W7hpixE8TOTACS5N-rmGE,5013
9
+ ttnn_visualizer/instances.py,sha256=yoWGV0I3xNm8nFZrQHJMq7k6C_moFiic9ZgMkgfxsHU,13406
10
+ ttnn_visualizer/models.py,sha256=6z0WwKWwaOhYMgHEIM5NHxiybDoipL3vJD1uRgZPuSI,8620
11
+ ttnn_visualizer/pytest_plugin.py,sha256=bEG0cbqH0HUuZT5Ox9tFoexFNTyimBBPpI_jp75b54c,2629
12
+ ttnn_visualizer/queries.py,sha256=gfI8Jzlp7VHCh8VDSqgYqbhlf9eaj2QvwkXovNCjqXg,13620
13
+ ttnn_visualizer/serializers.py,sha256=mKxcDu9g4gAxHB6wP_1l5VJvIBmnYDIJTikiaMYXupg,9374
14
+ ttnn_visualizer/settings.py,sha256=FvfSqzuXEOLDH3i_mXZODHjYQEJBE6V_mPQcqz6P6zA,5168
15
+ ttnn_visualizer/sftp_operations.py,sha256=MxWIaBxx63cHc2MyrCrsYqpKW_FwqM5tSrJG3cyzvEw,31615
16
+ ttnn_visualizer/sockets.py,sha256=_Hdne33r4FrB2tg58Vw87FWLbgQ_ikICVp4o1Mkv2mo,4789
17
+ ttnn_visualizer/ssh_client.py,sha256=x-BUUnsaKGReuOrSpHdcIaoH6RdGiQQYWx2_pOkGzJ0,13410
18
+ ttnn_visualizer/utils.py,sha256=auigwVrhjhb5Ex7eSXbTEgCzDWqgE4f6Ea-k0v2Ggqw,18602
19
+ ttnn_visualizer/views.py,sha256=RDPj9hHykggpfVV4M_o7VpRa3GH0lhZUgxCCUFGVAZc,52508
20
+ ttnn_visualizer/static/index.html,sha256=WgQV7gEDZUzu8G3uVE4ii7I9qcwomahQSeQLuk0YDD8,1135
21
+ ttnn_visualizer/static/assets/allPaths-DrpaDRaJ.js,sha256=dpNNFbLDCOKRHvAPj2b3JIRjV-NY9-CtsmRIehWoaqk,255
22
+ ttnn_visualizer/static/assets/allPathsLoader-C78guN8s.js,sha256=q9Ix5ow0Vo2YbNRcTIOx9g09fnsDR7otcB9AE-MTrfQ,477
23
+ ttnn_visualizer/static/assets/index-BVzPYDVR.css,sha256=_fSlNYmeC54u6mXYoyiQDIXeRD9ajwaKIWE2M7e1uJk,618970
24
+ ttnn_visualizer/static/assets/index-BmDjQHI0.js,sha256=Np8PB0IkYR44ybu3HDpLI7b6XWw2sZQL-MIbQxV7CcA,294299
25
+ ttnn_visualizer/static/assets/index-CzNKtOwn.js,sha256=i4B-DZkbAK68FWdRZAGppuLcytv1ETOLu6m6s_0a7r4,303575
26
+ ttnn_visualizer/static/assets/index-SMzJpwbG.js,sha256=Rov-6MiS7qA_iMBXsUZIyCl58Zyx7_ofkHlXqm2V9WI,7980674
27
+ ttnn_visualizer/static/assets/site-BTBrvHC5.webmanifest,sha256=Uy_XmnGuYFVf-OZuma2NvgEPdrCrevb3HZvaxSIHoA0,456
28
+ ttnn_visualizer/static/assets/splitPathsBySizeLoader-Cg4d_fbJ.js,sha256=q_k5GcUM_Ao3rnBRPzaYHC0q-kmapgxm7SwTx6U2NGc,281
29
+ ttnn_visualizer/static/favicon/android-chrome-192x192.png,sha256=BZWA09Zxaa3fXbaeS6nhWo2e-DUSjm9ElzNQ_xTB5XU,6220
30
+ ttnn_visualizer/static/favicon/android-chrome-512x512.png,sha256=HBiJSZyguB3o8fMJuqIGcpeBy_9JOdImme3wD02UYCw,62626
31
+ ttnn_visualizer/static/favicon/favicon-32x32.png,sha256=Zw201qUsczQv1UvoQvJf5smQ2ss10xaTeWxmQNYCGtY,480
32
+ ttnn_visualizer/static/favicon/favicon.svg,sha256=wDPY3VrekJ_DE1TnJ2vUy602K3S4Xe9TgrdZ7jXK9c8,633
33
+ ttnn_visualizer/static/sample-data/cluster-desc.yaml,sha256=LMxOmsRUXtVVU5ogzYkXUozB3dg2IzqIRJQpV_O5qMU,29618
34
+ ttnn_visualizer/tests/__init__.py,sha256=FCQeTWnXsf-Wx-fay53-lQsm0y5-GcPMUmzhE5upDx0,93
35
+ ttnn_visualizer/tests/test_queries.py,sha256=3je_FKRgZLdoDTfIe6kENLFXWUeeYVgY3ZDVnvWgCJo,13754
36
+ ttnn_visualizer/tests/test_serializers.py,sha256=KLzkqQhDlqPTaJ5MUy-r7Nb2WT2hp5aTm_ceA0tlxIo,18911
37
+ ttnn_visualizer/tests/test_utils.py,sha256=9vUuCNg1mwhtB5RZKdJf-vo0lt9M5niHwkSezFwmklk,11186
38
+ ttnn_visualizer-0.70.0.dist-info/licenses/LICENSE,sha256=73btFSS9sVfj4HGhNlBx6nYo4rkKnOlWOi8H1MpDoSE,20286
39
+ ttnn_visualizer-0.70.0.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
40
+ ttnn_visualizer-0.70.0.dist-info/METADATA,sha256=r0ejf3XqwaKO4ndGHA95-uQDuOEav7PtSbC6EFUtRfo,8912
41
+ ttnn_visualizer-0.70.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
42
+ ttnn_visualizer-0.70.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
43
+ ttnn_visualizer-0.70.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
44
+ ttnn_visualizer-0.70.0.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- import{I as s}from"./index-voJy5fZe.js";import{I as r}from"./index-BZITDwoa.js";import{p as n,I as c}from"./index-ryWOUYjC.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,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-BZLVCrxa.js","assets/index-voJy5fZe.js","assets/index-BZITDwoa.js","assets/index-ryWOUYjC.js","assets/index-DS75jGv-.css"])))=>i.map(i=>d[i]);
2
- import{_ as e}from"./index-ryWOUYjC.js";const s=async(t,a)=>{const{getIconPaths:o}=await e(async()=>{const{getIconPaths:r}=await import("./allPaths-BZLVCrxa.js");return{getIconPaths:r}},__vite__mapDeps([0,1,2,3,4]));return o(t,a)};export{s as allPathsLoader};