From 8e1277eb29668e6ae29e39e16c3744a795833f63 Mon Sep 17 00:00:00 2001 From: Profiler Team Date: Thu, 6 Mar 2025 12:02:30 -0800 Subject: [PATCH] Delete obsolete tools, dcn collective stats and tf data bottleneck analysis. PiperOrigin-RevId: 734235083 --- frontend/app/common/utils/utils.ts | 1 - .../app/components/dcn_collective_stats/BUILD | 44 ---- .../dcn_collective_stats.ng.html | 41 --- .../dcn_collective_stats.scss | 10 - .../dcn_collective_stats.ts | 85 ------- .../dcn_collective_stats_module.ts | 15 -- frontend/app/components/main_page/BUILD | 2 - .../components/main_page/main_page_module.ts | 8 - .../tf_data_bottleneck_analysis/BUILD | 36 --- .../tf_data_bottleneck_analysis.ng.html | 46 ---- .../tf_data_bottleneck_analysis.scss | 13 - .../tf_data_bottleneck_analysis.ts | 142 ----------- .../tf_data_bottleneck_analysis_module.ts | 23 -- .../app/services/data_service/data_service.ts | 3 - .../app/services/data_service/mock_data.ts | 238 ------------------ .../convert/raw_to_tool_data.py | 5 - .../tpu/tensorflow/tpu_tf2_keras_test.py | 1 - .../profile_plugin.py | 5 +- .../profile_plugin_test.py | 6 - 19 files changed, 1 insertion(+), 723 deletions(-) delete mode 100644 frontend/app/components/dcn_collective_stats/BUILD delete mode 100644 frontend/app/components/dcn_collective_stats/dcn_collective_stats.ng.html delete mode 100644 frontend/app/components/dcn_collective_stats/dcn_collective_stats.scss delete mode 100644 frontend/app/components/dcn_collective_stats/dcn_collective_stats.ts delete mode 100644 frontend/app/components/dcn_collective_stats/dcn_collective_stats_module.ts delete mode 100644 frontend/app/components/tf_data_bottleneck_analysis/BUILD delete mode 100644 frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ng.html delete mode 100644 frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.scss delete mode 100644 frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ts delete mode 100644 frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis_module.ts diff --git a/frontend/app/common/utils/utils.ts b/frontend/app/common/utils/utils.ts index d248dfb9a..8ae821f8e 100644 --- a/frontend/app/common/utils/utils.ts +++ b/frontend/app/common/utils/utils.ts @@ -64,7 +64,6 @@ const KNOWN_TOOLS = [ 'pod_viewer', 'framework_op_stats', 'trace_viewer', - 'tf_data_bottleneck_analysis', ]; /** diff --git a/frontend/app/components/dcn_collective_stats/BUILD b/frontend/app/components/dcn_collective_stats/BUILD deleted file mode 100644 index 1a23fb1af..000000000 --- a/frontend/app/components/dcn_collective_stats/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") -load("//defs:defs.bzl", "xprof_ng_module") - -package(default_visibility = ["//frontend:internal"]) - -xprof_ng_module( - name = "dcn_collective_stats", - srcs = [ - "dcn_collective_stats.ts", - "dcn_collective_stats_module.ts", - ], - assets = [ - ":dcn_collective_stats_css", - "dcn_collective_stats.ng.html", - ], - # strict_templates = False, - deps = [ - "@npm//@angular/common", - "@npm//@angular/core", - "@npm//@angular/router", - "@npm//@ngrx/store", - "@npm//@types/google.visualization", - "@npm//rxjs", - "@org_xprof//frontend/app/common/interfaces", - "@org_xprof//frontend/app/common/interfaces:chart", - "@org_xprof//frontend/app/common/utils", - "@org_xprof//frontend/app/components/chart", - "@org_xprof//frontend/app/components/chart:chart_options", - "@org_xprof//frontend/app/components/chart:default_data_provider", - "@org_xprof//frontend/app/components/chart/dashboard", - "@org_xprof//frontend/app/services/data_service", - "@org_xprof//frontend/app/store", - ], -) - -sass_binary( - name = "dcn_collective_stats_css", - src = "dcn_collective_stats.scss", - # stack = False, - sourcemap = False, - deps = [ - "@org_xprof//frontend/app/styles:common", - ], -) diff --git a/frontend/app/components/dcn_collective_stats/dcn_collective_stats.ng.html b/frontend/app/components/dcn_collective_stats/dcn_collective_stats.ng.html deleted file mode 100644 index 1e07ab31d..000000000 --- a/frontend/app/components/dcn_collective_stats/dcn_collective_stats.ng.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
DCN Collective Stats
-
-
- This tool provides insights into the DCN Collective. -
-
- (1) DCN Collective Name is the name assigned to the collective. -
-
- (2) Recv Op Name and Send Op Name is TPU recv-done op name and send op name. -
-
- (3) Slack Time is the network independent time the collective has to transmit the data. -
-
- (4) Observed Duration is the interval between the start of the send op to the end of the corresponding recv-done op. -
-
- (5) Stall Duration is the duration of time the collective spends in send/send-done/recv/recv-done ops. -
-
- (6) Occurrences is the total number of occurrences for each collective in the profiled duration. -
-
- (7) Aggregated Total Stall is the total stall duration of the collective in the profiled duration. -
-
- (8) Data Transmitted Size is the total data that needs to be transmitted over the network. -
-
- (9) Required Bandwidth is the bandwidth required to transmit the data in the provided slack. -
-
-
- -
- - -
diff --git a/frontend/app/components/dcn_collective_stats/dcn_collective_stats.scss b/frontend/app/components/dcn_collective_stats/dcn_collective_stats.scss deleted file mode 100644 index 03b94fd0a..000000000 --- a/frontend/app/components/dcn_collective_stats/dcn_collective_stats.scss +++ /dev/null @@ -1,10 +0,0 @@ -/** CSS for dcn collective stats component. */ -@import 'frontend/app/styles/common'; - -.section-container { - padding: 20px; -} - -chart { - margin: 0 16px; -} diff --git a/frontend/app/components/dcn_collective_stats/dcn_collective_stats.ts b/frontend/app/components/dcn_collective_stats/dcn_collective_stats.ts deleted file mode 100644 index aff921913..000000000 --- a/frontend/app/components/dcn_collective_stats/dcn_collective_stats.ts +++ /dev/null @@ -1,85 +0,0 @@ -import {Component, OnDestroy} from '@angular/core'; -import {ActivatedRoute} from '@angular/router'; -import {Store} from '@ngrx/store'; -import {ChartDataInfo} from 'org_xprof/frontend/app/common/interfaces/chart'; -import {SimpleDataTable} from 'org_xprof/frontend/app/common/interfaces/data_table'; -import {NavigationEvent} from 'org_xprof/frontend/app/common/interfaces/navigation_event'; -import {TABLE_OPTIONS} from 'org_xprof/frontend/app/components/chart/chart_options'; -import {Dashboard} from 'org_xprof/frontend/app/components/chart/dashboard/dashboard'; -import {DefaultDataProvider} from 'org_xprof/frontend/app/components/chart/default_data_provider'; -import {DataService} from 'org_xprof/frontend/app/services/data_service/data_service'; -import {setLoadingStateAction} from 'org_xprof/frontend/app/store/actions'; -import {ReplaySubject} from 'rxjs'; -import {takeUntil} from 'rxjs/operators'; - -const DCN_COLLECTIVE_STATS_INDEX = 0; - -/** A Dcn Collective Stats page component. */ -@Component({ - standalone: false, - selector: 'dcn-collective-stats', - templateUrl: './dcn_collective_stats.ng.html', - styleUrls: ['./dcn_collective_stats.scss'] -}) -export class DcnCollectiveStats extends Dashboard implements OnDestroy { - /** Handles on-destroy Subject, used to unsubscribe. */ - private readonly destroyed = new ReplaySubject(1); - - dataInfo: ChartDataInfo = { - data: null, - dataProvider: new DefaultDataProvider(), - filters: [], - options: { - ...TABLE_OPTIONS, - showRowNumber: false, - }, - }; - - constructor( - route: ActivatedRoute, private readonly dataService: DataService, - private readonly store: Store<{}>) { - super(); - route.params.pipe(takeUntil(this.destroyed)).subscribe((params) => { - this.update(params as NavigationEvent); - }); - } - - update(event: NavigationEvent) { - const run = event.run || ''; - const tag = event.tag || 'dcn_collective_stats'; - const host = event.host || ''; - - this.store.dispatch(setLoadingStateAction({ - loadingState: { - loading: true, - message: 'Loading Dcn Collective Stats data', - } - })); - - this.dataService.getData(run, tag, host) - .pipe(takeUntil(this.destroyed)) - .subscribe((data) => { - this.store.dispatch(setLoadingStateAction({ - loadingState: { - loading: false, - message: '', - } - })); - - const d = data as SimpleDataTable[] | null; - if (d && d.hasOwnProperty(DCN_COLLECTIVE_STATS_INDEX)) { - this.parseData(d[DCN_COLLECTIVE_STATS_INDEX]); - this.dataInfo = { - ...this.dataInfo, - data: d[DCN_COLLECTIVE_STATS_INDEX], - }; - } - }); - } - - ngOnDestroy() { - // Unsubscribes all pending subscriptions. - this.destroyed.next(); - this.destroyed.complete(); - } -} diff --git a/frontend/app/components/dcn_collective_stats/dcn_collective_stats_module.ts b/frontend/app/components/dcn_collective_stats/dcn_collective_stats_module.ts deleted file mode 100644 index 8a5282fd2..000000000 --- a/frontend/app/components/dcn_collective_stats/dcn_collective_stats_module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {NgModule} from '@angular/core'; -import {ChartModule} from 'org_xprof/frontend/app/components/chart/chart'; - -import {DcnCollectiveStats} from './dcn_collective_stats'; - -/** A Dcn Collective Stats module. */ -@NgModule({ - declarations: [DcnCollectiveStats], - imports: [ - ChartModule, - ], - exports: [DcnCollectiveStats], -}) -export class DcnCollectiveStatsModule { -} diff --git a/frontend/app/components/main_page/BUILD b/frontend/app/components/main_page/BUILD index 38de3ba0c..5c217fdd2 100644 --- a/frontend/app/components/main_page/BUILD +++ b/frontend/app/components/main_page/BUILD @@ -25,7 +25,6 @@ xprof_ng_module( "@org_xprof//frontend/app/common/angular:angular_material_toolbar", "@org_xprof//frontend/app/common/constants", "@org_xprof//frontend/app/common/interfaces", - "@org_xprof//frontend/app/components/dcn_collective_stats", "@org_xprof//frontend/app/components/empty_page", "@org_xprof//frontend/app/components/framework_op_stats:framework_op_stats_adapter", "@org_xprof//frontend/app/components/graph_viewer", @@ -40,7 +39,6 @@ xprof_ng_module( "@org_xprof//frontend/app/components/pod_viewer", "@org_xprof//frontend/app/components/roofline_model", "@org_xprof//frontend/app/components/sidenav", - "@org_xprof//frontend/app/components/tf_data_bottleneck_analysis", "@org_xprof//frontend/app/components/trace_viewer", "@org_xprof//frontend/app/services/communication_service", "@org_xprof//frontend/app/store", diff --git a/frontend/app/components/main_page/main_page_module.ts b/frontend/app/components/main_page/main_page_module.ts index 9ccc094ab..17e7af335 100644 --- a/frontend/app/components/main_page/main_page_module.ts +++ b/frontend/app/components/main_page/main_page_module.ts @@ -5,8 +5,6 @@ import {MatProgressBarModule} from '@angular/material/progress-bar'; import {MatSidenavModule} from '@angular/material/sidenav'; import {MatToolbarModule} from '@angular/material/toolbar'; import {RouterModule, Routes} from '@angular/router'; -import {DcnCollectiveStats} from 'org_xprof/frontend/app/components/dcn_collective_stats/dcn_collective_stats'; -import {DcnCollectiveStatsModule} from 'org_xprof/frontend/app/components/dcn_collective_stats/dcn_collective_stats_module'; import {EmptyPage} from 'org_xprof/frontend/app/components/empty_page/empty_page'; import {EmptyPageModule} from 'org_xprof/frontend/app/components/empty_page/empty_page_module'; import {FrameworkOpStatsAdapter, FrameworkOpStatsAdapterModule} from 'org_xprof/frontend/app/components/framework_op_stats/framework_op_stats_adapter'; @@ -32,8 +30,6 @@ import {PodViewerModule} from 'org_xprof/frontend/app/components/pod_viewer/pod_ import {RooflineModel} from 'org_xprof/frontend/app/components/roofline_model/roofline_model'; import {RooflineModelModule} from 'org_xprof/frontend/app/components/roofline_model/roofline_model_module'; import {SideNavModule} from 'org_xprof/frontend/app/components/sidenav/sidenav_module'; -import {TfDataBottleneckAnalysis} from 'org_xprof/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis'; -import {TfDataBottleneckAnalysisModule} from 'org_xprof/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis_module'; import {TraceViewer} from 'org_xprof/frontend/app/components/trace_viewer/trace_viewer'; import {TraceViewerModule} from 'org_xprof/frontend/app/components/trace_viewer/trace_viewer_module'; @@ -58,7 +54,6 @@ export const routes: Routes = [ {path: 'op_profile^', component: OpProfile}, {path: 'pod_viewer', component: PodViewer}, {path: 'pod_viewer^', component: PodViewer}, - {path: 'tf_data_bottleneck_analysis^', component: TfDataBottleneckAnalysis}, {path: 'framework_op_stats', component: FrameworkOpStatsAdapter}, {path: 'framework_op_stats^', component: FrameworkOpStatsAdapter}, {path: 'trace_viewer', component: TraceViewer}, @@ -66,7 +61,6 @@ export const routes: Routes = [ {path: 'trace_viewer@^', component: TraceViewer}, {path: 'trace_viewer^', component: TraceViewer}, {path: 'graph_viewer^', component: GraphViewer}, - {path: 'dcn_collective_stats^', component: DcnCollectiveStats}, {path: 'inference_profile^', component: InferenceProfile}, {path: 'inference_profile', component: InferenceProfile}, {path: 'hlo_stats', component: HloStats}, @@ -96,9 +90,7 @@ export const routes: Routes = [ OpProfileModule, PodViewerModule, GraphViewerModule, - TfDataBottleneckAnalysisModule, FrameworkOpStatsAdapterModule, - DcnCollectiveStatsModule, HloStatsModule, RooflineModelModule, InferenceProfileModule, diff --git a/frontend/app/components/tf_data_bottleneck_analysis/BUILD b/frontend/app/components/tf_data_bottleneck_analysis/BUILD deleted file mode 100644 index 130657954..000000000 --- a/frontend/app/components/tf_data_bottleneck_analysis/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") -load("//defs:defs.bzl", "xprof_ng_module") - -package(default_visibility = ["//frontend:internal"]) - -xprof_ng_module( - name = "tf_data_bottleneck_analysis", - srcs = [ - "tf_data_bottleneck_analysis.ts", - "tf_data_bottleneck_analysis_module.ts", - ], - assets = [ - ":tf_data_bottleneck_analysis_css", - "tf_data_bottleneck_analysis.ng.html", - ], - deps = [ - "@npm//@angular/core", - "@npm//@angular/router", - "@npm//@ngrx/store", - "@npm//rxjs", - "@org_xprof//frontend/app/common/angular:angular_material_divider", - "@org_xprof//frontend/app/common/interfaces", - "@org_xprof//frontend/app/components/chart/dashboard", - "@org_xprof//frontend/app/components/chart/org_chart", - "@org_xprof//frontend/app/components/chart/table", - "@org_xprof//frontend/app/components/controls/category_filter", - "@org_xprof//frontend/app/services/data_service", - "@org_xprof//frontend/app/store", - ], -) - -sass_binary( - name = "tf_data_bottleneck_analysis_css", - src = "tf_data_bottleneck_analysis.scss", - sourcemap = False, -) diff --git a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ng.html b/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ng.html deleted file mode 100644 index 73413270a..000000000 --- a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ng.html +++ /dev/null @@ -1,46 +0,0 @@ -
-
Performance Analysis Summary
-
-
- This tool is experimental. Please report an issue - here if the - analysis result seems off. -
-
-
-
- -
- - - -
-
Summary of All Input Pipelines
-
- -
- - - -
-
Input Pipeline Graph
-
-
- - - - - - -
-
- -
diff --git a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.scss b/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.scss deleted file mode 100644 index 47d079c8c..000000000 --- a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.scss +++ /dev/null @@ -1,13 +0,0 @@ -/** CSS for a tf data bottleneck analysis component. */ - -.section-container { - padding: 20px; -} - -.row { - display: flex; -} - -.flex-space { - flex: 1; -} diff --git a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ts b/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ts deleted file mode 100644 index 5f227cd36..000000000 --- a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis.ts +++ /dev/null @@ -1,142 +0,0 @@ -import {Component, OnDestroy} from '@angular/core'; -import {ActivatedRoute} from '@angular/router'; -import {Store} from '@ngrx/store'; -import {SimpleDataTable} from 'org_xprof/frontend/app/common/interfaces/data_table'; -import {NavigationEvent} from 'org_xprof/frontend/app/common/interfaces/navigation_event'; -import {Dashboard} from 'org_xprof/frontend/app/components/chart/dashboard/dashboard'; -import {DataService} from 'org_xprof/frontend/app/services/data_service/data_service'; -import {setLoadingStateAction} from 'org_xprof/frontend/app/store/actions'; -import {ReplaySubject} from 'rxjs'; -import {takeUntil} from 'rxjs/operators'; - -const EVENT_DATA_INDEX = 0; -const SUMMARY_DATA_INDEX = 1; -const BOTTLENECK_DATA_INDEX = 2; - -const NAME_COLUMN_INDEX = 3; -const PARENT_COLUMN_INDEX = 4; -const BLOCKING_COLUMN_INDEX = 5; - -const BLOCKING_TYPE = 1; -const BOTTLENECK_TYPE = 2; - -const IS_INPUT_BOUND_TABLE_PROPERTY_NAME = 'is_input_bound'; -const SUMMARY_MESSAGE_TABLE_PROPERTY_NAME = 'summary_message'; -const TRUE_STR = 'true'; - -/** A tf data bottleneck analysis component. */ -@Component({ - standalone: false, - selector: 'tf-data-bottleneck-analysis', - templateUrl: './tf_data_bottleneck_analysis.ng.html', - styleUrls: ['./tf_data_bottleneck_analysis.scss'] -}) -export class TfDataBottleneckAnalysis extends Dashboard implements OnDestroy { - /** Handles on-destroy Subject, used to unsubscribe. */ - private readonly destroyed = new ReplaySubject(1); - - isInputBound = false; - summaryMessage: string|undefined; - - orgChartDataView?: google.visualization.DataView; - summaryDataTable?: google.visualization.DataTable; - summaryDataView?: google.visualization.DataView; - bottleneckDataTable?: google.visualization.DataTable; - bottleneckDataView?: google.visualization.DataView; - - constructor( - route: ActivatedRoute, private readonly dataService: DataService, - private readonly store: Store<{}>) { - super(); - route.params.pipe(takeUntil(this.destroyed)).subscribe((params) => { - this.update(params as NavigationEvent); - }); - } - - styleOrgChart() { - if (this.dataTable) { - for (let i = 0; i < this.dataTable.getNumberOfRows(); ++i) { - const type = this.dataTable.getValue(i, BLOCKING_COLUMN_INDEX); - switch (type) { - case BLOCKING_TYPE: - this.dataTable.setRowProperty( - i, 'style', 'border: 4px solid black'); - break; - case BOTTLENECK_TYPE: - this.dataTable.setRowProperty(i, 'style', 'border: 4px solid red'); - break; - default: - this.dataTable.setRowProperty( - i, 'style', 'border: 4px dashed gray'); - break; - } - } - } - } - - update(event: NavigationEvent) { - this.store.dispatch(setLoadingStateAction({ - loadingState: { - loading: true, - message: 'Loading data', - } - })); - - this.dataService - .getData( - event.run || '', event.tag || 'tf_data_bottleneck_analysis', - event.host || '') - .pipe(takeUntil(this.destroyed)) - .subscribe((data) => { - this.store.dispatch(setLoadingStateAction({ - loadingState: { - loading: false, - message: '', - } - })); - - if (data) { - const d = data as SimpleDataTable[] | null; - if (!d) return; - if (d.hasOwnProperty(EVENT_DATA_INDEX)) { - this.parseData(d[EVENT_DATA_INDEX]); - this.styleOrgChart(); - } - if (d.hasOwnProperty(SUMMARY_DATA_INDEX)) { - this.summaryDataTable = - new google.visualization.DataTable(d[SUMMARY_DATA_INDEX]); - this.summaryDataView = - new google.visualization.DataView(this.summaryDataTable); - } - if (d.hasOwnProperty(BOTTLENECK_DATA_INDEX)) { - this.bottleneckDataTable = - new google.visualization.DataTable(d[BOTTLENECK_DATA_INDEX]); - this.bottleneckDataView = - new google.visualization.DataView(this.bottleneckDataTable); - if (this.bottleneckDataTable.getTableProperty( - IS_INPUT_BOUND_TABLE_PROPERTY_NAME) === TRUE_STR) { - this.isInputBound = true; - } - this.summaryMessage = this.bottleneckDataTable.getTableProperty( - SUMMARY_MESSAGE_TABLE_PROPERTY_NAME); - } - } - }); - } - - override updateView() { - super.updateView(); - if (!this.dataView) { - return; - } - const orgChartDataView = new google.visualization.DataView(this.dataView); - orgChartDataView.setColumns([NAME_COLUMN_INDEX, PARENT_COLUMN_INDEX]); - this.orgChartDataView = orgChartDataView; - } - - ngOnDestroy() { - // Unsubscribes all pending subscriptions. - this.destroyed.next(); - this.destroyed.complete(); - } -} diff --git a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis_module.ts b/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis_module.ts deleted file mode 100644 index 665fc7bea..000000000 --- a/frontend/app/components/tf_data_bottleneck_analysis/tf_data_bottleneck_analysis_module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {MatDividerModule} from '@angular/material/divider'; -import {OrgChartModule} from 'org_xprof/frontend/app/components/chart/org_chart/org_chart_module'; -import {TableModule} from 'org_xprof/frontend/app/components/chart/table/table_module'; -import {CategoryFilterModule} from 'org_xprof/frontend/app/components/controls/category_filter/category_filter_module'; - -import {TfDataBottleneckAnalysis} from './tf_data_bottleneck_analysis'; - -/** A tf data stats module. */ -@NgModule({ - declarations: [TfDataBottleneckAnalysis], - imports: [ - CategoryFilterModule, - OrgChartModule, - TableModule, - MatDividerModule, - CommonModule, - ], - exports: [TfDataBottleneckAnalysis], -}) -export class TfDataBottleneckAnalysisModule { -} diff --git a/frontend/app/services/data_service/data_service.ts b/frontend/app/services/data_service/data_service.ts index 35e89d834..4fa615766 100644 --- a/frontend/app/services/data_service/data_service.ts +++ b/frontend/app/services/data_service/data_service.ts @@ -102,9 +102,6 @@ export class DataService { } else if (tag.startsWith('memory_profile')) { return of(mockData.DATA_PLUGIN_PROFILE_MEMORY_PROFILE_DATA) .pipe(delay(DELAY_TIME_MS)); - } else if (tag.startsWith('tf_data_bottleneck_analysis')) { - return of(mockData.DATA_PLUGIN_PROFILE_TF_DATA_BOTTLENECK_ANALYSIS_DATA) - .pipe(delay(DELAY_TIME_MS)); } else { return of([]).pipe(delay(DELAY_TIME_MS)); } diff --git a/frontend/app/services/data_service/mock_data.ts b/frontend/app/services/data_service/mock_data.ts index 2ccd292b9..d7410071d 100644 --- a/frontend/app/services/data_service/mock_data.ts +++ b/frontend/app/services/data_service/mock_data.ts @@ -1632,241 +1632,3 @@ export const DATA_PLUGIN_PROFILE_KERNEL_STATS_DATA = [ 'p': {}, }, ]; - -/** Mock data for data API with tf_data_bottleneck_analysis tag */ -export const DATA_PLUGIN_PROFILE_TF_DATA_BOTTLENECK_ANALYSIS_DATA = - [ - { - 'cols': [ - {'id': 'host', 'label': 'Host', 'type': 'string'}, - {'id': 'input_pipeline', 'label': 'Input Pipeline', 'type': 'string'}, - {'id': 'rank', 'label': 'Rank', 'type': 'number'}, - {'id': 'name', 'label': 'Name', 'type': 'string'}, - {'id': 'parent', 'label': 'Parent', 'type': 'string'}, - {'id': 'type', 'label': 'Type', 'type': 'number'} - ], - 'rows': [ - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 0}, { - 'v': '8657233632614672692', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eModel\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 4,666,862 us\u003cbr/\u003eTotal Duration: 992,837 us\u003cbr/\u003eSelf Duration: 2 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': ''}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 0}, { - 'v': '1204700340925195271', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eMap\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 4,666,863 us\u003cbr/\u003eTotal Duration: 992,835 us\u003cbr/\u003eSelf Duration: 723,709 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '8657233632614672692'}, {'v': 2} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 0}, { - 'v': '7987410324060857182', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003ePrefetch\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 4,666,865 us\u003cbr/\u003eTotal Duration: 269,126 us\u003cbr/\u003eSelf Duration: 269,126 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '1204700340925195271'}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 1}, { - 'v': '7987410324060857182', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003ePrefetch\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 733,397 us\u003cbr/\u003eTotal Duration: 4 us\u003cbr/\u003eSelf Duration: 4 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '1204700340925195271'}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 1}, { - 'v': '1204700340925195271', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eMap\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 733,392 us\u003cbr/\u003eTotal Duration: 852,132 us\u003cbr/\u003eSelf Duration: 852,127 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '8657233632614672692'}, {'v': 2} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 1}, { - 'v': '8657233632614672692', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eModel\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 733,391 us\u003cbr/\u003eTotal Duration: 852,134 us\u003cbr/\u003eSelf Duration: 2 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': ''}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 2}, { - 'v': '1204700340925195271', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eMap\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 6,940,733 us\u003cbr/\u003eTotal Duration: 833,329 us\u003cbr/\u003eSelf Duration: 833,323 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '8657233632614672692'}, {'v': 2} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 2}, { - 'v': '8657233632614672692', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eModel\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 6,940,731 us\u003cbr/\u003eTotal Duration: 833,331 us\u003cbr/\u003eSelf Duration: 2 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': ''}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 2}, { - 'v': '7987410324060857182', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003ePrefetch\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 6,940,738 us\u003cbr/\u003eTotal Duration: 5 us\u003cbr/\u003eSelf Duration: 5 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '1204700340925195271'}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 3}, { - 'v': '1204700340925195271', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eMap\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 2,458,588 us\u003cbr/\u003eTotal Duration: 798,433 us\u003cbr/\u003eSelf Duration: 798,429 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '8657233632614672692'}, {'v': 2} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 3}, { - 'v': '8657233632614672692', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eModel\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 2,458,587 us\u003cbr/\u003eTotal Duration: 798,437 us\u003cbr/\u003eSelf Duration: 3 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': ''}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 3}, { - 'v': '7987410324060857182', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003ePrefetch\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 2,458,594 us\u003cbr/\u003eTotal Duration: 4 us\u003cbr/\u003eSelf Duration: 4 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '1204700340925195271'}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 4}, { - 'v': '1204700340925195271', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eMap\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 9,857,056 us\u003cbr/\u003eTotal Duration: 139,103 us\u003cbr/\u003eSelf Duration: 139,099 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '8657233632614672692'}, {'v': 2} - ] - }, - { - 'c': - [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 4}, { - 'v': '8657233632614672692', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eModel\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 9,857,055 us\u003cbr/\u003eTotal Duration: 139,106 us\u003cbr/\u003eSelf Duration: 2 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': ''}, {'v': 1} - ] - }, - { - 'c': - [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 4}, { - 'v': '7987410324060857182', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003ePrefetch\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 9,857,061 us\u003cbr/\u003eTotal Duration: 4 us\u003cbr/\u003eSelf Duration: 4 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '1204700340925195271'}, {'v': 1} - ] - }, - { - 'c': - [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 5}, { - 'v': '1204700340925195271', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eMap\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 4,024,899 us\u003cbr/\u003eTotal Duration: 55,780 us\u003cbr/\u003eSelf Duration: 55,776 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '8657233632614672692'}, {'v': 2} - ] - }, - { - 'c': - [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 5}, { - 'v': '7987410324060857182', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003ePrefetch\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 4,024,904 us\u003cbr/\u003eTotal Duration: 4 us\u003cbr/\u003eSelf Duration: 4 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': '1204700340925195271'}, {'v': 1} - ] - }, - { - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 5}, { - 'v': '8657233632614672692', - 'f': - '\u003cdiv style\u003d\u0027padding: 1px;\u0027\u003e\u003cb\u003eModel\u003c/b\u003e\u003cbr/\u003e\u003cdiv style\u003d\u0027text-align: left;\u0027\u003eStart Time: 4,024,898 us\u003cbr/\u003eTotal Duration: 55,783 us\u003cbr/\u003eSelf Duration: 2 us\u003cbr/\u003e# Calls: 1\u003c/div\u003e\u003c/div\u003e' - }, - {'v': ''}, {'v': 1} - ] - } - ] - }, - { - 'cols': [ - {'id': 'host', 'label': 'Host', 'type': 'string'}, - {'id': 'input_pipeline', 'label': 'Input Pipeline', 'type': 'string'}, - {'id': 'min', 'label': 'Min (us)', 'type': 'number'}, - {'id': 'mean', 'label': 'Avg (us)', 'type': 'number'}, - {'id': 'max', 'label': 'Max (us)', 'type': 'number'}, - {'id': 'num_calls', 'label': '# calls', 'type': 'number'}, - {'id': 'num_slow_calls', 'label': '# slow calls', 'type': 'number'} - ], - 'rows': [{ - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 55783}, {'v': 611938}, - {'v': 992837}, {'v': 6}, {'v': 6} - ] - }] - }, - { - 'cols': [ - {'id': 'host', 'label': 'Host', 'type': 'string'}, - {'id': 'input_pipeline', 'label': 'Input Pipeline', 'type': 'string'}, - {'id': 'max_latency', 'label': 'Max Latency (us)', 'type': 'number'}, - {'id': 'bottleneck', 'label': 'Bottleneck', 'type': 'string'}, - {'id': 'suggestion', 'label': 'Suggestion', 'type': 'string'} - ], - 'rows': [{ - 'c': [ - {'v': 'oild3:25577'}, {'v': 'Host:0'}, {'v': 992837}, { - 'v': 'Map', - 'f': - '\u003cu\u003eIterator Type\u003c/u\u003e: \u003cb\u003eMap\u003c/b\u003e\u003cbr/\u003e\u003cu\u003eLong Name\u003c/u\u003e: Iterator::Model::Map' - }, - {'v': 'suggestion', 'f': 'mock suggestion'} - ] - }], - 'p': {'is_input_bound': 'true', 'summary_message': 'mock summary'} - } - ]; diff --git a/plugin/tensorboard_plugin_profile/convert/raw_to_tool_data.py b/plugin/tensorboard_plugin_profile/convert/raw_to_tool_data.py index 95d42e52a..e12867e98 100644 --- a/plugin/tensorboard_plugin_profile/convert/raw_to_tool_data.py +++ b/plugin/tensorboard_plugin_profile/convert/raw_to_tool_data.py @@ -31,7 +31,6 @@ from tensorboard_plugin_profile.convert import kernel_stats_proto_to_gviz from tensorboard_plugin_profile.convert import overview_page_proto_to_gviz from tensorboard_plugin_profile.convert import roofline_model_proto_to_gviz -from tensorboard_plugin_profile.convert import tf_data_stats_proto_to_gviz from tensorboard_plugin_profile.convert import tf_stats_proto_to_gviz from tensorboard_plugin_profile.convert import trace_events_json from tensorboard_plugin_profile.protobuf import trace_events_pb2 @@ -168,10 +167,6 @@ def xspace_to_tool_data( raw_data, success = xspace_wrapper_func(xspace_paths, tool) if success: data = raw_data - elif tool == 'tf_data_bottleneck_analysis': - raw_data, success = xspace_wrapper_func(xspace_paths, tool) - if success: - data = tf_data_stats_proto_to_gviz.to_json(raw_data) elif tool == 'op_profile': raw_data, success = xspace_wrapper_func(xspace_paths, tool) if success: diff --git a/plugin/tensorboard_plugin_profile/integration_tests/tpu/tensorflow/tpu_tf2_keras_test.py b/plugin/tensorboard_plugin_profile/integration_tests/tpu/tensorflow/tpu_tf2_keras_test.py index 41f09993e..3d6524342 100644 --- a/plugin/tensorboard_plugin_profile/integration_tests/tpu/tensorflow/tpu_tf2_keras_test.py +++ b/plugin/tensorboard_plugin_profile/integration_tests/tpu/tensorflow/tpu_tf2_keras_test.py @@ -104,7 +104,6 @@ def test_tools_are_in_list(self): 'framework_op_stats^', 'memory_profile^', 'pod_viewer^', - 'tf_data_bottleneck_analysis^', 'op_profile^', 'memory_viewer^', 'graph_viewer^', diff --git a/plugin/tensorboard_plugin_profile/profile_plugin.py b/plugin/tensorboard_plugin_profile/profile_plugin.py index befe1558a..4cffb9deb 100644 --- a/plugin/tensorboard_plugin_profile/profile_plugin.py +++ b/plugin/tensorboard_plugin_profile/profile_plugin.py @@ -91,7 +91,6 @@ 'memory_profile#': 'memory_profile.json.gz', 'xplane': 'xplane.pb', 'hlo_proto': 'hlo_proto.pb', - 'tf_data_bottleneck_analysis': 'tf_data_bottleneck_analysis.json', } ALL_HOSTS = 'ALL_HOSTS' @@ -118,7 +117,6 @@ 'kernel_stats^', 'memory_profile^', 'pod_viewer^', - 'tf_data_bottleneck_analysis^', 'op_profile^', 'hlo_stats^', 'roofline_model^', @@ -131,13 +129,12 @@ 'kernel_stats^', 'overview_page^', 'pod_viewer^', - 'tf_data_bottleneck_analysis^', 'dcn_collective_stats^', ]) # XPlane generated tools that only support all host mode. XPLANE_TOOLS_ALL_HOSTS_ONLY = frozenset( - ['overview_page^', 'pod_viewer^', 'tf_data_bottleneck_analysis^']) + ['overview_page^', 'pod_viewer^']) def use_xplane(tool: str) -> bool: diff --git a/plugin/tensorboard_plugin_profile/profile_plugin_test.py b/plugin/tensorboard_plugin_profile/profile_plugin_test.py index ca1c18242..c5eac2c05 100644 --- a/plugin/tensorboard_plugin_profile/profile_plugin_test.py +++ b/plugin/tensorboard_plugin_profile/profile_plugin_test.py @@ -222,12 +222,6 @@ def testHosts(self): # PodViewer supports all hosts only. hosts_abc_pod_viewer = self.plugin.host_impl('abc', 'pod_viewer^') self.assertListEqual(expected_all_hosts_only, hosts_abc_pod_viewer) - # tf.data Bottleneck Analysis supports all hosts only. - hosts_abc_tf_data_bottleneck_analysis = self.plugin.host_impl( - 'abc', 'tf_data_bottleneck_analysis^') - self.assertListEqual( - expected_all_hosts_only, hosts_abc_tf_data_bottleneck_analysis - ) def testData(self): generate_testdata(self.logdir)