ttnn-visualizer 0.64.0__py3-none-any.whl → 0.65.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/csv_queries.py +32 -7
- ttnn_visualizer/static/assets/{allPaths-DWjqav_8.js → allPaths-B6-2k5TG.js} +1 -1
- ttnn_visualizer/static/assets/allPathsLoader-Cylj0kPO.js +2 -0
- ttnn_visualizer/static/assets/{index-BE2R-cuu.css → index-C7m_PE7l.css} +1 -1
- ttnn_visualizer/static/assets/{index-DDrUX09k.js → index-DMzz7de9.js} +203 -214
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-_GpmIkFm.js → splitPathsBySizeLoader-BVbD9Udb.js} +1 -1
- ttnn_visualizer/static/index.html +2 -2
- ttnn_visualizer/views.py +52 -0
- {ttnn_visualizer-0.64.0.dist-info → ttnn_visualizer-0.65.0.dist-info}/METADATA +2 -2
- {ttnn_visualizer-0.64.0.dist-info → ttnn_visualizer-0.65.0.dist-info}/RECORD +15 -15
- {ttnn_visualizer-0.64.0.dist-info → ttnn_visualizer-0.65.0.dist-info}/licenses/LICENSE +0 -2
- ttnn_visualizer/static/assets/allPathsLoader-B0eRT9aL.js +0 -2
- {ttnn_visualizer-0.64.0.dist-info → ttnn_visualizer-0.65.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.64.0.dist-info → ttnn_visualizer-0.65.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.64.0.dist-info → ttnn_visualizer-0.65.0.dist-info}/licenses/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.64.0.dist-info → ttnn_visualizer-0.65.0.dist-info}/top_level.txt +0 -0
ttnn_visualizer/csv_queries.py
CHANGED
|
@@ -398,6 +398,7 @@ class OpsPerformanceReportQueries:
|
|
|
398
398
|
"total_percent",
|
|
399
399
|
"bound",
|
|
400
400
|
"op_code",
|
|
401
|
+
"device",
|
|
401
402
|
"device_time",
|
|
402
403
|
"op_to_op_gap",
|
|
403
404
|
"cores",
|
|
@@ -430,6 +431,18 @@ class OpsPerformanceReportQueries:
|
|
|
430
431
|
"flops_std",
|
|
431
432
|
]
|
|
432
433
|
|
|
434
|
+
STACKED_REPORT_COLUMNS_WITH_DEVICE = [
|
|
435
|
+
"percent",
|
|
436
|
+
"op_code",
|
|
437
|
+
"device",
|
|
438
|
+
"device_time_sum_us",
|
|
439
|
+
"ops_count",
|
|
440
|
+
"flops_min",
|
|
441
|
+
"flops_max",
|
|
442
|
+
"flops_mean",
|
|
443
|
+
"flops_std",
|
|
444
|
+
]
|
|
445
|
+
|
|
433
446
|
PASSTHROUGH_COLUMNS = {
|
|
434
447
|
"pm_ideal_ns": "PM IDEAL [ns]",
|
|
435
448
|
}
|
|
@@ -437,6 +450,7 @@ class OpsPerformanceReportQueries:
|
|
|
437
450
|
DEFAULT_START_SIGNPOST = None
|
|
438
451
|
DEFAULT_END_SIGNPOST = None
|
|
439
452
|
DEFAULT_IGNORE_SIGNPOSTS = True
|
|
453
|
+
DEFAULT_PRINT_SIGNPOSTS = True
|
|
440
454
|
DEFAULT_MIN_PERCENTAGE = 0.5
|
|
441
455
|
DEFAULT_ID_RANGE = None
|
|
442
456
|
DEFAULT_NO_ADVICE = False
|
|
@@ -445,6 +459,7 @@ class OpsPerformanceReportQueries:
|
|
|
445
459
|
DEFAULT_NO_HOST_OPS = False
|
|
446
460
|
DEFAULT_NO_STACKED_REPORT = False
|
|
447
461
|
DEFAULT_NO_STACK_BY_IN0 = True
|
|
462
|
+
DEFAULT_MERGE_DEVICES = True
|
|
448
463
|
|
|
449
464
|
@classmethod
|
|
450
465
|
def generate_report(cls, instance, **kwargs):
|
|
@@ -455,14 +470,17 @@ class OpsPerformanceReportQueries:
|
|
|
455
470
|
start_signpost = kwargs.get("start_signpost", cls.DEFAULT_START_SIGNPOST)
|
|
456
471
|
end_signpost = kwargs.get("end_signpost", cls.DEFAULT_END_SIGNPOST)
|
|
457
472
|
ignore_signposts = cls.DEFAULT_IGNORE_SIGNPOSTS
|
|
473
|
+
print_signposts = kwargs.get("print_signposts", cls.DEFAULT_PRINT_SIGNPOSTS)
|
|
458
474
|
stack_by_in0 = kwargs.get("stack_by_in0", cls.DEFAULT_NO_STACK_BY_IN0)
|
|
459
475
|
no_host_ops = kwargs.get("hide_host_ops", cls.DEFAULT_NO_HOST_OPS)
|
|
476
|
+
merge_devices = kwargs.get("merge_devices", cls.DEFAULT_MERGE_DEVICES)
|
|
460
477
|
|
|
461
478
|
if start_signpost or end_signpost:
|
|
462
479
|
ignore_signposts = False
|
|
463
480
|
|
|
464
481
|
# perf_report currently generates a PNG alongside the CSV using the same temp name - we'll just delete it afterwards
|
|
465
|
-
stacked_png_file =
|
|
482
|
+
stacked_png_file = csv_stacked_output_file + ".png"
|
|
483
|
+
stacked_csv_file = csv_stacked_output_file + ".csv"
|
|
466
484
|
|
|
467
485
|
try:
|
|
468
486
|
perf_report.generate_perf_report(
|
|
@@ -470,6 +488,7 @@ class OpsPerformanceReportQueries:
|
|
|
470
488
|
start_signpost,
|
|
471
489
|
end_signpost,
|
|
472
490
|
ignore_signposts,
|
|
491
|
+
print_signposts,
|
|
473
492
|
cls.DEFAULT_MIN_PERCENTAGE,
|
|
474
493
|
cls.DEFAULT_ID_RANGE,
|
|
475
494
|
csv_output_file,
|
|
@@ -480,6 +499,7 @@ class OpsPerformanceReportQueries:
|
|
|
480
499
|
cls.DEFAULT_NO_STACKED_REPORT,
|
|
481
500
|
stack_by_in0,
|
|
482
501
|
csv_stacked_output_file,
|
|
502
|
+
not merge_devices,
|
|
483
503
|
)
|
|
484
504
|
except Exception as e:
|
|
485
505
|
logger.error(f"Error generating performance report: {e}")
|
|
@@ -556,16 +576,23 @@ class OpsPerformanceReportQueries:
|
|
|
556
576
|
|
|
557
577
|
stacked_report = []
|
|
558
578
|
|
|
559
|
-
if os.path.exists(
|
|
579
|
+
if os.path.exists(stacked_csv_file):
|
|
560
580
|
try:
|
|
561
|
-
with open(
|
|
581
|
+
with open(stacked_csv_file, newline="") as csvfile:
|
|
562
582
|
reader = csv.reader(csvfile, delimiter=",")
|
|
563
583
|
next(reader, None)
|
|
564
584
|
|
|
585
|
+
# Use the appropriate column list based on merge_devices flag
|
|
586
|
+
stacked_columns = (
|
|
587
|
+
cls.STACKED_REPORT_COLUMNS_WITH_DEVICE
|
|
588
|
+
if not merge_devices
|
|
589
|
+
else cls.STACKED_REPORT_COLUMNS
|
|
590
|
+
)
|
|
591
|
+
|
|
565
592
|
for row in reader:
|
|
566
593
|
processed_row = {
|
|
567
594
|
column: row[index]
|
|
568
|
-
for index, column in enumerate(
|
|
595
|
+
for index, column in enumerate(stacked_columns)
|
|
569
596
|
if index < len(row)
|
|
570
597
|
}
|
|
571
598
|
|
|
@@ -581,12 +608,10 @@ class OpsPerformanceReportQueries:
|
|
|
581
608
|
except csv.Error as e:
|
|
582
609
|
raise DataFormatError() from e
|
|
583
610
|
finally:
|
|
584
|
-
os.unlink(
|
|
611
|
+
os.unlink(stacked_csv_file)
|
|
585
612
|
if os.path.exists(stacked_png_file):
|
|
586
613
|
os.unlink(stacked_png_file)
|
|
587
614
|
|
|
588
|
-
stacked_report.append(processed_row)
|
|
589
|
-
|
|
590
615
|
return {
|
|
591
616
|
"report": report,
|
|
592
617
|
"stacked_report": stacked_report,
|
|
@@ -1 +1 @@
|
|
|
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-
|
|
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-DMzz7de9.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-B6-2k5TG.js","assets/index-voJy5fZe.js","assets/index-BZITDwoa.js","assets/index-DMzz7de9.js","assets/index-C7m_PE7l.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"./index-DMzz7de9.js";const s=async(t,a)=>{const{getIconPaths:o}=await e(async()=>{const{getIconPaths:r}=await import("./allPaths-B6-2k5TG.js");return{getIconPaths:r}},__vite__mapDeps([0,1,2,3,4]));return o(t,a)};export{s as allPathsLoader};
|