torch.profiler.ProfilerOptions
export interface ProfilerOptions {
/** Which device activities to profile (default: [CPU, WEBGPU]) */
activities?: ProfilerActivity[];
/** Whether to record tensor shapes in profiling events (default: false) */
record_shapes?: boolean;
/** Whether to profile memory usage (default: false) */
profile_memory?: boolean;
/** Whether to record stack traces (default: false) */
with_stack?: boolean;
}activities(ProfilerActivity[])optional- – Which device activities to profile (default: [CPU, WEBGPU])
record_shapes(boolean)optional- – Whether to record tensor shapes in profiling events (default: false)
profile_memory(boolean)optional- – Whether to profile memory usage (default: false)
with_stack(boolean)optional- – Whether to record stack traces (default: false)
Configuration options for the Profiler.