manager.
class torch.profiler.profile(*, activities=None, schedule=None, on_trace_ready=None, record_shapes=False, profile_memory=False, with_stack=False, with_flops=False, with_modules=False, experimental_config=None, use_cuda=None)
Profiler context manager.
Parameters:
      * activities (iterable) -- list of activity groups (CPU,
        CUDA) to use in profiling, supported values:
        "torch.profiler.ProfilerActivity.CPU",
        "torch.profiler.ProfilerActivity.CUDA". Default value:
        ProfilerActivity.CPU and (when available)
        ProfilerActivity.CUDA.
  * **schedule** (*Callable*) -- callable that takes step (int) as
    a single parameter and returns "ProfilerAction" value that
    specifies the profiler action to perform at each step.

  * **on_trace_ready** (*Callable*) -- callable that is called at
    each step when "schedule" returns
    "ProfilerAction.RECORD_AND_SAVE" during the profiling.
