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
|
syntax = "proto2";
package NV.Profiler.Messages;
import "CpuStacktrace/CpuStacktrace.proto";
import "Nvtx/Nvtx.proto";
import "Profiler/ProfilerResultsCommon.proto";
import "Profiler/ProfilerStringTable.proto";
import "ProfilerReport/ProfilerReportCommon.proto";
import "ProfilerSection/ProfilerSection.proto";
import "RuleSystem/RuleResults.proto";
// enable arenas for better allocation performance
option cc_enable_arenas = true;
message DeviceProperty
{
required string Key = 1;
required string Value = 2;
}
message DeviceProperties
{
repeated DeviceProperty Properties = 1;
}
message DeviceAttribute
{
required string Name = 1;
required ProfileMetricValue Value = 2;
}
message DeviceAttributes
{
required uint32 ID = 1;
optional string Name = 2;
repeated DeviceAttribute Attributes = 3;
}
// has to match with SystemInfo.proto!
enum PlatformType
{
Unknown = 0;
Windows = 1;
Linux = 2;
Android = 3;
OSX = 4;
QNX = 5;
Hos = 6;
Integrity = 7;
LinuxPPC = 8;
}
enum IPAddressType
{
IPV4 = 1;
IPV6 = 2;
}
message IPAddress
{
required string Address = 1;
optional IPAddressType Type = 2;
}
message SystemInfo
{
optional string OSName = 1;
optional string Build = 2;
optional string Processor = 3;
optional string Architecture = 4;
optional string ComputerName = 5;
optional PlatformType Platform = 6;
repeated IPAddress IPAddresses = 7;
}
message VersionInfo
{
required string Provider = 1;
required string Version = 2;
}
message FilterOptions
{
optional string KernelName = 1;
optional string KernelNameBase = 2;
optional string KernelId = 3;
optional uint32 SkipCount = 4;
optional uint32 SkipBeforeMatchCount = 5;
optional uint32 CaptureCount = 6;
}
message SamplingOptions
{
optional bool IntervalAuto = 1;
optional uint64 Interval = 2;
optional uint64 MaxPasses = 3;
optional uint64 BufferSize = 4;
}
message OtherOptions
{
optional bool ApplyRules = 1;
optional string Metrics = 2;
}
message ProfilerSettings
{
optional bool EnableNvtx = 1;
optional bool DisableProfilingStartStop = 2;
optional bool EnableProfilingFromStart = 3;
optional string ActivityType = 4;
optional FilterOptions FilterOptions = 5;
optional OtherOptions OtherOptions = 6;
optional string EnabledSections = 7;
optional string ClockControlMode = 8;
optional SamplingOptions SamplingOptions = 9;
optional bool ImportSource = 10;
optional string ReplayMode = 11;
optional bool EnableCpuStack = 12;
}
message ReportSessionDetails
{
optional uint32 ProcessID = 1;
// Represented as a Unix time since Jan 1 1970
optional uint64 CreationTime = 2;
optional SystemInfo HostSystemInfo = 3;
optional SystemInfo TargetSystemInfo = 4;
optional DeviceProperties DeviceProperties = 5;
repeated DeviceAttributes DeviceAttributes = 6;
// User can modify these to give themselves some hints about the report.
optional string Comments = 7;
repeated VersionInfo VersionInfo = 8;
optional ExecutableSettings ExecutableSettings = 9;
optional ProfilerSettings ProfilerSettings = 10;
optional string ProfilerCmdline = 11;
}
message CommentID
{
required string SectionID = 1;
// In the future, this could also include something like:
// optional string TableID = 2;
// optional uint32 TableRow = 3;
// optional uint32 TableCol = 4;
}
message Comment
{
required CommentID ID = 1;
required string DisplayName = 2;
required string Text = 3;
}
message ProfileSeriesInfoMessage
{
required uint32 SeriesID = 1;
// Is set iff the current result is not the result for the default settings
optional string CombinationStr = 2;
}
message ProfilerClockStatusMessage
{
required bool RequestedLock = 1;
required bool ExecutedLocked = 2;
}
// The client will need access to the metrics via a map. It does not need all of them.
// The fastest lookup would be id : value map.
message ProfileResult
{
required uint32 ThreadID = 1;
required uint64 APICallID = 2;
required uint64 ProgramHandle = 3;
required uint64 KernelID = 4;
required string KernelMangledName = 5;
required string KernelFunctionName = 6;
required string KernelDemangledName = 7;
required uint32 WorkDimensions = 8;
// x,y,z descriptions
// work offset
required Uint64x3 GlobalWorkOffset = 9;
// CUDA grid dims
required Uint64x3 GridSize = 10;
// CUDA block dims
required Uint64x3 BlockSize = 11;
optional string Comments = 12;
repeated ProfileMetricResult MetricResults = 13;
// Represented as a Unix time since Jan 1 1970
optional uint64 CreationTime = 14;
required SourceData Source = 15;
// This field is only set to optional in order to be backwards compatible with
// older report files. Maybe we can switch that once we rename file name endings.
optional APIType Api = 16;
// Note: Optional for now; will become required once everything is in place
// Hint: Stored here so that any report can be opened with any version of the tool, independent
// of the actual configured template for data collection. I assume this is very common that
// old reports would have different sections than newer reports. Same is true if multiple
// people share their reports.
repeated NV.Profiler.ProfilerSection Sections = 17;
repeated Comment SectionComments = 18;
// Note: Optional for now, similar to Sections
repeated NV.RuleSystem.RuleResult RuleResults = 19;
// set to true if the target was not (fully) supported
optional bool UnsupportedDevice = 20;
optional NV.Nvtx.NvtxState Nvtx = 21;
// the CUDA context ID of the kernel
optional uint32 ContextID = 22;
// the CUDA stream ID of the kernel
optional uint32 StreamID = 23;
optional ProfileSeriesInfoMessage SeriesInfo = 24;
optional ProfilerClockStatusMessage ClockStatus = 25;
// the CUDA context's NVTX name
optional string ContextName = 26;
// the CUDA stream's NVTX name
optional string StreamName = 27;
// the stack frames of the host/cpu code for this CUDA launch
optional NV.CpuStacktrace.CpuStacktraceStackMessage CpuStack = 28;
}
message RangeResult
{
// thread and api call ID of the start marker
required uint32 ThreadID = 1;
required uint64 APICallID = 2;
optional string Comments = 3;
repeated ProfileMetricResult MetricResults = 4;
// Represented as a Unix time since Jan 1 1970
optional uint64 CreationTime = 5;
optional APIType Api = 6;
repeated NV.Profiler.ProfilerSection Sections = 7;
repeated Comment SectionComments = 8;
// set to true if the target was not (fully) supported
optional bool UnsupportedDevice = 9;
optional NV.Nvtx.NvtxState Nvtx = 10;
// the CUDA context ID of the kernel
optional uint32 ContextID = 11;
optional ProfilerClockStatusMessage ClockStatus = 12;
// the CUDA context's NVTX name
optional string ContextName = 13;
// the stack frames of the host/cpu code for this range (start marker)
optional NV.CpuStacktrace.CpuStacktraceStackMessage CpuStack = 14;
// store source data references. A range can have more than one associated SourceData.
repeated uint64 References = 15;
}
message ProcessInfo
{
required uint32 ProcessID = 1;
optional string Hostname = 2;
optional string ProcessName = 3;
}
message BlockHeader
{
// The data for the following two fields is encoded sequentially after this header.
// They are not *in* the header, since a large protobuf would error out. (100000 results or so)
// Contains the number of profile sources in this block.
// Payload is of type NV.Profiler.SourceData
optional uint32 NumSources = 1;
// Contains the number of profile results in this block.
// Payload is of type NV.Profiler.Messages.ProfileResult
optional uint32 NumResults = 2;
optional ReportSessionDetails SessionDetails = 3;
// The master string table to resolve strings stored as IDs
optional ProfilerStringTable StringTable = 4;
// Size of the following payload block in bytes
optional uint32 PayloadSize = 5;
// Process this block is associated with
// If not present, the block is considered to be associated
// with the default process, identified by ReportSessionDetails
optional ProcessInfo Process = 6;
// Contains the number of range results in this block.
// Payload is of type NV.Profiler.Messages.RangeResult
optional uint32 NumRangeResults = 7;
}
message FileHeader
{
required uint32 Version = 1;
}
message BaselineColor
{
enum BaselineColorType
{
BaselineColorTypeUnknown = 0;
BaselineColorTypeArgb = 1;
}
required BaselineColorType ColorType = 1 [default = BaselineColorTypeUnknown];
optional uint32 ColorValue = 2;
}
message ExtendedBaselineData
{
optional bool IsVisible = 1;
optional BaselineColor Color = 2;
optional string Name = 3;
optional string KernelName = 4;
optional string ProcessName = 5;
optional string ReportMoniker = 6;
}
message BaselinePersistenceData
{
repeated ProfileResult BaselineResults = 1;
repeated ProfilerStringTable StringTables = 2;
repeated ExtendedBaselineData ExtendedBaselineData = 3;
}
|