o
    ,i4                     @   s   d Z ddlmZmZ ddlmZmZ ddlZG dd deZej	dej
dejd	ejd
ejdejdejdejdejdejdejdejdejdiZdededejfddZdejdeeee f defddZdejdedefddZdS )a  
This file contains canonical definitions for our symbol naming conventions,
across torch.fx.experimental.symbolic_shapes and torch._inductor.  The
intention is:

1. To make it easily greppable where all the sites we use a prefix are
2. Make it possible to easily tell if we can introduce a new prefix without
   introducing a conflict

You can occasionally test if prefixes have been hardcoded by renaming prefixes
in this file and seeing what breaks.
    )autoEnum)SequenceUnionNc                   @   sZ   e Zd Ze Ze Ze Ze Ze Ze Z	e Z
e Ze Ze Ze Ze Ze ZdS )SymTN)__name__
__module____qualname__r   SIZEFLOATUNBACKED_INTUNBACKED_FLOATTMPINDIRECTPRECOMPUTED_SIZEINDEXRINDEXTEMPLATE_INDEXXBLOCKYBLOCKVIEW r   r   W/home/ubuntu/SoloSpeech/.venv/lib/python3.10/site-packages/torch/utils/_sympy/symbol.pyr      s    
r   suzfzuftmppsiridxxyindirectviewprefixreturnc                 K   s   t jt|   | fi |S N)sympySymbol
prefix_str)r&   r!   kwargsr   r   r   make_symbolL   s   r-   symc                 C   sD   t | tjsJ t |tr| jt| S | jtdd |D S )Nc                 s   s    | ]}t | V  qd S r(   )r+   ).0pr   r   r   	<genexpr>X   s    z!symbol_is_type.<locals>.<genexpr>)
isinstancer)   r*   r   name
startswithr+   tuple)r.   r&   r   r   r   symbol_is_typeS   s   
r6   ec                    s   t  fdd| jD S )Nc                 3   s    | ]}t | V  qd S r(   )r6   )r/   vr&   r   r   r1   \   s    z&free_symbol_is_type.<locals>.<genexpr>)anyfree_symbols)r7   r&   r   r9   r   free_symbol_is_type[   s   r<   )__doc__enumr   r   typingr   r   r)   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r+   intr*   r-   Basicboolr6   Exprr<   r   r   r   r   <module>   s,   $$