File: ProfilerSection.proto

package info (click to toggle)
nvidia-cuda-toolkit 11.8.0-5~deb12u1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm
  • size: 18,338,396 kB
  • sloc: ansic: 172,472; cpp: 57,058; javascript: 21,597; python: 12,656; xml: 12,438; makefile: 2,949; sh: 2,056; perl: 352
file content (486 lines) | stat: -rw-r--r-- 16,323 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
         
syntax = "proto2";
package NV.Profiler;
import "Profiler/ProfilerMetricOptions.proto";
// =============================================================================
// COMMON
// =============================================================================
enum HWUnitType
{
    Invalid = 0;
    Default = 1; // Equals the executing HW unit
    Gpc = 2;
    Tpc = 3;
    Sm = 4;
    Smsp = 5;
    Tex = 6;
    Lts = 7;
    Ltc = 8;
    Fbpa = 9;
}
enum SortKeys
{
    ByLabel = 0;
    ByValue = 1;
}
enum SortDirections
{
    Ascending = 0;
    Descending = 1;
}
/*
 * Possible metric name syntax
 * (1) "<name>"
 * (2) "regex:<name regular expression>"
 * (3) "group:<group name>"
 * (4) "breakdown:[depth:]<throughput metric name>"
 */
message ProfilerSectionMetricOption
{
    required string Name = 1;
    optional string Label = 2;
    optional Messages.MetricOptionFilter Filter = 3;
}
message SourceCorrelationDisplayProperties
{
    optional bool Disabled = 1;
    optional bool DivideByCorrelatedLineCount = 2;
}
message SourceViewDisplayProperties
{
    // indicates if a metric column should be visible by default on the Source page
    optional bool DefaultVisible = 1;
}
message ProfilerSectionMetricDisplayProperties
{
    optional SourceCorrelationDisplayProperties SourceCorrelation = 1;
    optional SourceViewDisplayProperties SourceView = 2;
}
// Notes: Cells are defined empty if either the label string and/or the
//        metric string is empty. This can be used to arrange the cells in
//        a table.
message ProfilerSectionMetric
{
    required string Name = 1;
    optional string Label = 2;
    optional HWUnitType HWUnit = 3;
    optional bool ShowInstances = 4;
    // the metric's base unit (e.g. bytes or bytes_per_sec)
    optional string Unit = 5;
    optional Messages.MetricOptionFilter Filter = 6;
    repeated ProfilerSectionMetricOption Options = 7;
    optional ProfilerSectionMetricDisplayProperties DisplayProperties = 8;
    repeated string Groups = 9;
}
message ProfilerSectionMetricGroup
{
    optional string Name = 1;
    optional string Label = 2;
    optional ProfilerSectionMetricDisplayProperties DisplayProperties = 3;
}
message ProfilerSectionHighlightX
{
    repeated ProfilerSectionMetric Metrics = 1;
}
// =============================================================================
// HORIZONTAL CONTAINER
// Allows to organize multiple profiler section items in a horizontal container
// =============================================================================
message ProfilerSectionHorizontalContainer
{
    repeated ProfilerSectionBodyItem Items = 1;
}
// =============================================================================
// TABLE
// Simple table that stores any number of label/metric pairs
// =============================================================================
message ProfilerSectionTable
{
    enum LayoutOrder
    {
        RowMajor = 0;
        ColumnMajor = 1;
    }
    optional string Label = 1;
    optional uint32 Rows = 2;
    required uint32 Columns = 3;
    optional LayoutOrder Order = 4;
    // Cells are stored in row-major order
    repeated ProfilerSectionMetric Metrics = 5;
    optional SortKeys SortKey = 6;
    optional SortDirections SortDirection = 7;
    optional string Description = 8;
}
// =============================================================================
// CHARTS (Common)
// =============================================================================
message ChartColor
{
    enum ChartColorType
    {
        ChartColorTypeUnknown = 0;
        ChartColorTypeArgb = 1;
    }
    required ChartColorType ColorType = 1 [default = ChartColorTypeUnknown];
    optional uint32 ColorValue = 2;
}
message ProfilerSectionChartAxisRange
{
    optional int64 Min = 1;
    optional int64 Max = 2;
}
message ProfilerSectionChartValueAxis
{
    optional string Label = 1;
    optional ProfilerSectionChartAxisRange Range = 2;
    optional int64 TickCount = 3;
    optional int64 Size = 4;
    optional uint32 Precision = 5;
}
message ProfilerSectionChartCategoryAxis
{
    optional string Label = 1;
}
message ProfilerSectionChartHistogramAxis
{
    optional string Label = 1;
    optional int64 BinCount = 2;
}
message ProfilerSectionChartRooflineAxis
{
    optional string Label = 1;
    optional double Base = 2;
    optional double Min = 3;
    optional double Max = 4;
}
message ProfilerSectionRooflineValueCyclesPerSecondExpression
{
    // Multiple values get summed up.
    // Peak values typically use the .sum.peak_sustained suffix.
    // Achieved values typically use the .sum.per_cycle_elapsed suffix.
    repeated ProfilerSectionMetric ValuePerCycleMetrics = 1;
    // Multiplication factor to convert cycles to seconds.
    // Match the collecting unit for the above values as closely as
    // possible. Typically this resolves to something like
    // <UNIT>__cycles_elapsed.avg.per_second.
    optional ProfilerSectionMetric CyclesPerSecondMetric = 2;
}
message ProfilerSectionRooflineOptions
{
    optional string Label = 1;
    optional ChartColor Color = 2;
    optional bool ShowRooflineExtensions = 3;
    optional bool ShowRooflinePoints = 4;
}
message ProfilerSectionRooflineAchievedValueOptions
{
    optional string Label = 1;
    optional ChartColor Color = 2;
}
message ProfilerSectionRooflineWallOptions
{
    optional string Label = 1;
    optional ChartColor Color = 2;
}
message ProfilerSectionRooflineValue
{
    oneof RooflineValue
    {
        double Constant = 1;
        ProfilerSectionMetric Metric = 2;
        ProfilerSectionRooflineValueCyclesPerSecondExpression ValueCyclesPerSecondExpression = 3;
    }
}
message ProfilerSectionChartRoofline
{
    required ProfilerSectionRooflineValue PeakWork = 1;
    required ProfilerSectionRooflineValue PeakTraffic = 2;
    optional ProfilerSectionRooflineOptions Options = 3;
}
message ProfilerSectionRooflineAchievedValue
{
    required ProfilerSectionRooflineValue AchievedWork = 1;
    required ProfilerSectionRooflineValue AchievedTraffic = 2;
    optional ProfilerSectionRooflineAchievedValueOptions Options = 3;
}
message ProfilerSectionRooflineWall
{
    required ProfilerSectionRooflineValue Value = 1;
    optional ProfilerSectionRooflineWallOptions Options = 2;
}
message ProfilerSourceMetricTable
{
    optional string Label = 1;
    optional uint32 Rows = 2;
    repeated ProfilerSectionMetric Metrics = 3;
    optional SortDirections SortDirection = 4;
    optional string Description = 5;
}
// =============================================================================
// CHARTS
// =============================================================================
message ProfilerSectionChartOptions
{
    optional string AspectRatio = 1;
}
message ProfilerSectionBarChart
{
    enum Directions
    {
        Horizontal = 0;
        Vertical = 1;
    }
    enum ValueAxisAlignments
    {
        ValueAxisAlignments_Default = 0;
        ValueAxisAlignments_Alternate = 1;
        ValueAxisAlignments_Both = 2;
    }
    optional string Label = 1;
    optional Directions Direction = 2;
    optional ProfilerSectionChartCategoryAxis CategoryAxis = 3;
    optional ProfilerSectionChartValueAxis ValueAxis = 4;
    repeated ProfilerSectionMetric Metrics = 5;
    optional SortKeys SortKey = 6;
    optional SortDirections SortDirection = 7;
    optional ValueAxisAlignments ValueAxisAlignment = 8;
    optional string Description = 9;
}
message ProfilerSectionHistogramChart
{
    optional string Label = 1;
    optional ProfilerSectionChartHistogramAxis HistogramAxis = 2;
    optional ProfilerSectionChartValueAxis ValueAxis = 3;
    required ProfilerSectionMetric Metric = 4;
    optional string Description = 5;
}
message ProfilerSectionLineChart
{
    optional string Label = 1;
    optional ProfilerSectionChartValueAxis AxisX = 2;
    optional ProfilerSectionChartValueAxis AxisY = 3;
    repeated ProfilerSectionMetric Metrics = 4;
    optional ProfilerSectionHighlightX HighlightX = 5;
    optional string Description = 6;
}
// Roofline Chart:
// Shows the relation between Intensity (I) and Work (W). A single chart includes
// one achieved data point and one or more peak rooflines. The metric input is
// driven by metrics for Work (W) and Traffic (T) for both, achieved and peak
// performance. The Intensity (I) is calculated as I = W / T. The axis are
// defined to use Intensity (I) for the x dimension and Work (W) for the y
// dimension.
message ProfilerSectionRooflineChart
{
    optional string Label = 1;
    optional ProfilerSectionChartRooflineAxis AxisIntensity = 2;
    optional ProfilerSectionChartRooflineAxis AxisWork = 3;
    repeated ProfilerSectionChartRoofline Rooflines = 4;
    repeated ProfilerSectionRooflineAchievedValue AchievedValues = 5;
    repeated ProfilerSectionRooflineWall Walls = 6;
    optional string Description = 7;
    optional ProfilerSectionChartOptions Options = 8;
}
// =============================================================================
// CUSTOM TYPES
// =============================================================================
message ProfilerSectionMemorySharedTable
{
    optional string Label = 1;
    optional bool ShowLoads = 2;
    optional bool ShowStores = 3;
    optional bool ShowAtomics = 4;
    optional bool ShowTotals = 5;
}
message ProfilerSectionMemoryFirstLevelCacheTable
{
    optional string Label = 1;
    optional bool ShowLoads = 2;
    optional bool ShowStores = 3;
    optional bool ShowAtomics = 4;
    optional bool ShowReductions = 5;
    optional bool ShowGlobal = 6;
    optional bool ShowLocal = 7;
    optional bool ShowSurface = 8;
    optional bool ShowTexture = 9;
    optional bool ShowTotalLoads = 10;
    optional bool ShowTotalStores = 11;
    optional bool ShowTotals = 12;
}
message ProfilerSectionMemoryL1TEXCacheTable
{
    optional string Label = 1;
    optional bool ShowLoads = 2;
    optional bool ShowStores = 3;
    optional bool ShowAtomics = 4;
    optional bool ShowReductions = 5;
    optional bool ShowGlobal = 6;
    optional bool ShowLocal = 7;
    optional bool ShowSurface = 8;
    optional bool ShowTexture = 9;
    optional bool ShowTotalLoads = 10;
    optional bool ShowTotalStores = 11;
    optional bool ShowTotals = 12;
    optional bool ShowTotalAtomicsAndReductions = 13;
}
message ProfilerSectionMemorySecondLevelCacheTable
{
    optional string Label = 1;
    optional bool ShowLoads = 2;
    optional bool ShowStores = 3;
    optional bool ShowAtomics = 4;
    optional bool ShowReductions = 5;
    optional bool ShowGlobal = 6;
    optional bool ShowLocal = 7;
    optional bool ShowSurface = 8;
    optional bool ShowTexture = 9;
    optional bool ShowTotalLoads = 10;
    optional bool ShowTotalStores = 11;
    optional bool ShowTotals = 12;
}
message ProfilerSectionMemoryL2CacheEvictPolicyTable
{
    optional string Label = 1;
    optional bool ShowLoads = 2;
    optional bool ShowStores = 3;
    optional bool ShowAtomics = 4;
}
message ProfilerSectionMemoryL2CacheTable
{
    optional string Label = 1;
    optional bool ShowLoads = 2;
    optional bool ShowStores = 3;
    optional bool ShowAtomics = 4;
    optional bool ShowReductions = 5;
}
message ProfilerSectionMemoryDeviceMemoryTable
{
    optional string Label = 1;
    optional bool ShowLoads = 2;
    optional bool ShowStores = 3;
    optional bool ShowTotals = 4;
}
message ProfilerSectionMemoryChart
{
    optional string Label = 1;
}
message ProfilerSectionNvlinkTopology
{
    optional string Label = 1;
}
message ProfilerSectionNvlinkPropertyTable
{
    optional string Label = 1;
}
message ProfilerSectionNvlinkThroughputTable
{
    optional string Label = 1;
}
message ProfilerSectionGfxMetricsWidget
{
    required string Type = 1;
    optional string Label = 2;
    repeated ProfilerSectionMetric Metrics = 3;
}
// =============================================================================
// HEADER
// Basically a simple table for now with a fixed number of two columns
// =============================================================================
message ProfilerSectionHeader
{
    // number of rows shown in the header
    optional uint32 Rows = 1;
    // Cells are stored in row-major order
    repeated ProfilerSectionMetric Metrics = 2;
}
// =============================================================================
// BODY
// Any number of items that are shows when the section is expanded
// =============================================================================
message ProfilerSectionBodyItem
{
    // Note: Could switch to a oneof once we switch to a protobuf version that
    //       supports this.
    // Basic Item Types
    optional ProfilerSectionTable Table = 1;
    optional ProfilerSectionBarChart BarChart = 2;
    optional ProfilerSectionHistogramChart HistogramChart = 3;
    optional ProfilerSectionLineChart LineChart = 4;
    optional ProfilerSectionHorizontalContainer HorizontalContainer = 5;
    optional ProfilerSectionRooflineChart RooflineChart = 6;
    optional ProfilerSourceMetricTable SourceMetricTable = 7;
    // Custom Item Types
    optional ProfilerSectionMemorySharedTable MemorySharedTable = 101;
    optional ProfilerSectionMemoryFirstLevelCacheTable MemoryFirstLevelCacheTable = 102;
    optional ProfilerSectionMemorySecondLevelCacheTable MemorySecondLevelCacheTable = 103;
    optional ProfilerSectionMemoryDeviceMemoryTable MemoryDeviceMemoryTable = 104;
    optional ProfilerSectionMemoryChart MemoryChart = 105;
    optional ProfilerSectionMemoryL1TEXCacheTable MemoryL1TEXCacheTable = 106;
    optional ProfilerSectionMemoryL2CacheTable MemoryL2CacheTable = 107;
    optional ProfilerSectionNvlinkTopology NvlinkTopology = 108;
    optional ProfilerSectionNvlinkPropertyTable NvlinkPropertyTable = 109;
    optional ProfilerSectionNvlinkThroughputTable NvlinkThroughputTable = 110;
    optional ProfilerSectionMemoryL2CacheEvictPolicyTable MemoryL2CacheEvictPolicyTable = 111;
    // Graphics Item Types
    optional ProfilerSectionGfxMetricsWidget GfxMetricsWidget = 150;
    optional Messages.MetricOptionFilter Filter = 200;
}
message ProfilerSectionBody
{
    repeated ProfilerSectionBodyItem Items = 1;
    optional string DisplayName = 2;
}
// =============================================================================
// METRICS
// List of further metrics collected by this section
// (Note that metrics can be referenced by Header and Body, too.)
// =============================================================================
message ProfilerSectionMetrics
{
    repeated ProfilerSectionMetric Metrics = 1;
    optional uint32 Order = 2;
}
// =============================================================================
// METRIC DEFINITIONS
// Metric definitions describe new metrics composed of existing ones
// =============================================================================
message ProfilerSectionMetricDefinition
{
    required string Name = 1;
    // expression of the form <metricA> <op> <metricB> where <op> is one of +,-,*,/
    // and <metricA> and <metricB> are metric names
    required string Expression = 2;
}
message ProfilerSectionMetricDefinitions
{
    repeated ProfilerSectionMetricDefinition MetricDefinitions = 1;
}
// =============================================================================
// SECTION SET
// =============================================================================
message ProfilerSet
{
    required string Identifier = 1;
}
// =============================================================================
// SECTION
// =============================================================================
message ProfilerSection
{
    required string Identifier = 1;
    required string DisplayName = 2;
    optional uint32 Order = 3;
    optional ProfilerSectionHeader Header = 4;
    repeated ProfilerSectionBody Body = 5;
    optional ProfilerSectionMetrics Metrics = 6;
    optional string Description = 7;
    repeated ProfilerSet Sets = 8;
    optional string Extends = 9;
    optional ProfilerSectionMetricDefinitions MetricDefinitions = 10;
    optional Messages.MetricOptionFilter Filter = 11;
    repeated ProfilerSectionMetricGroup Group = 12;
}
message ProfilerSections
{
    repeated ProfilerSection Sections = 1;
}