a
    hv                     @   sB  d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddlZddlZddlmZ ddlmZ ddlmZmZmZmZ ddlZddlmZ ddlZddlmZ ddlmZ ddlm Z  dd	l!m"Z" dd
l#m$Z$m%Z% ddl&m'Z' ddlm(Z(m)Z) e*e+Z,edZ-edZ.e./ Z0e0rLddl1Z2g Z3dZ4e0rg dZ3e2j5j6j78 9ddZ:d;dd e3D Z4g dZ<G dd dZ=dd Z>dZ?G dd dZ@ejAdd  ZBd!d"d#d$ZCd!d"d%d&ZDd'd( ZEd)d* ZFG d+d, d,eGZHd-d. ZIdRd/d0ZJdSd!d!d1d2d3ZKd4d5 ZLd6d7 ZMd8d9 ZNdTd!d!d1d:d;ZOed< d=d<d>d?d@ZPe-eee- ge-f dAdBdCZQeQejRZSeQeTdDZUeQdZVeQd!ZWeQd!ZXG dEdF dFZYG dGdH dHZZG dIdJ dJZ[dUee\e ge\e f e]ee^e]e_f  ee_ e^e]ef dLdMdNZ`e]ee-ge-f dOdPdQZadS )Va  
Debug utilities for TorchDynamo compilation and execution.

This module provides various debugging tools and utilities for TorchDynamo, including:

- Minification support for reducing test cases while preserving bugs
- Input/output handling via InputReader and InputWriter for reproducible testing
- Accuracy checking between original and compiled models
- Neural network module string conversion via NNModuleToString
- Profiling tools and system information collection
- Buck build system integration for Meta-internal testing

Key classes:
- InputReader/InputWriter: Handle serialization of model inputs/outputs
- NNModuleToString: Converts nn.Modules to string representations
- BuckTargetWriter: Manages Buck build system integration
    N)Counter)import_module)AnyCallableOptionalTypeVar)Tensor)rand_strided)is_float_dtype)StorageWeakRef)ContentStoreReaderContentStoreWriter   )config)clone_inputsget_debug_dirTztorch._inductor.config )z1//caffe2/torch/fb/sparsenn:sparsenn_operators_gpuz-//caffe2/torch/fb/sparsenn:sparsenn_operatorsz///deeplearning/fbgemm/fbgemm_gpu:sparse_ops_cpuz+//deeplearning/fbgemm/fbgemm_gpu:sparse_opszfbcode://
c                 C   s   g | ]}d | dqS )ztorch.ops.load_library("z") .0xr   r   G/var/www/auris/lib/python3.9/site-packages/torch/_dynamo/debug_utils.py
<listcomp>K       r   )Zbuck2runz@mode/dev-nosanc                   @   s&   e Zd Zdd Zdd Zd	ddZdS )
BuckTargetWriterc                 C   s   t jt j|\| _| _| jdd| _| jdd d| j | _| j| jdd  | _| jdd  | _| j}||dd  dd  }d| d	| j | _	d S )
Nz.pyr   /.zfbcode.   zfbcode/r   :)
ospathsplitabspathsubdirpy_filereplacetargetfindcmd_line_path)selffilenametmpr   r   r   __init__R   s    zBuckTargetWriter.__init__c                 C   sD   d dd tD }td| j d| j dt d| d| j d	S )
Nr   c                 S   s   g | ]}d | dqS )z	        "z",r   r   r   r   r   r   a   r   z*BuckTargetWriter.build.<locals>.<listcomp>za
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")

python_binary(
    name="z",
    srcs = ["z"],
    compile = False,
    deps = [
        "//caffe2:torch",
        "//caffe2:libtorch",
        "//caffe2/functorch:functorch",
        "//triton:triton",
        "z",
    ],
    cpp_deps = [
z
    ],
    main_module = "z",
    par_style = "xar",
)
)join
extra_depstextwrapdedentr*   r(   
cur_targetr$   )r-   Zextra_cpp_depsr   r   r   build`   s    zBuckTargetWriter.buildTc                 C   sn   t j| jd}t|d}||   W d    n1 s>0    Y  t| jg }|rjt	
dd| |S )NZTARGETSwzFFound an example that reproduces the error. Run this cmd to repro - %s )r#   r$   r1   r'   openwriter6   BUCK_CMD_PREFIXr,   logwarning)r-   Z	print_msgZtarget_filefdZ	cmd_splitr   r   r   r:   z   s    ,zBuckTargetWriter.writeN)T)__name__
__module____qualname__r0   r6   r:   r   r   r   r   r   Q   s   r   c                  C   sL   t jt d} | d u r.t  dt  } t j| sHt j	| dd | S )NZminifierz
/minifier_T)exist_ok)
r#   r$   r1   r   tempfile
gettempdirgetpassgetuserexistsmakedirs)r$   r   r   r   minifier_dir   s    rI      c                   @   s   e Zd Zejjejjejjejjejj	ejj
ejjejjejjejjejjejjejjejjejjejjejjejjejjejjejjgZedd Zedd ZdS )NNModuleToStringc                 C   sL   t  }|  D ] \}}t|tjvr|| qt|dkrHtd| dS )Nr   z-We have not tested reprs of some modules - %sT)	setnamed_childrentyperK   
safe_reprsaddlenr<   r=   )gmZcant_convert_moduler   r   r   can_convert_to_string   s    z&NNModuleToString.can_convert_to_stringc                 C   s  ddl m} d}td}|  D ]V\}}|  }t| d }|d urZ|jrZ| d}||d  d| d| d	7 }q"| j	
 D ]\}}	|	d u rq|	 tkrdd
lm}
 |
jtksJ t|	}n@t|	rdt|	j d|	j d}ndt|	j d|	j d}|	jr| d}||d  d| d| d7 }q| j
 D ]d\}}|d u rXqBd}|jrhd}dt|j d|j | d}||d  d| d| d	7 }qB||| jd d	7 }|S )Nr   )
_addindent    z
            from torch.nn import *
            class Repro(torch.nn.Module):
                def __init__(self) -> None:
                    super().__init__()
            z.cuda()   zself.z = r   )
PRINT_OPTSztorch.randn(z, dtype=)ztorch.randint(1, size=zself.register_buffer('z', z)
r   z, device="cuda"ztorch.nn.Parameter(torch.randn(z))rJ   )Ztorch.nn.modules.modulerV   r3   r4   rM   __repr__next
parametersZis_cuda_buffersitemsZnumelMAX_CONSTANT_NUMEL_INLINEZtorch._tensor_strrY   	thresholdreprtorchis_floating_pointlistshapedtype_parameterscode)rR   rV   tab	model_strmodule_namerT   Z
module_strZexample_paramZbuffer_namebufferrY   Z
tensor_str
param_nameparammaybe_devicer   r   r   convert   sJ    	

 



"	zNNModuleToString.convertN)r?   r@   rA   rc   nnZLinearZConv1dZConv2dZConv3dZBatchNorm1dZBatchNorm2dZBatchNorm3dZ	LayerNormZDropoutZSoftmaxZReLUZGELUZIdentityZ	MaxPool2dZ	EmbeddingZTanhZConvTranspose1dZGLUZLSTMZFlattenZAdaptiveAvgPool2drO   staticmethodrU   rq   r   r   r   r   rK      s4   
rK   c               	   C   s   t j sdS d} zBtddg}| d}ddd |D }| | d7 } W n  ttj	fyt   | d	7 } Y n0 t
d
d tt j D }| d7 } | D ]\}}| d| d| d7 } q| d7 } | S )Nz:# torch.cuda.is_available()==False, no GPU info collected
z# CUDA Info: 
Znvccz	--versionr   r   c                 S   s    g | ]}|d vrd| dqS ))r   #  
r   )r   sr   r   r   r     r   z-_cuda_system_info_comment.<locals>.<listcomp>z# nvcc not found
c                 s   s   | ]}t j|V  qd S N)rc   cudaZget_device_name)r   ir   r   r   	<genexpr>  s   z,_cuda_system_info_comment.<locals>.<genexpr>z# GPU Hardware Info: 
rt   z : ru   )rc   rx   Zis_available
subprocesscheck_outputdecoder%   r1   FileNotFoundErrorCalledProcessErrorr   rangeZdevice_countr_   )rk   Zcuda_version_outZcuda_version_linescommentZ	gpu_namesnamecountr   r   r   _cuda_system_info_comment   s$    
r   F)stable_outputc                    sT   | rdS g d g d fddfddt j D }d|}d	| d
S )zl
    Generate a string configuration for environment variables related to Dynamo, Inductor, and Triton.
    z+# env var omitted due to stable_output=True)ZTORCHZDYNAMOZINDUCTORZTRITON)ZTRITON_LIBDEVICE_PATHZTRITON_PTXAS_PATHZTRITON_LIBCUDA_PATHc                    s   t  fddD o vS )Nc                 3   s   | ]}| v V  qd S rw   r   )r   stringkeyr   r   rz     r   z;generate_env_vars_string.<locals>.filter.<locals>.<genexpr>)anyr   )
allow_list	skip_listr   r   filter  s    z(generate_env_vars_string.<locals>.filterc                    s*   g | ]"\}} |rd | d| dqS )zos.environ['z'] = ''r   r   r   value)r   r   r   r      s   z,generate_env_vars_string.<locals>.<listcomp>r   z
import os
z
    )r#   environr_   r1   )r   Zconfig_linesZconfig_stringr   )r   r   r   r   generate_env_vars_string  s    

r   c              	   C   s\   dd l }dd l}| rdS |jjj }d|jj  d|jj  d|j	j  d| d	S )Nr   z*# config omitted due to stable_output=Truez~import torch._dynamo.config
import torch._inductor.config
import torch._functorch.config
import torch.fx.experimental._config
r   )
Ztorch._functorch.configZtorch._inductor.configZfxZexperimental_configZcodegen_config_dynamor   Z	_inductorZ
_functorch)r   rc   Zexperimental_configr   r   r   generate_config_string,  s    


r   c                   C   s   t jt dS )Nzminifier_launcher.py)r#   r$   r1   rI   r   r   r   r   get_minifier_repro_path@  s    r   c              
   C   s   t  }td| tr"t|  z8t|d}||  W d    n1 sN0    Y  W n8 ty } z td t	d|W Y d }~n
d }~0 0 d S )NzWriting minified repro to:
%sr7   r   z(Could not write to {minified_repro_path})
r   r<   r=   use_buckr   r:   r9   OSError	exceptionNotImplementedError)contentsZminified_repro_pathr>   er   r   r   helper_for_dump_minifyD  s    ,
r   c                   @   s   e Zd ZdS )AccuracyErrorN)r?   r@   rA   r   r   r   r   r   S  s   r   c                 C   sB   t | }tt| D ](}t|| tjr|| | | j q|S )z
    This clone inputs is different from utils clone_input. In case of minifier,
    all the tensors are leaf tensors while creating a new graph. So, we set the
    requires_grad field w/o checking the leafness of the tensor.
    )r   r   rQ   
isinstancerc   r   Zrequires_grad_requires_grad)example_inputsZcloned_inputsidxr   r   r   clone_inputs_retaining_gradnessW  s
    r   c           	      C   s   ddl m}m}m} t| } |s*t|}t| dr>| d t	| ddrR| |n| | }|rb|S ||rz||}|
  || |d|S )z
    Runs a forward and possibly backward iteration for a given mod and args.

    When disable_clone is True, we will use args as-is without cloning.
    This is higher fidelity but we may destroy the args in the process.
    r   )collect_resultsreduce_to_scalar_lossrequires_bwd_pass	zero_gradTZ_boxed_callFN)Ztestingr   r   r   copydeepcopyr   hasattrr   getattrZbackward)	rR   argsonly_fwdZdisable_cloner   r   r   outZlossr   r   r   run_fwd_maybe_bwdd  s    


r   require_fp64ignore_non_fpc                C   s   ddl m} t| ||}d}tjrtz(tt| t|\}	}
t|	|
|}W n( t	yr   |rdt
dtd Y n0 zt|||}W n t	y   td Y dS 0 ||||tjd|d}|S )	aa  
    Check two models have same accuracy.

    require_fp64: if True, raise an error if we unable to calculate the fp64 reference
    ignore_non_fp: if True, do not compare outputs which are not floating point.  This
        is mostly useful for the minifier (which wants to avoid quantizing floating point
        error into integer/boolean error)
    r   )sameNzfCould not generate fp64 outputs, workaround with torch._dynamo.config.same_two_models_use_fp64 = FalsezCould not generate fp64 outputszWhile minifying the program in accuracy minification mode, ran into a runtime exception which is likely an unrelated issue. Skipping this graph.T)ZtolZ	equal_nanr   )utilsr   r   r   Zsame_two_models_use_fp64cast_to_fp64r   r   r   	ExceptionRuntimeErrorr<   r=   r   Zrepro_tolerance)rR   Zopt_gmr   r   r   r   r   refZfp64_refZ
fp64_modelZfp64_examplesresZpassingr   r   r   same_two_models  s>    r   c                 C   s   | j jD ]}|jdkrj|jtjjjjkrjt	|j
dks:J t|j
d rj|j
d tjkrj|j
d tjf|_
|jdkr|jd}|d urt|rt|j}tj|d< ||_q| j   |   | S )Ncall_functionrX   r   r   rg   )graphnodesopr*   rc   opsZprimsZconvert_element_typedefaultrQ   r   r
   float64kwargsgetdictZlintZ	recompile)modelnoderg   Z
new_kwargsr   r   r   cast_dtype_args_to_fp64  s"    



r   c                    sB   ddl m} | } tjkr(t|}| fdd|}||fS )Nr   )tree_mapc                    s"   t | tjr|  r|  S | S rw   )r   rc   r   rd   tor   rg   r   r   <lambda>  s
    
zcast_to.<locals>.<lambda>)Ztorch.utils._pytreer   r   rc   r   r   )rg   r   inputsr   r   r   r   cast_to  s    


r   c                 C   s   t tj| |S rw   )r   rc   r   )r   r   r   r   r   r     s    r   c                C   sP   z,|t | t|}t| |||||d W S  tyJ   td Y dS 0 d S )Nr   zWhile minifying the program in accuracy minification mode, ran into a runtime exception which is likely an unrelated issue. Skipping this graphF)r   r   r   r   r   r<   r   )rR   r   Zcompiler_fnr   r   r   Zcompiled_gmr   r   r   backend_accuracy_fails  s"    	
r   ztorch._prims_common.StrideTypeztorch._prims_common.ShapeType)striderf   returnc                C   s   | d ur| S t |S rw   )r   Zmake_contiguous_strides_for)r   rf   r   r   r   _stride_or_default  s    r   )dr   c                    s    fddS )Nc                    s   | d ur| S  S rw   r   r   r   r   r   r     r   z_mk_defaulter.<locals>.<lambda>r   r   r   r   r   _mk_defaulter  s    r   cpuc                   @   s:   e Zd ZddddZdddddZdd	 Zd
d ZdS )NopInputReaderNr   c                 C   s
   d| _ d S )Nr   total)r-   r   r   r   r0   !  s    zNopInputReader.__init__device
dtype_hintc                C   s   |  j d7  _ d S )Nr   r   )r-   storage_hashnbytesr   r   r   r   r   storage$  s    zNopInputReader.storagec                 O   s   d S rw   r   r-   r   r   r   r   r   tensor'  s    zNopInputReader.tensorc                 O   s   d S rw   r   r   r   r   r   symint*  s    zNopInputReader.symintr?   r@   rA   r0   r   r   r   r   r   r   r   r      s   r   c                   @   sJ   e Zd ZdddddZdddddZddddddd	d
Zdd ZdS )InputReaderN)pbarc                C   s8   |d u rt d |d ur"t|nd | _g | _|| _d S )Nz0no save_dir specified, will generate random data)r<   r=   r   storer   r   )r-   save_dirr   r   r   r   r0   1  s
    
zInputReader.__init__r   c                C   s   | j d ur| j d t|}t|}| jd urz|d urzz| j|}W n tyZ   Y n 0 ||jkrvt	d||j |S t	d| ||j
 f}td |d}t|||| S )Nr   zdevice mismatch: %s != %sz1could not load %s, generating random data insteadrf   )r   update_device_or_default_dtype_or_defaultr   Zread_storager~   r   r<   r=   itemsizer   r	   untyped_storage)r-   r   r   r   r   r   rf   r   r   r   r   r   <  s     

zInputReader.storage)storage_offsetrg   r   is_leafc          
      K   s   t ||d}t|}t|}t|}t|}tjg ||j|d}	t   |		|||| W d    n1 sn0    Y  |st
  |	jtjd}	W d    n1 s0    Y  t   |		|||| W d    n1 s0    Y  tjj|	|ksJ tj|	| | j|	 |	S )Nr   )rg   r   r   )Zmemory_format)r   _storage_offset_or_defaultr   _is_leaf_or_default_requires_grad_or_defaultrc   r   r   Zno_gradset_Zenable_gradcloneZpreserve_format_subclasses
meta_utilssafe_is_leaf_utilsZset_tensor_metadatar   append)
r-   r   rf   r   r   rg   r   r   metadatatr   r   r   r   R  s&    

.
,
.zInputReader.tensorc                 C   s   | j | |S rw   )r   r   )r-   valr   r   r   r   s  s    zInputReader.symint)N)Nr   r   r   r   r   r   0  s    !r   c                   @   sj   e Zd ZddddZdd Zddded	d
dZdd	ddZdd Zdd	ddZ	dd	ddZ
dS )InputWriterFstable_hashc                C   s:   g | _ t | _|| _|d ur*t||dnd | _i | _d S )Nr   )_lines	itertoolsr   storage_counterr   r   r   seen_storages)r-   r   r   r   r   r   r0     s    
zInputWriter.__init__c                 C   s*   dg}| dd | jD  |d |S )Nzdef load_args(reader):c                 s   s   | ]}d | V  qdS )rW   Nr   )r   lr   r   r   rz     r   z$InputWriter.lines.<locals>.<genexpr>zload_args._version = 0)extendr   r   )r-   rr   r   r   lines  s
    
zInputWriter.linesNr   device_hintr   c             
   C   s   t |}| j|}|d ur |S dt| j }d}td t|krNd|}d}|j}|jdkrr|d usnJ |}td |krd|}|	 }	d }
| j
d ur|jjdkr| j
|}
| j| d|
d|	| | d || j|< |S )	Nbufr   z, dtype_hint=metaz	, device=z = reader.storage(, rZ   )r   r  r   r\   r  r   r   rN   r   r   r   Zwrite_storager   r   )r-   r   r   r	  wsvZmaybe_dtype_hintrp   r   r   r   r   r   r   r     s0    



zInputWriter.storagec           	   	   C   sP  ddl m}m} | j| |j|jd}g }||td |jd|	 s^|
tt|	  td |jkr~|
d|j |td | ks|
d|  tj|}|r|dd | D  td |jkr|
d	|j tjj|}td |kr|
d
| | j
dd|tt|jg| d|   d S )Nr   )statically_known_truesym_eqr  r   zdtype=zstorage_offset=c                 s   s    | ]\}}| d |V  qdS )=Nr   )r   kr  r   r   r   rz     r   z%InputWriter.tensor.<locals>.<genexpr>zrequires_grad=zis_leaf=zreader.tensor(r  )  # )Z%torch.fx.experimental.symbolic_shapesr  r  r   r   rg   r   r   rf   r   r   strtupler   r   r   rc   r   Zget_tensor_metadatar  r_   r   r   r   r   r   r   r   r1   )	r-   r   r   r  r  r   r   Ztensor_metadatar   r   r   r   r     s<    zInputWriter.tensorc                 C   s   | j d| dt|  t|ttfr| j d t|D ]\\}}| d| d}t|tjrp| 	|| q>t|t
tjfr| || q>| || q>| j d d S )Nrt   z# was unsupported type for dumping: z"""[])r   r   rN   r   re   r  	enumeraterc   r   r   intSymIntr   unsupported)r-   r   argry   aZname_ir   r   r   r    s    zInputWriter.unsupportedc                 C   s   | j d|d| d d S )Nzreader.const(r  z!, filtered out during compilation)r   r   )r-   r   r   r   r   const  s    zInputWriter.constc                 C   s0   t |tjr|jj}| jd|d|  d S )Nzreader.symint(r  )r   rc   r  r   hintr   r   )r-   r   r   r   r   r   r     s    zInputWriter.symint)r?   r@   rA   r0   r  r  r   r   r  r  r   r   r   r   r   r     s    r   rx   )funcr   
sym_shapesdefault_sym_shaper   c                    s  ddl m} dd | D }d| }t| }d| d}d| d	}	d
}
G dd d}i }pji  fddtdfdd}| j}| D ]t\}}|dkrqt	
|	|}|r| \}}t|d}|| }|||||< t	
|
|}|r|d||< qdt| jv r~| }||d< t	||D ]>}| \}}}}t|d}|| }t||||| q>|S )a  
    Takes in a function which has been printed with print_readable() and constructs kwargs to run it.

    Handles Tensor inputs, Symints, and a graph module which might have tensor constants.

    Consider a function `forward` defined as follows:

    def forward(self, primals_1: "f32[1001, 6]", primals_2: "f32[s0]", primals_3: "Sym(s0)",):
        _tensor_constant0: "i64[4190]" = self._tensor_constant0
        # Further implementation

    kwargs = aot_graph_input_parser(forward)
    forward(**kwargs)
    r   )dtype_abbrsc                 S   s   i | ]\}}||qS r   r   r   r   r   r   
<dictcomp>  r   z*aot_graph_input_parser.<locals>.<dictcomp>|z(_tensor_constant\d+): \"(z0)\[\s*(.*?)\s*\]\" = self\.(_tensor_constant\d+)(z)\[\s*(.*?)\s*\]zSym\((s\d+)\)c                   @   s   e Zd ZdZdS )z/aot_graph_input_parser.<locals>.TensorContainerz#Container for tensors as attributesN)r?   r@   rA   __doc__r   r   r   r   TensorContainer  s   r(  c                    s,   t  v pd u fdd  S )Nc                      s
     dS )Nz; not in symbolic_shapes and default sym shape not passed inr   r   r   r   r   r   '  r   z=aot_graph_input_parser.<locals>.get_sym_int.<locals>.<lambda>)rc   _checkr   r)  )r"  r!  r)  r   get_sym_int$  s
    
z+aot_graph_input_parser.<locals>.get_sym_intr   c           
         s   g }g }t | D ]H\}}| }d|v rF|}|| || q|r|t| q|jrftjntj}||| d}|D ]}	tj	||	 q~|S )Nrv   )rg   r   )
r  stripr   r  rd   rc   Zrandnzerosr   Zmark_dynamic)
rf   rg   Zresolved_shapeZdynamic_dimsry   Zdimrv   constructorr   r   )r   r+  r   r   
gen_tensor+  s    
z*aot_graph_input_parser.<locals>.gen_tensorr   ,r   r-   )Ztorch.utils._dtype_abbrsr#  r_   r1   valuesinspect	getsourcer   __annotations__researchgroupsr  r%   group	signaturer]   finditersetattr)r   r   r!  r"  r#  Z	dtype_mapZdtype_patternsourceZtensor_assignment_regexZtensor_regexZsym_shape_regexr(  r   r/  annotationsro   
annotationmatchZ	data_typeZ	shape_strrf   rg   	container	attr_namerS   r   )r"  r   r+  r!  r   aot_graph_input_parser  sD    
rB  )r.   r   c                    sD   t  tjtj  fdd} fdd}t| |S )z
    Decorator to cProfile a given function and save the result to disk on process exit.

    Args:
        filename: filename to save profile to
    c                    s   t   fdd}|S )Nc                     s0      z | i |W   S   0 d S rw   )enabledisable)r   r   )fnprofr   r   wrapperh  s    z3profile_to_file.<locals>.decorator.<locals>.wrapper)	functoolswraps)rE  rG  )rF  )rE  r   	decoratorg  s    z"profile_to_file.<locals>.decoratorc                	      s.      tjtd  d  d d S )Nz!                Wrote profile to z+, view with:

                    snakeviz z

                )Z
dump_statssysstderrr:   r3   r4   r   r.   rF  r   r   save_itr  s    
z profile_to_file.<locals>.save_it)cProfileZProfiler#   r$   r&   
expanduseratexitregister)r.   rJ  rN  r   rM  r   profile_to_file]  s    
rS  )FF)F)F)rx   NN)br'  rQ  r   rO  rH  rE   r2  r  loggingr#   r5  r{   rK  rC   r3   collectionsr   	importlibr   typingr   r   r   r   rc   Ztorch._prims_commonZ_prims_commonr   Ztorch._subclasses.meta_utilsr   Ztorch._dynamo.testingr	   r
   Z torch.multiprocessing.reductionsr   Ztorch.utils._content_storer   r   r   r   r   r   	getLoggerr?   r<   r   Zinductor_configZ	is_fbcoder   Zlibfb.py.build_infoZlibfbr2   Zextra_importspyZ
build_infoZ	BuildInfoZget_build_ruler)   r5   r1   r;   r   rI   r`   rK   cacher   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   float32r   r   r   r   r   r   r   r   r   re   r  r   r  rB  rS  r   r   r   r   <module>   s   
7	f

 : *
Tx   
c