U
    ,-e                     @   sP   d dl mZmZ ddlmZ dd Ze r8eded ndd	 Zeded d
S )    )is_onnxrt_backend_supportedtorch_compile_backend   )register_backendc                   C   s   t  S )N)r    r   r   ^/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/torch/_dynamo/backends/onnxrt.pyhas_onnxruntime   s    r   Zonnxrt)nameZcompiler_fnc                  O   s   t dd S )Na^  onnxrt is not registered as a backend. Please make sure all dependencies such as numpy, onnx, onnxscript-preview, and onnxruntime-training are installed. Suggested procedure to fix dependency problem:
  (1) pip or conda install numpy onnx onnxscript-preview onnxruntime-training.
  (2) Open a new python terminal.
  (3) Call the API `torch.onnx.is_onnxrt_backend_supported()`:
  (4)   If it returns `True`, then you can use `onnxrt` backend.
  (5)   If it returns `False`, please execute the package importing section in torch/onnx/_internal/onnxruntime.py under pdb line-by-line to see which import fails.)ImportError)argskwargsr   r   r   information_displaying_backend   s    r   N)Z torch.onnx._internal.onnxruntimer   r   registryr   r   r   r   r   r   r   <module>   s   