
    /j                    J    d dl mZ d dlZd dlZd dlmZ  G d de          ZdS )    )annotationsN)OpRunc                      e Zd ZddZdS )BitCasttointc                   |t           j        j        k    rt          d          |j        t
          j        k    rt          d          t           j                            |          }|j        j	        t          j        |          j	        k    rHt          d|j         d|j        j	        dz   d| dt          j        |          j	        dz   d	          |
                    |          }|fS )Nz"BitCast to STRING is not supportedz$BitCast from STRING is not supportedzLBitCast requires input and output types to have the same bit-width, but got z (   z bits) and z bits))onnxTensorProtoSTRING
ValueErrordtypenpstr_helpertensor_dtype_to_np_dtypeitemsizeview)selfxr   target_dtyperesults        b/home/longshao/multi-rider-rag/.venv/lib/python3.11/site-packages/onnx/reference/ops/op_bitcast.py_runzBitCast._run   s   !(((ABBB7bgCDDD{;;B??7rx55>>>S&'gS S121AA1ES S#S S')x'='='F'JS S S   %%y    N)r   r   )__name__
__module____qualname__r    r   r   r   r      s(             r   r   )
__future__r   numpyr   r   onnx.reference.op_runr   r   r    r   r   <module>r$      st    # " " " " "      ' ' ' ' ' '    e     r   