File: ProfilerSection.proto

package info (click to toggle)
nvidia-cuda-toolkit 12.4.1-2
  • links: PTS, VCS
  • area: non-free
  • in suites: trixie
  • size: 18,505,836 kB
  • sloc: ansic: 203,477; cpp: 64,769; python: 34,699; javascript: 22,006; xml: 13,410; makefile: 3,085; sh: 2,343; perl: 352
file content (585 lines) | stat: -rw-r--r-- 20,023 bytes parent folder | download | duplicates (6)
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
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
         
syntax = "proto2";
package NV.Profiler;
import "Profiler/ProfilerMetricOptions.proto";
// =============================================================================
// COMMON
// =============================================================================
// Deprecated, this is inferred from the metric itself now
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;
    // indicates that this metric does not support being shown as a relative value on the Source page
    optional bool DisableRelativeValues = 2;
}
message ProfilerSectionMetricDisplayProperties
{
    optional SourceCorrelationDisplayProperties SourceCorrelation = 1;
    optional SourceViewDisplayProperties SourceView = 2;
}
message ProfilerSectionMetric
{
    // Metric name, as e.g. returned by metric query (e.g. gpu__time_duration.sum)
    required string Name = 1;
    // User-friendly label (e.g. 'Duration')
    optional string Label = 2;
    // Deprecated
    optional HWUnitType HWUnit = 3;
    // Show metric instance values. What instances represent depends on the specific metric.
    // See the metrics reference in the documentation for more info.
    optional bool ShowInstances = 4;
    // The metric's base unit (e.g. bytes or bytes_per_sec)
    // Normally this is inferred from the metric itself
    optional string Unit = 5;
    // Filter to control when the metric is collected
    optional Messages.MetricOptionFilter Filter = 6;
    repeated ProfilerSectionMetricOption Options = 7;
    optional ProfilerSectionMetricDisplayProperties DisplayProperties = 8;
    // List of ProfilerSectionMetricGroup names this metric belongs to.
    repeated string Groups = 9;
    optional bool DisableExtraSuffixes = 10;
    // List of counter domains that should be used for collecting this metric's counter dependencies
    repeated string CtrDomains = 11;
}
// Groups support applying properties to a set of metrics and to interact with them
// more conveniently in user interfaces.
message ProfilerSectionMetricGroup
{
    // unique name
    optional string Name = 1;
    // user-friendly label
    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;
}
// Table for showing top N instances of instruction-level source metrics.
// Multiple (compatible) metrics can be selected to aggregate them.
message ProfilerSourceMetricTable
{
    optional string Label = 1;
    optional uint32 Rows = 2;
    repeated ProfilerSectionMetric Metrics = 3;
    optional SortDirections SortDirection = 4;
    optional string Description = 5;
}
message ProfilerSuffixTable
{
    optional string Label = 1;
    required ProfilerSuffixes Suffixes = 2;
    required ProfilerBaseNames BaseNames = 3;
    optional SortKeys SortKey = 4;
    optional SortDirections SortDirection = 5;
    optional string Description = 6;
}
// =============================================================================
// 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;
}
// Deprecated in favor of ProfilerSectionMemoryL1TEXCacheTable
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;
}
// Deprecated in favor of ProfilerSectionMemoryL2CacheTable
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;
}
// L2 cache eviction policies table
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 ProfilerSectionNumaIdTable
{
    optional string Label = 1;
}
message ProfilerSectionGfxMetricsWidget
{
    required string Type = 1;
    optional string Label = 2;
    repeated ProfilerSectionMetric Metrics = 3;
}
message ProfilerSuffixes
{
    repeated ProfilerSuffix Suffix = 1;
}
message ProfilerSuffix
{
    required string Name = 1;
    optional string Label = 2;
}
message ProfilerBaseNames
{
    repeated ProfilerSectionMetric BaseName = 1;
}
enum TimelineRowType
{
    StackedBar = 0;
}
message TimelineMetricRow
{
    // Avoid using '/' in timeline labels
    optional string Label = 1;
    optional string Description = 2;
    optional TimelineRowType Type = 3;
    // Avoid using '/' in timeline labels
    repeated ProfilerSectionMetric Metrics = 4;
}
message TimelineMetricGroup
{
    // Avoid using '/' in timeline labels
    optional string Label = 1;
    optional string Description = 2;
    // Default expanded/collapsed state
    optional bool Expanded = 3;
    repeated TimelineMetricRow MetricRows = 4;
}
message ProfilerSectionTimeline
{
    optional string Label = 1;
    repeated TimelineMetricGroup MetricGroups = 2;
    // Avoid using '/' in timeline labels
    repeated ProfilerSectionMetric Metrics = 3;
}
// =============================================================================
// HEADER
// Simple table with two fixed columns
// =============================================================================
message ProfilerSectionHeader
{
    // number of rows shown in the header
    optional uint32 Rows = 1;
    // Cells are stored in row-major order
    // 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.
    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;
    optional ProfilerSuffixTable SuffixTable = 8;
    // 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;
    optional ProfilerSectionNumaIdTable NumaIdTable = 112;
    optional ProfilerSectionTimeline Timeline = 113;
    // Graphics Item Types
    optional ProfilerSectionGfxMetricsWidget GfxMetricsWidget = 150;
    optional Messages.MetricOptionFilter Filter = 200;
}
message ProfilerSectionBody
{
    repeated ProfilerSectionBodyItem Items = 1;
    optional string DisplayName = 2;
    optional bool SetDefault = 3;
}
// =============================================================================
// 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;
    optional Messages.MetricOptionFilter Filter = 3;
}
message ProfilerSectionMetricDefinitions
{
    repeated ProfilerSectionMetricDefinition MetricDefinitions = 1;
}
// =============================================================================
// SECTION SET
// =============================================================================
message ProfilerSet
{
    required string Identifier = 1;
}
// =============================================================================
// SECTION
// =============================================================================
message ProfilerSection
{
    // Unique identifier without whitespace
    required string Identifier = 1;
    // User-friendly name
    required string DisplayName = 2;
    // Order (priority) in which to show sections in the tool
    // Sections with lower values are shown first.
    optional uint32 Order = 3;
    // Definition of the header table.
    optional ProfilerSectionHeader Header = 4;
    // Body definitions.
    repeated ProfilerSectionBody Body = 5;
    // Generic list of metrics
    optional ProfilerSectionMetrics Metrics = 6;
    // User-friendly description
    optional string Description = 7;
    // The section set identifiers this section should be part of
    repeated ProfilerSet Sets = 8;
    // The identifier of another section extended by this one.
    // Extension section are not shown standalone in the UI
    // when collected alongside the one they extend.
    optional string Extends = 9;
    // Definitions of derived metrics
    optional ProfilerSectionMetricDefinitions MetricDefinitions = 10;
    // Filter applied to the entire section
    optional Messages.MetricOptionFilter Filter = 11;
    // Definitions of metic groups
    repeated ProfilerSectionMetricGroup Group = 12;
    // List of metrics to collect for the Source page
    optional ProfilerSectionMetrics SourceMetrics = 13;
}
message ProfilerSections
{
    repeated ProfilerSection Sections = 1;
}