U
    •Ê¹j+  ã                   @   s¢   d Z ddlZddlZddlmZmZ ddlmZm	Z	 ej
e	jdd�ZdZedƒdejd	œd
d„ƒZedƒdejd	œdd„ƒZeD ]Zede› �ƒe e¡ƒ q€dS )a'  
Note [ONNX operators that are added/updated from opset 7 to opset 8]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New operators:
  Expand

Updated operators:
  Min, Max, Sum, Mean: supports multidirectional broadcasting.
  MaxPool: added optional indices output.
  Scan
é    N)Úsymbolic_helperÚsymbolic_opset9)Ú	jit_utilsÚregistrationé   )Zopset)
ÚscanÚexpandZ	expand_asZmeshgridZadaptive_max_pool1dZadaptive_max_pool2dZadaptive_max_pool3dZmax_pool1d_with_indicesZmax_pool2d_with_indicesZmax_pool3d_with_indicesz	aten::max)Úgc                 C   s*   |d kr|d k	rt  d¡ t | |||¡S )NzœMultidirectional broadcasting is not supported in opset 7. This might cause the onnx model to be incorrect, if inputs to max operators have different shapes)ÚwarningsÚwarnÚopset9Úmax©r	   ÚselfZdim_or_yZkeepdim© r   úY/var/www/html/bwave/python/venv/lib/python3.8/site-packages/torch/onnx/symbolic_opset7.pyr   '   s
    ÿr   z	aten::minc                 C   s*   |d kr|d k	rt  d¡ t | |||¡S )NzœMultidirectional broadcasting is not supported in opset 7. This might cause the onnx model to be incorrect, if inputs to min operators have different shapes)r
   r   r   Úminr   r   r   r   r   3   s
    ÿr   zaten::)NN)NN)Ú__doc__Ú	functoolsr
   Z
torch.onnxr   r   r   Ztorch.onnx._internalr   r   ÚpartialZonnx_symbolicZ_onnx_symbolicZblock_listed_operatorsZGraphContextr   r   Zblock_listed_opZ_block_list_in_opsetr   r   r   r   Ú<module>   s   ÿ