KernelData

KernelData refers to the struct of the KernelMonitor.start call. The definition is as follows:

1
2
3
4
5
6
7
8
9
class KernelData:
	self.kind   # Activity record type MSPTI_ACTIVITY_KIND_KERNEL.
	self.start # Start timestamp of the kernel execution on the NPU device, in ns. If both the start and end timestamps are 0, the timestamp information of kernels cannot be profiled.
	self.end # End timestamp of the kernel execution, in ns. If both the start and end timestamps are 0, the timestamp information of kernels cannot be profiled.
	self.device_id   # ID of the device running the kernel.
	self.stream_id # Stream ID of the kernel.
	self.correlation_id   # Unique ID generated when the kernel is launched. Other activities can be correlated with the kernel based on the value.
	self.type    # Kernel type.
	self.name   # Kernel name, which must be the same in the entire activity record. You are advised not to change the name.