a
    .=ic                     @   sX   d Z ddlZddlmZ ddlmZ ddlmZ dd Zejdd	 Z	G d
d dZ
dS )am  This file exports ONNX ops for opset 15.

Note [ONNX operators that are added/updated in opset 15]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://github.com/onnx/onnx/blob/master/docs/Changelog.md#version-15-of-the-default-onnx-operator-set
New operators:
    Bernoulli
    CastLike
    Optional
    OptionalGetElement
    OptionalHasElement

Updated operators:
    BatchNormalization https://github.com/onnx/onnx/pull/3545
                        Backwards compatible
                        TODO: test coverage for mixed types inputs.
    Pow                https://github.com/onnx/onnx/pull/3412
                        Backwards compatible
                        TODO: bfloat16 support.
    Shape              https://github.com/onnx/onnx/pull/3580
                        Backwards compatible
                        TODO: optional start/end attribute.
    N)_C)symbolic_helper)symbolic_opset9c                 C   sV   t |rHt| tjr2| d|}| d|S | jdtdgdS t	
| ||S )NZOptionalHasElementNotConstantr   )Zvalue_t)r   Z_is_none
isinstancetyper   OptionalTypeoptorchZ
BoolTensoropset9eq)gselfothernone r   l/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/torch/onnx/symbolic_opset15.py__is_"   s    
r   c                 C   s   t | ||S )N)r   )r   r   r   r   r   r   __isnot_,   s    r   c                   @   s   e Zd ZdZedd ZdS )PrimZprimc                 C   s    t | tjr| d|S |S )NZOptionalGetElement)r   r   r   r	   r
   )r   r   r   r   r   unchecked_cast4   s    zPrim.unchecked_castN)__name__
__module____qualname__domainstaticmethodr   r   r   r   r   r   1   s   r   )__doc__r   r   Z
torch.onnxr   r   r   r   Zwrap_logical_op_with_negationr   r   r   r   r   r   <module>   s   

