ttnn-visualizer 0.27.3__py3-none-any.whl → 0.28.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/serializers.py +13 -5
- ttnn_visualizer/sessions.py +8 -8
- ttnn_visualizer/settings.py +2 -2
- ttnn_visualizer/static/assets/{allPaths-DhoJy5jM.js → allPaths-DGdUWICT.js} +1 -1
- ttnn_visualizer/static/assets/{allPathsLoader-B4SALZ6P.js → allPathsLoader-BSYo-ZTH.js} +2 -2
- ttnn_visualizer/static/assets/{index-BME2kYRR.js → index-CYZZ70nJ.js} +207 -207
- ttnn_visualizer/static/assets/{index-BTfoVg9a.css → index-DWVfq2z5.css} +2 -2
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-B2PjTVfS.js → splitPathsBySizeLoader-hHE0y-FQ.js} +1 -1
- ttnn_visualizer/static/index.html +2 -2
- ttnn_visualizer/views.py +26 -4
- {ttnn_visualizer-0.27.3.dist-info → ttnn_visualizer-0.28.0.dist-info}/METADATA +11 -10
- {ttnn_visualizer-0.27.3.dist-info → ttnn_visualizer-0.28.0.dist-info}/RECORD +17 -17
- {ttnn_visualizer-0.27.3.dist-info → ttnn_visualizer-0.28.0.dist-info}/LICENSE +0 -0
- {ttnn_visualizer-0.27.3.dist-info → ttnn_visualizer-0.28.0.dist-info}/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.27.3.dist-info → ttnn_visualizer-0.28.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.27.3.dist-info → ttnn_visualizer-0.28.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.27.3.dist-info → ttnn_visualizer-0.28.0.dist-info}/top_level.txt +0 -0
ttnn_visualizer/serializers.py
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
import dataclasses
|
2
2
|
from collections import defaultdict
|
3
3
|
from typing import List
|
4
|
+
|
5
|
+
from ttnn_visualizer.models import BufferType, Operation, TensorComparisonRecord
|
6
|
+
|
7
|
+
|
4
8
|
# SPDX-License-Identifier: Apache-2.0
|
5
9
|
#
|
6
10
|
# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC
|
7
11
|
|
8
12
|
|
9
|
-
from ttnn_visualizer.models import BufferType, Operation, TensorComparisonRecord
|
10
|
-
|
11
|
-
|
12
13
|
def serialize_operations(
|
13
14
|
inputs,
|
14
15
|
operation_arguments,
|
@@ -39,7 +40,6 @@ def serialize_operations(
|
|
39
40
|
|
40
41
|
results = []
|
41
42
|
for operation in operations:
|
42
|
-
|
43
43
|
inputs = inputs_dict[operation.operation_id]
|
44
44
|
outputs = outputs_dict[operation.operation_id]
|
45
45
|
arguments = [a.to_dict() for a in arguments_dict[operation.operation_id]]
|
@@ -207,7 +207,6 @@ def serialize_devices(devices):
|
|
207
207
|
|
208
208
|
|
209
209
|
def serialize_operations_buffers(operations, buffers):
|
210
|
-
|
211
210
|
buffer_dict = defaultdict(list)
|
212
211
|
for b in buffers:
|
213
212
|
buffer_dict[b.operation_id].append(b)
|
@@ -219,6 +218,15 @@ def serialize_operations_buffers(operations, buffers):
|
|
219
218
|
return results
|
220
219
|
|
221
220
|
|
221
|
+
def serialize_buffer(buffer):
|
222
|
+
return {
|
223
|
+
"buffer_type": buffer.buffer_type,
|
224
|
+
"device_id": buffer.device_id,
|
225
|
+
"size": buffer.max_size_per_bank,
|
226
|
+
"address": buffer.address,
|
227
|
+
}
|
228
|
+
|
229
|
+
|
222
230
|
def serialize_tensors(
|
223
231
|
tensors, producers_consumers, local_comparisons, global_comparisons
|
224
232
|
):
|
ttnn_visualizer/sessions.py
CHANGED
@@ -271,17 +271,17 @@ def create_random_instance_id():
|
|
271
271
|
|
272
272
|
|
273
273
|
def create_instance_from_local_paths(report_path, profiler_path):
|
274
|
-
_report_path = Path(report_path)
|
275
|
-
_profiler_path = Path(profiler_path)
|
274
|
+
_report_path = Path(report_path)
|
275
|
+
_profiler_path = Path(profiler_path)
|
276
276
|
|
277
|
-
if
|
277
|
+
if not _report_path.exists() or not _report_path.is_dir():
|
278
278
|
raise InvalidReportPath()
|
279
279
|
|
280
|
-
if
|
280
|
+
if not _profiler_path.exists() or not _profiler_path.is_dir():
|
281
281
|
raise InvalidProfilerPath()
|
282
282
|
|
283
|
-
report_name = _report_path.parts[-1] if
|
284
|
-
profile_name = _profiler_path.parts[-1] if
|
283
|
+
report_name = _report_path.parts[-1] if len(_report_path.parts) > 2 else ""
|
284
|
+
profile_name = _profiler_path.parts[-1] if len(_profiler_path.parts) > 2 else ""
|
285
285
|
session_data = InstanceTable(
|
286
286
|
instance_id=create_random_instance_id(),
|
287
287
|
active_report={
|
@@ -289,8 +289,8 @@ def create_instance_from_local_paths(report_path, profiler_path):
|
|
289
289
|
"profile_name": profile_name,
|
290
290
|
"npe_name": None,
|
291
291
|
},
|
292
|
-
report_path=f"{
|
293
|
-
profiler_path=profiler_path
|
292
|
+
report_path=f"{report_path}/db.sqlite",
|
293
|
+
profiler_path=profiler_path,
|
294
294
|
remote_connection=None,
|
295
295
|
remote_folder=None,
|
296
296
|
remote_profile_folder=None,
|
ttnn_visualizer/settings.py
CHANGED
@@ -19,7 +19,7 @@ class DefaultConfig(object):
|
|
19
19
|
|
20
20
|
# Path Settings
|
21
21
|
REPORT_DATA_DIRECTORY = Path(__file__).parent.absolute().joinpath("data")
|
22
|
-
|
22
|
+
DB_VERSION = "0.26.0" # App version when DB schema last changed
|
23
23
|
LOCAL_DATA_DIRECTORY = Path(REPORT_DATA_DIRECTORY).joinpath("local")
|
24
24
|
REMOTE_DATA_DIRECTORY = Path(REPORT_DATA_DIRECTORY).joinpath("remote")
|
25
25
|
APPLICATION_DIR = os.path.abspath(os.path.join(__file__, "..", os.pardir))
|
@@ -37,7 +37,7 @@ class DefaultConfig(object):
|
|
37
37
|
|
38
38
|
# SQL Alchemy Settings
|
39
39
|
SQLALCHEMY_DATABASE_URI = (
|
40
|
-
f"sqlite:///{os.path.join(APPLICATION_DIR, f'ttnn_{
|
40
|
+
f"sqlite:///{os.path.join(APPLICATION_DIR, f'ttnn_{DB_VERSION}.db')}"
|
41
41
|
)
|
42
42
|
SQLALCHEMY_ENGINE_OPTIONS = {
|
43
43
|
"pool_size": 10, # Adjust pool size as needed (default is 5)
|
@@ -1 +1 @@
|
|
1
|
-
import{I as n}from"./index-BVMreIQm.js";import{I as e}from"./index-Do7YB6C4.js";import{p as r,I as s}from"./index-
|
1
|
+
import{I as n}from"./index-BVMreIQm.js";import{I as e}from"./index-Do7YB6C4.js";import{p as r,I as s}from"./index-CYZZ70nJ.js";function I(o,t){var a=r(o);return t===s.STANDARD?n[a]:e[a]}function p(o){return r(o)}export{n as IconSvgPaths16,e as IconSvgPaths20,I as getIconPaths,p as iconNameToPathsRecordKey};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-
|
2
|
-
import{_ as o,a as n,b as i}from"./index-
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-DGdUWICT.js","assets/index-BVMreIQm.js","assets/index-Do7YB6C4.js","assets/index-CYZZ70nJ.js","assets/index-DWVfq2z5.css"])))=>i.map(i=>d[i]);
|
2
|
+
import{_ as o,a as n,b as i}from"./index-CYZZ70nJ.js";var _=function(e,a){return o(void 0,void 0,void 0,function(){var t;return n(this,function(r){switch(r.label){case 0:return[4,i(()=>import("./allPaths-DGdUWICT.js"),__vite__mapDeps([0,1,2,3,4]))];case 1:return t=r.sent().getIconPaths,[2,t(e,a)]}})})};export{_ as allPathsLoader};
|