U
    q±Ëh(  ã                   @  s4   d dl mZ d dlZd dlmZ G dd„ deƒZdS )é    )ÚannotationsN)ÚOpRunc                   @  s   e Zd Zdd„ ZdS )ÚQLinearMatMulc	                 C  sœ   |  tj¡}	|d k	r$|	|  tj¡8 }	|  tj¡}
|d k	rH|
|  tj¡8 }
t |	|
¡}||| |  }|d k	rˆ||7 }t |¡  |j¡fS t |¡  |j¡fS )N)ZastypeÚnpZint32ÚmatmulZrintZdtype)ÚselfÚaZa_scaleZa_zero_pointÚbZb_scaleZb_zero_pointZy_scaleZy_zero_pointÚAÚBÚCÚD© r   úH/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_qlinear_matmul.pyÚ_run   s    zQLinearMatMul._runN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   )Ú
__future__r   Znumpyr   Zonnx.reference.op_runr   r   r   r   r   r   Ú<module>   s   