KernelData¶
KernelData is the structure invoked by KernelMonitor.start. The definition is as follows:
class KernelData:
self.kind # Activity Record type MSPTI_ACTIVITY_KIND_KERNEL
self.start # Start timestamp of kernel execution on the NPU, in ns. If both the start and end timestamps are 0, the kernel timestamp information cannot be collected.
self.end # End timestamp of kernel execution, in ns. If both the start and end timestamps are 0, the kernel timestamp information cannot be collected.
self.device_id # Device ID of the device where the kernel is running
self.stream_id # Stream ID of the stream where the kernel is running
self.correlation_id # Unique ID generated by Runtime when launching the kernel. Other activities can be associated with the kernel using this ID.
self.type # Kernel type
self.name # Kernel name, which is consistent in the entire activity record. You are advised not to change it.