torch.autograd.ProfilerOptions
export interface ProfilerOptions {
/** Enable CUDA profiling (no-op in WebGPU) */
use_cuda?: boolean;
/** Record shapes of tensors */
record_shapes?: boolean;
/** Profile memory usage */
profile_memory?: boolean;
/** Enable stack tracing */
with_stack?: boolean;
}use_cuda(boolean)optional- – Enable CUDA profiling (no-op in WebGPU)
record_shapes(boolean)optional- – Record shapes of tensors
profile_memory(boolean)optional- – Profile memory usage
with_stack(boolean)optional- – Enable stack tracing
Autograd profiler module.
Provides profiling utilities for autograd operations. In WebGPU, profiling is handled differently than in CUDA/CPU PyTorch.