U
    d                     @   s>   d Z ddlmZmZ ddlmZ eddddddd Zd	S )
a  This file exports ONNX ops for opset 16.

Note [ONNX Operators that are added/updated in opset 16]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://github.com/onnx/onnx/blob/main/docs/Changelog.md#version-16-of-the-default-onnx-operator-set
New operators:
    GridSample https://github.com/onnx/onnx/pull/3557

Updated operators:
    Identity
    If
    LeakyRelu
    Loop
    PRelu
    RoiAlign
    Scan
    ScatterElemenets
    ScatterND
    Where
    GreaterOrEqual
    LessOrEqual
    SequenceMap
    )GRID_SAMPLE_INTERPOLATION_MODESGRID_SAMPLE_PADDING_MODES)symbolic_helpervibc                 C   sF   dd t  D | }dd t D | }| jd||t|||dS )Nc                 S   s   i | ]\}}||qS  r   .0kr   r   r   ?/tmp/pip-unpacked-wheel-ua33x9lu/torch/onnx/symbolic_opset16.py
<dictcomp>(   s      z grid_sampler.<locals>.<dictcomp>c                 S   s   i | ]\}}||qS r   r   r	   r   r   r   r   )   s      Z
GridSample)Zalign_corners_imode_spadding_mode_s)r   itemsr   opint)ginputZgridZ	mode_enumZpadding_mode_enumZalign_cornersr   r   r   r   r   grid_sampler&   s    r   N)__doc__Ztorch.nn.functionalr   r   Z
torch.onnxr   
parse_argsr   r   r   r   r   <module>   s   