# profile Source: https://www.tensorplay.cn/docs/generated/tensorplay.profiler.profile.html ```python class tensorplay.profiler.profile(enabled=True, *, activities=None, schedule=None, on_trace_ready=None, record_shapes=False, profile_memory=False, with_stack=False, with_flops=False, with_modules=False, use_device=None, gpu_timing=None, gpu_trace=None, with_samples=False) ``` Context manager that records dispatched operations and annotations. ```python device_kernels(sort_by=None) ``` What the device ran, by the name the device knows it by. ```python property device_time_by_span ``` For each collected span, the device time of the work inside it. The per-span answer, for a caller that has a span and wants what it cost on the device rather than what it cost to ask for. ```python kineto_results() ``` The device’s own record of what it did, in a form meant to be read. Named for what it is rather than for how it was collected: a caller wants the device’s work, wants to know which piece of it belongs to which operation, and wants the two joined by something exact. What the collector gathered is exactly that, so it is handed over as records that answer those questions, and the join is already made rather than left to the caller to reconstruct. ```python step() ``` Advance the configured step schedule.