
    ȅi                     \    S SK r SSKJrJr  / SQr/ SQrS rS r\ R                  S 5       r	g)	    N   )check_errorcudart)startstopprofile)gpustarttimestampgpuendtimestamp
gridsize3dthreadblocksizestreamidzenableonstart 0conckerneltracec                  F    [        [        5       R                  5       5        g)zxStarts cuda profiler data collection.

.. warning::
    Raises CudaError in case of it is unable to start the profiler.
N)r   r   cudaProfilerStart     M/home/james-whalen/.local/lib/python3.13/site-packages/torch/cuda/profiler.pyr   r      s     **,-r   c                  F    [        [        5       R                  5       5        g)zvStops cuda profiler data collection.

.. warning::
    Raises CudaError in case of it is unable to stop the profiler.
N)r   r   cudaProfilerStopr   r   r   r   r      s     ))+,r   c               #   \   #     [        5         Sv   [        5         g! [        5         f = f7f)aq  
Enable profiling.

Context Manager to enabling profile collection by the active profiling tool from CUDA backend.
Example:
    >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_CUDA)
    >>> import torch
    >>> model = torch.nn.Linear(20, 30).cuda()
    >>> inputs = torch.randn(128, 20).cuda()
    >>> with torch.cuda.profiler.profile() as prof:
    ...     model(inputs)
N)r   r   r   r   r   r   r   &   s     s   , ,),)

contextlib r   r   __all__DEFAULT_FLAGSr   r   contextmanagerr   r   r   r   <module>r      s=     ! '.-  r   