
    sh                     .    S SK r S rS rSr " S S5      rg)    Nc                  6    [         R                  R                  $ )z1Return whether PyTorch is built with MKL support.)torch_Chas_mkl     o/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/torch/backends/mkl/__init__.pyis_availabler
      s    88r      c                   *    \ rS rSrSrS rS rS rSrg)verbose   a  
On-demand oneMKL verbosing functionality.

To make it easier to debug performance issues, oneMKL can dump verbose
messages containing execution information like duration while executing
the kernel. The verbosing functionality can be invoked via an environment
variable named `MKL_VERBOSE`. However, this methodology dumps messages in
all steps. Those are a large amount of verbose messages. Moreover, for
investigating the performance issues, generally taking verbose messages
for one single iteration is enough. This on-demand verbosing functionality
makes it possible to control scope for verbose message dumping. In the
following example, verbose messages will be dumped out for the second
inference only.

.. highlight:: python
.. code-block:: python

    import torch
    model(data)
    with torch.backends.mkl.verbose(torch.backends.mkl.VERBOSE_ON):
        model(data)

Args:
    level: Verbose level
        - ``VERBOSE_OFF``: Disable verbosing
        - ``VERBOSE_ON``:  Enable verbosing
c                     Xl         g )Nenable)selfr   s     r	   __init__verbose.__init__+   s    r   c                     U R                   [        :X  a  g [        R                  R                  R                  U R                   5      nU(       d   S5       eU $ )NzSFailed to set MKL into verbose mode. Please consider to disable this verbose scope.)r   VERBOSE_OFFr   r   _verbosemkl_set_verbose)r   sts     r	   	__enter__verbose.__enter__.   sI    ;;+%XX..t{{;	a`	ar   c                 ^    [         R                  R                  R                  [        5        g)NF)r   r   r   r   r   )r   exc_typeexc_valexc_tbs       r	   __exit__verbose.__exit__7   s    ))+6r   r   N)	__name__
__module____qualname____firstlineno____doc__r   r   r    __static_attributes__r   r   r	   r   r      s    8r   r   )r   r
   r   
VERBOSE_ONr   r   r   r	   <module>r)      s#    
 
+ +r   