o
    I&i                     @   sD  d dl Z d dlZd dlZd dlZd dlmZmZ d dlZe e	Z
e r(dZn%ejejedkrCejejejeZn
ejejeZdedefddZdedefd	d
ZdedefddZdeddfddZdedefddZdd Zdededeeef fddZdd ZdefddZdZdZd Zd!ZdS )"    N)AnyDict Zsharedpath_componentsreturnc                  G   s   t jjtg| R  S N)ospathjointorch_parentr    r   @C:\wamp64\www\opt\env\Lib\site-packages\torch/_utils_internal.pyget_file_path      r   c                  G   s   t jj|  S r   )r   r	   r
   r   r   r   r   get_file_path_2!      r   r	   c                 C   s&   t | t jr	| S tjt j| dS )N)suffix)r   accessW_OKtempfilemkdtempr	   basenamer	   r   r   r   get_writable_path%   s   r   c                 C      d S r   r   r   r   r   r   #prepare_multiprocessing_environment+      r   c                 C   s   t j| S r   )r   r	   realpathr   r   r   r   resolve_library_path/   r   r   c                 C   s0   |t jv rt|  dt|  d| d| )Nz9: We could not find the abstract impl for this operator. zq: We could not find the abstract impl for this operator. The operator specified that you may need to import the 'z+' Python module to load the abstract impl. )sysmodulesNotImplementedError)opnamemodulecontextr   r   r   &throw_abstract_impl_not_imported_error3   s   
r&   categoryname
parametersc                 C   s   t d| || d S )Nz	%s %s: %rloginfo)r'   r(   r)   r   r   r   signpost_eventM   r   r-   c                 C   s   t d|  d S )Nz%sr*   )Zmetricsr   r   r   log_compilation_eventQ   s   r.   msgc                 C   r   r   r   )graphr/   r   r   r   print_graphU   r   r1   z	127.0.0.1i<s  TF)loggingr   r    r   typingr   r   Ztorch	getLogger__name__r+   Z_running_with_deployr   r	   r   dirname__file__strr   r   r   r   r   r&   r-   r.   r1   ZTEST_MASTER_ADDRZTEST_MASTER_PORTZUSE_GLOBAL_DEPSZUSE_RTLD_GLOBAL_WITH_LIBTORCHr   r   r   r   <module>   s2    
