o
    Zh                     @   sR   d dl mZmZ ddlmZ dd Ze reded d
S 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   L/var/www/auris/lib/python3.10/site-packages/torch/_dynamo/backends/onnxrt.pyhas_onnxruntime   s   r   Zonnxrt)nameZcompiler_fnc                  O   s   t d)NaN  onnxrt is not registered as a backend. Please make sure all dependencies such as numpy, onnx, onnxscript, and onnxruntime-training are installed. Suggested procedure to fix dependency problem:
  (1) pip or conda install numpy onnx onnxscript 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   