
    
9j                    f    S SK Jr  S SKrS SKJr  S SKJr  S SK	J
r
  \R                  S 5       rS rg)    )annotationsN)runtime)	benchmark)
time_rangec               #     #    [         R                  " 5          Sv   [         R                  " 5         g! [         R                  " 5         f = f7f)aR  Enable CUDA profiling during with statement.

This function enables profiling on entering a with statement, and disables
profiling on leaving the statement.

>>> with cupyx.profiler.profile():
...    # do something you want to measure
...    pass

.. note::
    When starting ``nvprof`` from the command line, manually setting
    ``--profile-from-start off`` may be required for the desired behavior.
    Likewise, when using ``nsys profile`` setting ``-c cudaProfilerApi``
    may be required.

.. seealso:: :func:`cupy.cuda.runtime.profilerStart`,
    :func:`cupy.cuda.runtime.profilerStop`
N)_runtimeprofilerStartprofilerStop     Q/home/wildlama/miniconda3/lib/python3.13/site-packages/cupyx/profiler/__init__.pyprofiler   	   s3     (  s   A3 AA

Ac                2    SSK Jn  U R                  U5        g)ztLoad the %gpu_timeit magic.

This function is called when the extension is loaded via:
    %load_ext cupyx.profiler
r   )GPUTimeitMagicsN)cupyx.profiler._timeit_magicr   register_magics)ipythonr   s     r   load_ipython_extensionr   $   s     =O,r   )
__future__r   
contextlib_contextlib	cupy.cudar   r   cupyx.profiler._timer   cupyx.profiler._time_ranger   contextmanagerr   r   r   r   r   <module>r      s3    "   ) * 1    4-r   