From 5ec1558d978f898a0492bb02fe1f5b23502e1f96 Mon Sep 17 00:00:00 2001 From: Profiler Team Date: Thu, 9 Jan 2025 12:22:55 -0800 Subject: [PATCH] Move common/constants and common/utils to xprof open source, and consolidate data table 1P/3P PiperOrigin-RevId: 713757127 --- frontend/app/common/interfaces/data_table.ts | 11 +++++++++++ frontend/app/common/utils/BUILD | 1 + 2 files changed, 12 insertions(+) diff --git a/frontend/app/common/interfaces/data_table.ts b/frontend/app/common/interfaces/data_table.ts index 3876f85ca..a09c70ab7 100644 --- a/frontend/app/common/interfaces/data_table.ts +++ b/frontend/app/common/interfaces/data_table.ts @@ -3,6 +3,7 @@ import * as memoryProfileProto from 'org_xprof/frontend/app/common/interfaces/me import * as memoryViewerPreprocess from 'org_xprof/frontend/app/common/interfaces/memory_viewer_preprocess.jsonpb_decls'; import * as opProfileProto from 'org_xprof/frontend/app/common/interfaces/op_profile.jsonpb_decls'; import * as diagnosticsProto from 'org_xprof/frontend/app/common/interfaces/diagnostics'; +import {RooflineModelData} from 'org_xprof/frontend/app/common/interfaces/roofline_model'; /** Constant of empty data in SimpleDataTable typing */ export const DEFAULT_SIMPLE_DATA_TABLE = { @@ -423,3 +424,13 @@ export declare interface InferenceProfileData extends SimpleDataTable { /** All Inference Stats page data table type. */ export type InferenceProfileTable = |InferenceProfileMetadata|InferenceProfileData; + +/* tslint:enable */ + +/** + * The internal tool's response data type + * yet to be open sourced + */ +export type XprofDataTable = + |DataTable|InferenceProfileTable[] + |RooflineModelData[]; diff --git a/frontend/app/common/utils/BUILD b/frontend/app/common/utils/BUILD index 92c4a009b..c30b59337 100644 --- a/frontend/app/common/utils/BUILD +++ b/frontend/app/common/utils/BUILD @@ -19,6 +19,7 @@ ts_library( ], deps = [ "@npm//@ngrx/store", + "@org_xprof//frontend/app/common/constants", "@org_xprof//frontend/app/common/interfaces", "@org_xprof//frontend/app/common/interfaces:chart", "@org_xprof//frontend/app/common/interfaces:op_profile_proto_defs",