
    Ph                       d dl mZ d dlZd dlmZmZ d dlZd dlmZmZ  ej                  e
      Zej                  j                  ddf	 	 	 	 	 d!dZd"dZ edd	 d
ej                   j"                  f      Z edd dej                   j"                  f      Z edd d      Z edd d      Z edd d      Z eded      Z edd d      Z edd#dd       Zy)$    )annotationsN)OptionalSequence)_primsTensor c                D    fd}t        j                  | ||||      S )Nc                 :    t        j                   | i |      S N)r   
TensorMeta)argskwargs	impl_atens     iC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\torch/_inductor/inductor_prims.pymetazmake_prim.<locals>.meta   s      D!;F!;<<    )schemareturn_typer   r   doctags)r   
_make_prim)r   r   r   r   r   r   s    `    r   	make_primr      s/    =  r   c                    | j                         |k(  r| S | j                         j                  | j                  |      }|j	                  |        |S r   )strideclone
as_stridedshapecopy_)input_tensorr   
new_tensors      r   eager_force_strider!       sT    &##%00J \"r   z&inductor_seed(Device device) -> Tensorc                2    t        j                  dg |       S Nl    devicetorchrandintr$   s    r   <lambda>r)   .   s    5==Bv>r   z=create a fresh seed (one per call) for use with inductor_rand)r   r   z2inductor_seeds(int count, Device device) -> Tensorc                4    t        j                  d| g|      S r#   r&   )countr%   s     r   r)   r)   4   s    %--	E76Jr   z/Horizontal fusion of many inductor_seed() callsz7inductor_lookup_seed(Tensor seeds, int index) -> Tensorc                    | |   S r    )seedsindexs     r   r)   r)   ;   s    ur   z9Extract a single seed from the result of inductor_seeds())r   z?inductor_random(SymInt[] size, Tensor seed, str mode) -> Tensorc                F     t        t        |      | |j                        S Nr$   )getattrr'   r%   )sizeseedmodes      r   r)   r)   @   s    1WUD1$t{{Kr   zGtorch.rand()/torch.randn() using backend-specific RNG that can be fusedzOinductor_randint(SymInt low, SymInt high, SymInt[] size, Tensor seed) -> Tensorc                H    t        j                  | |||j                        S r1   )r'   r(   r%   )lowhighr3   r4   s       r   r)   r)   E   s    %--T4"Tr   z<torch.randint() using backend-specific RNG that can be fusedzDinductor_force_stride_order(Tensor input, SymInt[] stride) -> TensorznForce the stride order for input tensor. No-op if the input tensor already has the stride. Do a copy otherwiseziinductor_masked_scatter_with_index(Tensor input, Tensor mask, Tensor source_idx, Tensor source) -> Tensorc                0    t        j                  | ||      S r   )r'   masked_scatter)r   maskr/   sources       r   r)   r)   O   s    e.B.BdF/r   z'masked_scatter with precomputed indiceszj_unsafe_index_put_(Tensor(a!) self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor(a!)c                Z    t         j                  j                  j                  | |||      S r   )r'   opsaten
index_put_)selfindicesvalues
accumulates       r   r)   r)   V   s     EIINN4M4Mgvz5r   z0Unsafe index_put_ (doesn't issue device asserts))r   strr   rE   r   zOptional[Sequence[torch.Tag]])r   r   returnr   )F)
__future__r   loggingtypingr   r   r'   r   r   	getLogger__name__logRETURN_TYPENEWr   r!   Tagnondeterministic_seededr4   r.   lookup_seedrandomr(   force_stride_ordermasked_scatter_with_index_unsafe_index_put_r-   r   r   <module>rV      s6   "  %   g! ""&&*. 
	
 (( ,>G
))
+
+	-	 	8J9
))
+
+	-		 =%C	 
EKQ

 UTF
 Jx 
 &o 	2  p 	; r   