+
    –°³jç9  ã            
      ó,  € ^ RI Ht ^ RIt^ RIHtHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHtHtHt ^ RIHtHtHt ^ RIHt ]'       d	   ^ RIH t H!t! ]! R]"]#]$]R3,          4      t%]! R]"]#]$]R3,          ]&]']]3,          ](],          4      t) ! R R]*4      t+ ! R R]]]%])3,          4      t, ! R R],]%])3,          4      t- ! R R],]%])3,          4      t. ! R R].]%])3,          4      t/ ! R R]/]%])3,          4      t0R# )é    )ÚannotationsN)ÚABCÚabstractmethod)Úliteral_eval)Úcached_property)Úsha256)Úgetenv)ÚPath)Ú
gettempdir)ÚLock)ÚAnyÚGenericÚTYPE_CHECKINGÚTypeVar)Úassert_neverÚoverrideÚSelf)ÚFileLock)ÚFutureÚThreadPoolExecutorÚKey.ÚValuec                  ó   € ] tR t^tRtRtR# )Ú
CacheErrorzB
Exception raised for errors encountered during cache operations.
© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚV/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/_inductor/cache.pyr   r      s   † õr"   r   c                  óF   € ] tR t^$tRt]R R l4       t]R R l4       tRtR# )ÚCachez]
Abstract base class for cache implementations.
Provides the interface for cache operations.
c               ó$   € V ^8„  d   QhRRRRRR/# ©é   Úselfr   Úkeyr   ÚreturnzValue | Noner   )Úformats   "r#   Ú__annotate__ÚCache.__annotate__+   s!   € ÷ ñ �$ð ˜Sð  \ñ r"   c                ó   € R# ©zŽ
Retrieve a value from the cache.
Args:
    key (Key): The key to look up.
Returns:
    Value | None: The cached value if present, else None.
Nr   )r)   r*   s   &&r#   ÚgetÚ	Cache.get*   ó   ‚ r"   c               ó(   € V ^8„  d   QhRRRRRRRR/# ©	r(   r)   r   r*   r   Úvaluer   r+   Úboolr   )r,   s   "r#   r-   r.   5   s(   € ÷ ñ �Tð  ð ¨Eð °dñ r"   c                ó   € R# )úÔ
Insert a value into the cache.
Args:
    key (Key): The key to insert.
    value (Value): The value to associate with the key.
Returns:
    bool: True if the value was inserted, False if the key already exists.
Nr   ©r)   r*   r6   s   &&&r#   ÚinsertÚCache.insert4   r3   r"   r   N)	r   r   r   r   r    r   r1   r;   r!   r   r"   r#   r%   r%   $   s/   † ñð
 ôó ðð ôó ôr"   r%   c                  ój   € ] tR t^@tRtR R ltR R ltR R lt]R R	 l4       t	]R
 R l4       t
RtR# )ÚInMemoryCachezD
In-memory cache implementation using a dictionary and thread lock.
c               ó    € V ^8„  d   QhRRRR/# ©r(   r)   r   r+   ÚNoner   )r,   s   "r#   r-   ÚInMemoryCache.__annotate__E   s   € ÷ "ñ "�tð " ñ "r"   c                ó2   € / V n         \        4       V n        R# )z&
Initialize an empty in-memory cache.
N)Ú_cacher   Ú_lock©r)   s   &r#   Ú__init__ÚInMemoryCache.__init__E   s   € ð )+ˆŒÜ›6ˆŽ
r"   c               ó$   € V ^8„  d   QhRRRRRR/# r'   r   )r,   s   "r#   r-   rB   L   s!   € ÷ ñ �$ð ˜Sð  \ñ r"   c                óÀ   € V P                   ;_uu_ 4        V P                  P                  V4      ;pe   VuuRRR4       #  RRR4       R#   + '       g   i     R# ; ir0   )rE   rD   r1   r:   s   && r#   r1   ÚInMemoryCache.getL   s@   € ð �Z�Z‹ZØŸ™Ÿ™¨Ó-Ð-�Ò:Ø÷ ŠZð ÷ �Z�ZŠZús   •!AÁAÁA	c               ó(   € V ^8„  d   QhRRRRRRRR/# r5   r   )r,   s   "r#   r-   rB   Y   s(   € ÷ ñ �Tð  ð ¨Eð °dñ r"   c                ó¼   € V P                   ;_uu_ 4        WP                  9   d    RRR4       R# W P                  V&    RRR4       R#   + '       g   i     R# ; i)r9   NFT)rE   rD   r:   s   &&&r#   r;   ÚInMemoryCache.insertY   s>   € ð �Z�Z‹ZØ—k‘kÔ!à÷ ‰Zð  %�K‰K˜ÑØ÷ �Z�ZŠZús   •A
±A
Á
A	c               ó    € V ^8„  d   QhRRRR/# )r(   Úenv_varÚstrr+   r   r   )r,   s   "r#   r-   rB   j   s   € ÷ Kñ K 3ð K¨4ñ Kr"   c           
     ó
  € V ! 4       p\        V4      ;pf   V# VP                  R4       Fí  pVP                  4       pV'       g   K   VP                  R^4      w  rVTP                  4       TP                  4       re \        T4      p \        T4      p	 \        P                  ! T4      p
 \        P                  ! T	4      pTP                  Y«4      '       d   K°  TP                  T
4      T8w  g   KÈ  \	        RT
: RTP                  T
4      : RT: R24      h	  V#   \         d   p\	        RT: RT: R24      ThRp?ii ; i  \        \        3 d   p\	        RT: RT: R	24      ThRp?ii ; i  \        \        3 d   p\	        R
T: RT: R	24      ThRp?ii ; i  \        P                   d   p\	        RT: RT: R24      ThRp?ii ; i  \        P                   d   p\	        R
T: RT: R24      ThRp?ii ; i)a6  
Create an in-memory cache from an environment variable.
Args:
    env_var (str): Name of the environment variable containing cache data.
Returns:
    InMemoryCache: An instance populated from the environment variable.
Raises:
    CacheError: If the environment variable is malformed or contains invalid data.
NÚ;Ú,zMalformed kv_pair z from env_var z!, likely missing comma separator.zMalformed key_bytes_repr z in kv_pair z, encoding is invalid.zMalformed value_bytes_repr z, not un-pickle-able.zMultiple values for key z found, got z and Ú.)r	   ÚsplitÚstripÚ
ValueErrorr   r   ÚSyntaxErrorÚpickleÚloadsÚUnpicklingErrorr;   r1   )ÚclsrP   ÚcacheÚenv_valÚkv_pairÚkey_bytes_reprÚvalue_bytes_reprÚerrÚ	key_bytesÚvalue_bytesr*   r6   s   &&          r#   Úfrom_env_varÚInMemoryCache.from_env_vari   s@  € ñ “ˆä˜g“Ð&ˆGÒ/àˆLà—}‘} SÖ)ˆGà—m‘m“oˆGçáðà3:·=±=ÀÀaÓ3HÑ0�ð ×$Ñ$Ó&Ø ×&Ñ&Ó(ð -ð
ä(¨Ó8�	ð
ä*Ð+;Ó<�ðÜ—l’l 9Ó-�ð
ÜŸš [Ó1�ð —L‘L ×,Ô,°5·9±9¸S³>ÀUÖ3JÜ Ø.¨s©g°\À%Ç)Á)ÈCÃ.ÑASÐSXÐY^ÑXaÐabÐcóð ño *ðv ˆøôa ô Ü Ø(¨©°>À'ÁÐLmÐnóàðûðûô ¤Ð,ô Ü Ø/°Ñ/AÀÈgÉ[ÐXnÐoóàðûðûô ¤Ð,ô Ü Ø1Ð2BÑ1EÀ\ÐRYÑQ\Ð\rÐsóàðûðûô ×)Ñ)ô Ü Ø/°Ñ/AÀÈgÉ[ÐXmÐnóàðûðûô ×)Ñ)ô Ü Ø1Ð2BÑ1EÀ\ÐRYÑQ\Ð\qÐróàðûðúsx   ÁDÁ<EÂE3ÂF!Â+GÄEÄ(D=Ä=EÅE0ÅE+Å+E0Å3FÆFÆFÆ!GÆ6GÇGÇHÇ(G=Ç=Hc               ó    € V ^8„  d   QhRRRR/# )r(   Úfpathr
   r+   r   r   )r,   s   "r#   r-   rB   ¸   s   € ÷ ñ  4ð ¨Dñ r"   c                ó”  € V ! 4       pVP                  4       '       g   V#  \        VR4      ;_uu_ 4       p\        P                  ! V4      Vn        RRR4       \        TP                  \        4      '       g   \        RT R24      hT#   + '       g   i     LA; i  \        P
                   d   p\        RT R24      ThRp?ii ; i)zý
Create an in-memory cache from a file path.
Args:
    fpath (Path): Path to the file containing pickled cache data.
Returns:
    InMemoryCache: An instance populated from the file.
Raises:
    CacheError: If the file is not a valid pickled dictionary.
ÚrbNz&Failed to create cache from file path z#, file contents are un-pickle-able.z-, file contents not pickled dict[Key, Value].)	Úis_fileÚopenrZ   ÚloadrD   r\   r   Ú
isinstanceÚdict)r]   ri   r^   Úfprc   s   &&   r#   Úfrom_file_pathÚInMemoryCache.from_file_path·   s²   € ñ “ˆà�}‰}�ŠàˆLð	Ü�e˜T×"Ô" bÜ%Ÿ{š{¨2›�”÷ #ô ˜%Ÿ,™,¬×-Ò-ÜØ8¸¸Ð?lÐmóð ð ˆ÷ #×"ûä×%Ñ%ô 	ÜØ8¸¸Ð?bÐcóàðûð	ús4   ¡B µB
ÁB Â
B	ÂB ÂB ÂCÂ2CÃC)rD   rE   N)r   r   r   r   r    rG   r1   r;   Úclassmethodrf   rr   r!   r   r"   r#   r>   r>   @   sA   † ñõ"õõð  ôKó ðKðZ ôó ôr"   r>   c                  ó2   € ] tR t^ØtRtR R ltR R ltRtR# )Ú
AsyncCachez=
Asynchronous cache implementation using ThreadPoolExecutor.
c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r(   r)   r   r*   r   Úexecutorr   r+   zFuture[Value | None]r   )r,   s   "r#   r-   ÚAsyncCache.__annotate__Ý   s,   € ÷ .ñ .Øð.Øð.Ø(:ð.à	ñ.r"   c                ó:   € VP                  V P                  V4      # )zã
Retrieve a value from the cache asynchronously.
Args:
    key (Key): The key to look up.
    executor (ThreadPoolExecutor): Executor for async execution.
Returns:
    Future[Value | None]: Future for the cached value or None.
)Úsubmitr1   )r)   r*   rx   s   &&&r#   Ú	get_asyncÚAsyncCache.get_asyncÝ   s   € ð �‰˜tŸx™x¨Ó-Ð-r"   c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r(   r)   r   r*   r   r6   r   rx   r   r+   zFuture[bool]r   )r,   s   "r#   r-   ry   ê   s4   € ÷ 8ñ 8Øð8Øð8Ø%*ð8Ø6Hð8à	ñ8r"   c                ó:   € VP                  V P                  W4      # )a  
Insert a value into the cache asynchronously.
Args:
    key (Key): The key to insert.
    value (Value): The value to associate with the key.
    executor (ThreadPoolExecutor): Executor for async execution.
Returns:
    Future[bool]: Future for the result of insertion.
)r{   r;   )r)   r*   r6   rx   s   &&&&r#   Úinsert_asyncÚAsyncCache.insert_asyncê   s   € ð �‰˜tŸ{™{¨CÓ7Ð7r"   r   N)r   r   r   r   r    r|   r€   r!   r   r"   r#   rv   rv   Ø   s   † ñõ.÷8ñ 8r"   rv   c                  óª   € ] tR t^ùt$ Rt^ tR]R&   RR R llt]R R l4       t	R	 R
 lt
R R lt]R R l4       t]R R l4       t]R R l4       tRtR# )ÚOnDiskCachea#  
On-disk cache implementation using files and file locks.
Stores cache data in files on disk, with atomic operations and versioning.
Supports custom cache directory names.
Attributes:
    version (int): The version used for cache versioning.
    name (str): The name of the cache directory.
ÚintÚversionNc               ó$   € V ^8„  d   QhRRRRRR/# )r(   r)   r   Únamez
str | Noner+   rA   r   )r,   s   "r#   r-   ÚOnDiskCache.__annotate__  s!   € ÷ ,ñ ,�tð , :ð ,¸ñ ,r"   c                ó(   € T;'       g    RV n         R# )z�
Initialize an on-disk cache instance.
Args:
    name (str | None, optional): The name of the cache directory. If None,
        defaults to "on_disk_cache".
Úon_disk_cacheN©r‡   )r)   r‡   s   &&r#   rG   ÚOnDiskCache.__init__  s   € ð ×+Ð+˜OˆŽ	r"   c               ó    € V ^8„  d   QhRRRR/# ©r(   r)   r   r+   r
   r   )r,   s   "r#   r-   rˆ     s   € ÷ 8ñ 8�tð 8 ñ 8r"   c                óX   € \        \        4       4      R,          V P                  ,          # )zk
Get the base directory for the cache.
Returns:
    Path: The base directory path for storing cache files.
r^   )r
   r   r‡   rF   s   &r#   Úbase_dirÚOnDiskCache.base_dir  s   € ô ”J“LÓ! GÕ+¨d¯i©iÕ7Ð7r"   c               ó$   € V ^8„  d   QhRRRRRR/# )r(   r)   r   r*   r   r+   r
   r   )r,   s   "r#   r-   rˆ     s!   € ÷ ñ ˜dð ¨ð °ñ r"   c                óö   €  V P                   \        \        P                  ! V4      4      P	                  4       R,          ,          #   \
        \        P                  3 d   p\        RT: R24      ThRp?ii ; i)zÁ
Get the file path for a given key.
Args:
    key (Key): The key to convert to a file path.
Returns:
    Path: The file path for the key.
Raises:
    CacheError: If the key is not pickle-able.
:Né    NzFailed to get fpath for key z, key is not pickle-able.N)	r�   r   rZ   ÚdumpsÚ	hexdigestÚAttributeErrorÚPicklingErrorr   r   )r)   r*   rc   s   && r#   Ú_fpath_from_keyÚOnDiskCache._fpath_from_key  sj   € ð	Ø—=‘=¤6¬&¯,ª,°sÓ*;Ó#<×#FÑ#FÓ#HÈÕ#MÕMÐMøÜ¤× 4Ñ 4Ð5ô 	ÜØ.¨s©gÐ5NÐOóàðûð	ús   ‚AA ÁA8Á"A3Á3A8c               ó$   € V ^8„  d   QhRRRRRR/# )r(   r)   r   ri   r
   r+   r   r   )r,   s   "r#   r-   rˆ   *  s&   € ÷ Pñ P ð P¨Tð P°hñ Pr"   c                óŠ   € \        \        VP                  R,          VP                  R,          ,          4      R,           4      # )z‚
Get a file lock for a given file path.
Args:
    fpath (Path): The file path.
Returns:
    FileLock: The file lock for the path.
ÚlocksºNé   Nz.lock)r   rQ   Úparentr‡   )r)   ri   s   &&r#   Ú_flock_from_fpathÚOnDiskCache._flock_from_fpath*  s/   € ô œ˜EŸL™L¨7Õ2°U·Z±ZÀµ^ÕCÓDÀwÕNÓOÐOr"   c               ó    € V ^8„  d   QhRRRR/# )r(   r)   r   r+   Úbytesr   )r,   s   "r#   r-   rˆ   :  s   € ÷ Fñ F˜Tð F eñ Fr"   c                óŒ   € \        \        \        P                  4      P	                  4       4      P                  4       R,          # )z
Get the version prefix for the cache.
Returns:
    bytes: The version prefix as bytes, derived from the cache version string.
rž   )r   rQ   rƒ   r…   ÚencodeÚdigestrF   s   &r#   Úversion_prefixÚOnDiskCache.version_prefix9  s1   € ô ”cœ+×-Ñ-Ó.×5Ñ5Ó7Ó8×?Ñ?ÓAÀ"ÕEÐEr"   c               ó$   € V ^8„  d   QhRRRRRR/# r'   r   )r,   s   "r#   r-   rˆ   C  s!   € ÷ 'ñ '�$ð '˜Sð ' \ñ 'r"   c           	     ó”  € V P                  V4      pV P                  V4      pT;_uu_ 4        VP                  4       '       g    RRR4       R# Rp\        V P                  4      p\        VR4      ;_uu_ 4       pVP                  V4      V P                  8X  d   VP                  4       pRRR4       Vf   VP                  4         RRR4       R#  \        P                  ! V4      pTuuRRR4       #   + '       g   i     LR; i  \        P                   d   p\        RT: R24      ThRp?ii ; i  + '       g   i     R# ; i)a>  
Retrieve a value from the cache.
Args:
    key (Key): The key to look up.
Returns:
    Value | None: The cached value if present and version matches, else None.
Raises:
    CacheError: If the value is corrupted or cannot be unpickled.
Side Effects:
    Removes stale cache files if the version prefix does not match.
Nrk   zFailed to get key z?, value is potentially corrupted (value is not un-pickle-able).)r™   r¡   rl   Úlenr¨   rm   ÚreadÚunlinkrZ   r[   r\   r   )	r)   r*   ri   Úflockre   Úprefix_lengthrq   r6   rc   s	   &&       r#   r1   ÚOnDiskCache.getB  s  € ð ×$Ñ$ SÓ)ˆØ×&Ñ& uÓ-ˆçŠUØ—=‘=—?’?Ø÷ ‰Uð ˆKÜ × 3Ñ 3Ó4ˆMÜ�e˜T×"Ô" bØ—7‘7˜=Ó)¨T×-@Ñ-@Ô@Ø"$§'¡'£)�K÷ #ð Ò"ð —‘”Ø÷ ‰Uð"ÜŸš [Ó1�ð ÷1 ŠU÷ #×"ûô ×)Ñ)ô Ü Ø(¨©Ð/nÐoóàðûðú÷' �UˆUúsM   ­D6Á+D6Á:1C5	Â+D6ÃDÃ)D6Ã5DÄ D6ÄD3ÄD.Ä.D3Ä3D6Ä6E	c               ó(   € V ^8„  d   QhRRRRRRRR/# r5   r   )r,   s   "r#   r-   rˆ   m  s(   € ÷ ñ �Tð  ð ¨Eð °dñ r"   c           	     ó  € V P                  V4      pV P                  V4      pVP                  P                  RRR7        T;_uu_ 4       p\	        VR4      ;_uu_ 4       pVP                  V P                  4       \        P                  ! W&4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i  \        P                   d   p\        RT: RT: R24      ThRp?i\         d     R# i ; i)	aQ  
Insert a value into the cache.
Args:
    key (Key): The key to insert.
    value (Value): The value to associate with the key.
Returns:
    bool: True if the value was inserted, False if the key already exists.
Raises:
    CacheError: If the value is not pickle-able.
Side Effects:
    Creates the cache directory if it does not exist.
T)ÚparentsÚexist_okÚxbNzFailed to insert key z with value z, value is not pickle-able.F)r™   r¡   r    Úmkdirrm   Úwriter¨   rZ   Údumpr˜   r   ÚFileExistsError)r)   r*   r6   ri   r¯   Ú_rq   rc   s   &&&     r#   r;   ÚOnDiskCache.insertl  sÛ   € ð ×$Ñ$ SÓ)ˆØ×&Ñ& uÓ-ˆØ�‰×Ñ 4°$ÐÔ7ð	÷ ‘˜!œT %¨×.Ô.°"Ø—‘˜×,Ñ,Ô-Ü—’˜EÔ&÷ /—ñ ÷ /×.ú—–ñ ûô ×#Ñ#ô 	ÜØ'¨¡w¨l¸5¹)ÐC^Ð_óàðûô ô 	Úð	úsZ   Á
C ÁB7Á 2B$	ÂB7ÂC Â$B4Â/B7Â7C	ÃC ÃC ÃDÃ C5Ã5DÄDÄDr‹   )N)r   r   r   r   r    r…   Ú__annotations__rG   r   r�   r™   r¡   Úpropertyr¨   r   r1   r;   r!   r   r"   r#   rƒ   rƒ   ù   sv   ‡ ñð €GˆSÓ÷,ð ô8ó ð8õõ&Pð ôFó ðFð ô'ó ð'ðR ôó ôr"   rƒ   c                  óH   a € ] tR tRtRtR V 3R llt]R R l4       tRtV ;t	# )ÚInductorOnDiskCachei�  zh
Inductor-specific on-disk cache implementation.
Uses a custom base directory for Inductor cache files.
c               ó    € V ^8„  d   QhRRRR/# r@   r   )r,   s   "r#   r-   Ú InductorOnDiskCache.__annotate__“  s   € ÷ 3ñ 3�tð 3 ñ 3r"   c                ó&   <€ \         SV `  R4       R# )zk
Initialize an inductor on-disk cache instance.
Sets the cache directory name to "inductor_on_disk_cache".
Úinductor_on_disk_cacheN)ÚsuperrG   )r)   Ú	__class__s   &€r#   rG   ÚInductorOnDiskCache.__init__“  s   ø€ ô
 	‰ÑÐ1Ö2r"   c               ó    € V ^8„  d   QhRRRR/# rŽ   r   )r,   s   "r#   r-   rÂ   ›  s   € ÷ =ñ =�tð = ñ =r"   c                óF   € ^ RI Hp \        V! 4       RV P                  4      # )zu
Get the base directory for the Inductor cache.
Returns:
    Path: The base directory path for Inductor cache files.
)Údefault_cache_dirr^   )Ú%torch._inductor.runtime.runtime_utilsrÊ   r
   r‡   )r)   rÊ   s   & r#   r�   ÚInductorOnDiskCache.base_dirš  s   € õ 	LäÑ%Ó'¨°$·)±)Ó<Ð<r"   r   )
r   r   r   r   r    rG   r   r�   r!   Ú__classcell__)rÆ   s   @r#   rÀ   rÀ   �  s&   ø† ñ÷
3ð 3ð ô=ó ö=r"   rÀ   )1Ú
__future__r   rZ   Úabcr   r   Úastr   Ú	functoolsr   Úhashlibr   Úosr	   Úpathlibr
   Útempfiler   Ú	threadingr   Útypingr   r   r   r   Útyping_extensionsr   r   r   Útorch.utils._filelockr   Úconcurrent.futuresr   r   rQ   r„   Útupler   r¤   rp   Úlistr   rX   r   r%   r>   rv   rƒ   rÀ   r   r"   r#   Ú<module>rÝ      sý   ðÝ "ã ß #Ý Ý %Ý Ý Ý Ý Ý ß 7Ó 7ß :Ñ :å *÷ ß=ñ ˆe�S˜#˜u S¨# X�Ó/€Ù�˜˜c 5¨¨c¨¥?°E¸4ÀÀSÀ½>È4ÐPSÍ9ÓU€ô�ô ôˆC�˜˜e˜Õ$ô ô8U�E˜#˜u˜*Õ%ô Uôp8��s˜E�zÕ"ô 8ôBQ�*˜S %˜ZÕ(ô Qôh=˜+ c¨5 jÕ1ö =r"   