o
    Ih                     @   s   d dl Z ddlmZmZmZmZmZmZmZm	Z	m
Z
mZmZ ddlmZmZ dgZee je je je jdZee je jdZee je je je jdZee je je je jdd	Zee je je je jdd	Zee je je jd
Zee je je jd
ZdefddZdS )    N   )_get_binary_op_configs_get_bn_configs_get_cat_config_get_conv_configs_get_default_op_configs_get_embedding_op_configs_get_fixed_qparams_op_configs_get_linear_configs_get_rnn_op_configs_get_share_qparams_op_configs_get_tensor_info_op_configs)BackendConfigDTypeConfigget_x86_backend_config)input_dtypeoutput_dtypeweight_dtype
bias_dtype)r   r   T)r   r   r   r   
is_dynamic)r   r   r   returnc            	      C   s   t g} t ttg}t g}tg}t g}tg}tg}ttg}ttg}tdt| t	|t
|t|t|t|t|t|t|t|t|S )zF
    Return the `BackendConfig` for PyTorch's native x86 backend.
    x86)!x86_weighted_op_int8_dtype_config%x86_default_dynamic_int8_dtype_config(x86_default_dynamic_float16_dtype_config"x86_default_op_quint8_dtype_config#x86_weight_only_quint8_dtype_config%x86_weight_only_quint4x2_dtype_configr   set_backend_pattern_configsr   r
   r   set_backend_pattern_configr   r   r	   r   r   r   r   r   )	conv_dtype_configslinear_dtype_configsbinary_op_dtype_configsdefault_op_dtype_configsfixed_qparams_op_dtype_configsshare_qparams_op_dtype_configstensor_info_op_dtype_configsrnn_op_dtype_configsembedding_op_dtype_configs r)   \/var/www/vscode/kcb/lib/python3.10/site-packages/torch/ao/quantization/backend_config/x86.pyr   R   sJ   






)torch_common_operator_config_utilsr   r   r   r   r   r   r	   r
   r   r   r   backend_configr   r   __all__quint8qint8floatr   r   float16 x86_default_op_fp16_dtype_configr   r   r   quint4x2r   r   r)   r)   r)   r*   <module>   s\    4
