+
    &j,                       a  R t40 t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ 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.t ! R R]4      tR tR R lt]! RR7       ! R R]P<                  P>                  4      4       t R t!R t"]PF                  PH                  PJ                  PL                  ]PF                  PH                  PN                  PL                  ]PF                  PH                  PP                  PL                  ]PF                  PH                  PR                  PT                  ]PF                  PH                  PV                  PL                  ]PF                  PH                  PX                  PZ                  ]PF                  PH                  P\                  PL                  ]PF                  PH                  P^                  PL                  /t0] ^ k R R lt1R R lt2]! RR7      R 4       t3R# )    N)defaultdict)Callable)Enum)Any)
FakeTensorFakeTensorModeNode)compatibility)StorageWeakRef)_pytree)tree_map_only	reinplacec                   "    ] tR t^t^ t^t^tRtR# )	_ViewType N)__name__
__module____qualname____firstlineno__NonViewSingleOutputViewMultiOutputView__static_attributes__r       q/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/fx/passes/reinplace.pyr   r      s    GOr   r   c                 >   V e   \        V \        P                  P                  4      '       dm   V P                  p\        VP                  4      ^ 8  dE   VP                  ^ ,          pVP                  R J;'       d    VP                  P                  '       * # R # R # R # N)	
isinstancetorch_ops
OpOverload_schemalen	arguments
alias_infois_writetgtschema	first_args   &  r   _is_view_opr,      s    
:c5::+@+@AAv 1$((+I $$D0VV9M9M9V9V5V % Br   c                $    V ^8  d   QhR\         /# )   return)r   )formats   "r   __annotate__r1   &   s      9 r   c                    V e   \        V \        P                  P                  4      '       d   V P                  p\        VP                  4      ^ 8  dy   VP                  ^ ,          pVP                  eX   VP                  P                  '       g<   RVP                  P                  9   d   \        P                  # \        P                  # \        P                  # )N*)r   r    r!   r"   r#   r$   r%   r&   r'   	after_setr   r   r   r   r(   s   &  r   _get_view_typer5   &   s    
:c5::+@+@AAv 1$((+I##/	8L8L8U8U8U)..888$444$555r   F)is_backward_compatiblec                   J   a a ] tR t^>t oV3R lV 3R lltV 3R ltRtVtV ;t# )_FunctionalizationMetadataPropc                    < V ^8  d   QhRS[ /# )r.   noder	   )r0   __classdict__s   "r   r1   +_FunctionalizationMetadataProp.__annotate__@   s     ; ;T ;r   c                  < V ;P                   ^,          un         \        S	V `	  V4      pW!P                  R&   V P                   VP                  R&   VP                  pVP
                  \        P                  P                  P                  P                  J d
   VR,          pVP                  R8X  Ed]   \        VP
                  4      pV\        P                  8X  dq   \        VP                  ^ ,          \         4      '       g)   \#        R\%        VP                  ^ ,          4       24      hVP                  ^ ,          VP                  R&   MV\        P&                  8X  d"   VP                  ^ ,          V P(                  V&   MVP
                  \*        P,                  J do   VP                  ^ ,          pV P(                  P/                  VR4      pVe<   \        V\         4      '       g   \#        R\%        V4       24      hWaP                  R&   RVP                  9   d   \        VP                  R,          \0        4      '       g   \#        R4      h\        VP                  R,          P                  R,          \0        4      '       g   \#        R	4      h\3        VP                  R,          P5                  4       4      p\3        VP                  R,          P                  R,          P5                  4       4      pWx8w  d   \#        R
4      hV# )   fake_resultnode_idxr>   NNcall_functionzExpected Node, got view_ofNz"Expected FakeTensor in fake_resultz*Expected FakeTensor in view_of fake_resultzview_storage != base_storage)node_countersuperrun_nodemetaargstargetr    opsatencopy_defaultopr5   r   r   r   r
   AssertionErrortyper   multi_output_view_nodes	_operatorgetitemgetr   r   _typed_storage)
selfr:   result	node_args	view_typelist_argmaybe_base_of_viewview_storagebase_storage	__class__s
   &&       r   rF   '_FunctionalizationMetadataProp.run_node@   sL   Q!$'#)		-  $ 1 1		*
 II	;;%))....666!"I 77o%&t{{3II666!$))A,55(+>tDIIaL?Q>R)STT'+yy|		)$i77759YYq\,,T2 	 1 1199Q<%)%A%A%E%EhPT%U"%1 &&8$??,1$7I2J1KL  ,>IIi(		! dii6
CC$%IJJdii	277F
SS$%QRR)$))M*B*Q*Q*STL)		)$))-8GGIL +$%CDDr   c           	     ,  < / V n         RV n        \        4       ;_uu_ 4       pV Uu. uF6  p\        V\        P
                  4      '       d   VP                  V4      MTNK8  	  pp\        SV `   ! V!  uuRRR4       # u upi   + '       g   i     R# ; i)r>   N)	rQ   rD   r   r   r    Tensorfrom_tensorrE   run)rV   rH   modea	fake_argsr^   s   &*   r   	propagate(_FunctionalizationMetadataProp.propagate}   s    ')$SWSWaz!U\\'B'B  #ISW   7;	*	  s   B<A=#B=BB	)rQ   rD   )	r   r   r   r   rF   rh   r   __classdictcell____classcell__)r^   r;   s   @@r   r8   r8   >   s     ; ;z+ +r   r8   c                 Z   VP                   P                  R 4      ;'       d    VP                   RR	 V P                   8H  p\        V P                  4      \        VP                  4      8H  ;'       dq    \        ;QJ d:    R \        V P                  VP                  4       4       F  '       d   K   RM/	  RM+! R \        V P                  VP                  4       4       4      pVP                  ^ ,          P                  e.   VP                  ^ ,          P                  P                  '       g   \        R4      h\        ;QJ d-    R VP                  R,           4       F  '       d   K   RM"	  RM! R VP                  R,           4       4      '       g   \        R4      hT;'       d    T# )
_Nc              3   X   "   T F   w  rVP                   VP                   8H  x  K"  	  R # 5ir   )rP   ).0a1a2s   &  r   	<genexpr>!_schemas_match.<locals>.<genexpr>   s&      PFB 	277Ps   (*FTz,First argument of inplace op must be mutablec              3   <   "   T F  qP                   R J x  K  	  R # 5ir   )r&   )ro   rf   s   & r   rr   rs      s     J-I||t#-Is   rA   z5Remaining arguments of inplace op must not be mutablera   )	nameendswithr$   r%   allzipr&   r'   rO   )functional_schemainplace_schemanames_matcharg_types_matchs   &&  r   _schemas_matchr}      s[   $$S) 	? 	?$(9(>(>>  +556#  ;   
# +55~7O7OP### +55~7O7OP   	  #..:$$Q'22;;;KLL3J^-E-Eb-IJ333J^-E-Eb-IJJJTUU**?*r   c                    \        V \        P                  P                  4      '       g   R # \	        V 4      '       d   R # V P
                  P                  R4      R,          pV P                  P                  p\        \        P                  V4      pVf   R M\        W2 R2R 4      pVf   R # VP                  4        Uu. uF  p\        WE4      NK  	  ppV Uu. uF-  p\        V P                  VP                  4      '       g   K+  VNK/  	  pp\        V4      ^ 8X  d   R # \        V4      ^8w  d   \        R\        V4       24      hV^ ,          p	V	# u upi u upi )N.rm   z2Expected exactly 1 matching inplace overload, got ra   )r   r    r!   r"   r,   r   splitoverloadpacketr   getattrrJ   	overloadsr}   r#   r$   rO   )
rN   op_namespaceop_base_namemaybe_namespace_modulemaybe_inplace_opoverload_nameinplace_overloadsf'inplace_overloads_with_matching_schemas
inplace_ops
   &         r   _maybe_get_inplace_opr      sU   b%**//00 2==&&s+B/L$$--L$UYY= ") 	+~Q-?F 
  .7799M 	 09  
 %/$arzz199(M$ , / 23q8
23q8@:;<>
 	
 9;J'/s   ?E(EEc                F    V ^8  d   QhR\         \        ,          R\        /# )r.   tensor_aliasesop_index)setr
   int)r0   s   "r   r1   r1      s      s4y C r   c                    R  p\        4       pV  F  pVP                  pV F  pRVP                  9  g   VP                  R,          V8:  d   K.  W`9   dU   \        VP                  \
        P                  P                  4      '       g   VP                  \        P                  J d   K  VP                  V4       K  	  K  	  V# )c                     \        V \        4      '       d+   VP                  \        V P	                  4       4      4       R # R # r   )r   r   addr   rU   )xset_s   &&r   _add_if_tensor2_get_all_later_node_usages.<locals>._add_if_tensor   s.    a$$HH^A$4$4$678 %r   r@   )r   usersrG   r   rI   r    r!   r"   rR   rS   r   )r   r   r   nodes_used_aftertusage_nodesns   &&     r   _get_all_later_node_usagesr      s    9 uggA'166*+=+I "qxx)>)>??xx9#4#44  #  " r   c                ~    V ^8  d   QhR\         \        ,          R\         \        ,          R\         \        ,          /# )r.   later_node_usagesself_aliasesr/   )r   r
   )r0   s   "r   r1   r1      s0     : :4y:03D	:Y:r   c                    R  p\        4       p\        V R R7       EF  pVP                  \        9  d   K  VP                  ^ ,          pVP                  ^,          p\        V\        4      '       g   \        R\        V4       24      h\        VP                  R,          \        4      '       g   \        R4      h\        V\        4      '       g   \        R\        V4       24      h\        VP                  R,          \        4      '       g   \        R4      h\        VP                  \        4      '       d   \        R4      h\        VP                  ,          pV F  pR	VP                  9  d   K  VP                  R	,          p	 V! V	P                  R,          .VP                  R
,          O5/ VP                  B p
VP                  R,          pV! V	P                  R,          VP                  R,          4      '       d$   V! W4      '       d   VP                  V4       K  K  K  	  EK  	  V#   \         d     K  i ; i)c                     V P                  4       VP                  4       8H  ;'       dK    V P                  4       VP                  4       8H  ;'       d"    V P                  4       VP                  4       8H  # r   )sizestridestorage_offset)rf   bs   &&r   matching_view_metadata=_get_view_inverse_node_usages.<locals>.matching_view_metadata   s]    FFH  9 9
ahhj(9 9  "a&6&6&88	
r   c                 (    V P                   R ,          # )r@   )rG   )r   s   &r   <lambda>/_get_view_inverse_node_usages.<locals>.<lambda>  s    QVVJ5Gr   )keyzExpected Node for base, got r?   z/Expected FakeTensor in base.meta['fake_result']z$Expected Node for mutated_view, got z7Expected FakeTensor in mutated_view.meta['fake_result']zn.target should not be a stringrC   r.   NN)r   sortedrI   _VIEW_INVERSE_MAPrH   r   r
   rO   rP   rG   r   strkwargsr   	Exception)r   r   r   view_inverse_nodesr   basemutated_vieworiginal_view
self_aliasself_alias_baseview_replay_metadataexpected_metadatas   &&          r   _get_view_inverse_node_usagesr      s   
 %+GHH88,,vvayvvay$%% #?T
|!LMM$))M2J?? !RSS,-- 6tL7I6JK  ,++M:JGG I  ahh$$ !BCC *!((3&J
 
/(ooi8O (5#((7(:;&&*(HI($ %/OOM$B!)#((7=9Q ,-AUU&**1- V# '- I\   s   	A;H3H33IITc                  aa%a&a' \        V 4      P                  ! V!   V P                  P                   Uu0 uFs  pVP                  R8X  g   K  \        VP                  R,          \        P                  4      '       g   KI  \        VP                  R,          P                  4       4      kKu  	  pp\        \        4      o'V P                  P                   FE  oRSP                  9   g   K  VV'3R lp\        P                  ! VSP                  R,          4       KG  	  \        4       pV P                  P                   EF<  pVP                  R8X  g   K  \        VP                  \        P                   P"                  4      '       g   KM  \%        VP                  P&                  P(                  4      ^8  d   K}  \+        VP                  P&                  P(                  ^ ,          P*                  4      \        P,                  Jd   K  VP.                  ^ ,          p\        P0                  ! VP                  R,          4      p\        P0                  ! VP                  R,          4      pRp	\%        V4      \%        V4      8X  dv   \3        Wx4       Ff  w  rV
P5                  4       VP5                  4       8w  d   Rp	V
P6                  VP6                  8w  d   Rp	\        P8                  ! V
4      ^8X  g   Kd  Rp	Kh  	  V	'       dA   VP                  \        P:                  P<                  P>                  P@                  8w  d   EK  \        VP                  R,          P                  4       4      pW9   d   EK7  \%        VP.                   Uu. uF  qVJ g   K
  VNK  	  up4      ^8  d   EKk  \        VP                  R,          P                  4       4      pS'V,          p\C        WP                  R,          4      p\E        W4      p\%        VV,
          4      ^ 8H  pV'       g   EK  VP                  \F        9   Ed   W%9  Ed   \F        VP                  ,          pV P                  PI                  V4      ;_uu_ 4        VP.                  ^,          pVP.                  R,          pV P                  PK                  RVV3\M        V4      ,           VPN                  4      pV P                  PK                  R\        P:                  P<                  PP                  P@                  VV3/ 4       R	R	R	4       VPS                  V4       M#\U        VP                  4      pVf   EK  VVn        \        VP                  R,          P                  4       4      pS'V,          PW                  S'V,          4       S'V,          PW                  S'V,          4       VPW                  V4       \X        PZ                  ! V.V4       EF  o&S&P.                  ^ ,          o%S&P\                   Uu. uF0  pVP                  R,          VP                  R,          8  g   K.  VNK2  	  ppV EF  pV%V&3R
 lp\_        \`        VVP.                  4      Vn        \_        \`        VVPN                  4      Vn'        \        P0                  ! S&P                  R,          4      p\        P0                  ! VP                  R,          4      pV Uu0 uF4  p\        V\b        4      '       g   K  \        VP                  4       4      kK6  	  ppV Uu0 uF4  p\        V\b        4      '       g   K  \        VP                  4       4      kK6  	  pp\%        V4      ^8X  g   EK,  \%        V4      ^8X  g   EK?  VV8X  g   EKI  \        P0                  ! S%P                  R,          4      p V  Uu0 uF4  p\        V\b        4      '       g   K  \        VP                  4       4      kK6  	  p!p\%        V!4      ^8w  d   \e        R\%        V!4       24      hV!w  p"Vw  p#S'V#,          PW                  S'V",          4       S'V",          PW                  S'V#,          4       EK   	  EK  	  EK?  	  V F  p$V P                  Pg                  V$4       K   	  V Pi                  4        V # u upi u upi   + '       g   i     EL; iu upi u upi u upi u upi )a  
Given an fx.GraphModule, modifies it to perform "reinplacing",
mutating the nodes of the graph.
We look for out-of-place op call sites like ``b = a.add(...)``,
and convert them to be inplace (``b = a.add_(...)``),
as long as the input to the current operator ("a") isn't reused
anywhere later in the graph.

This pass currently expects to operate on a **functional, ATen** graph.
This can be obtained by running ``make_fx(functionalize(f))``.

Sample inputs are needed to determine aliasing relationships of the inputs.
In general, we can't reinplace node ``b = a.add(...)`` if "a" aliases any of the
inputs to the program.

Given a node ``b = foo(a, args...)`` the algorithm for re-inplacing is as follows:

**(1)** Perform some initial checks on the metadata of "a" and "args..."
that can disqualify them from being reinplaced.

- **(1a)** Check that the self argument we're attempting to reinplace
  has acceptable dtype/size metadata to reinplace with.

  For example, if we have::

    a = torch.ones(1)
    b = torch.ones(10)
    out = torch.add(a, b)

  We can't turn that into ``a.add_(b)`` because that would require resizing "a".

  Similarly, we can't convert ``torch.ge(a, b)`` into ``a.ge_(b)``,
  because that would require changing a's dtype (from e.g. float32 to bool).
  Note that in this specific example, we could technically do better..

  If we see the pattern::

    a_1 = a.ge(b)
    a_2 = aten._to_copy(a_1, a.dtype)

  Then this should be valid to completely re-inplace
  (this is exactly what functionalization will emit when it sees ``a.ge_(b)``).

  This optimization is only really important for user programs
  that directly use inplace comparison ops though.

  We also cannot re-inplace on tensors that have overlapping memory,
  e.g. ``torch.ones(1).expand(4, 4).add_(1)``.

- **(1b)** Check if "a" is an alias of any of the program inputs.

  If it is, skip and move to the next node.
  Inplace'ing an op that would cause it to mutate a program is not sound,
  because that would be a side effect visible to the user.

  NOTE: there's a future optimization that we should make:
  if "a" is a (alias of a)  program input, but later in the program
  there is a node that looks like ``a.copy_(...)``,
  then re-inplacing is ok to do - we are temporarily reusing a's buffer,
  which will later be overwritten by the ``copy_()`` call.

  This will be an important optimization to have for programs that mutate
  their inputs. It currently isn't implemented though.

- **(1c)** Check if "a" and "args..." alias.

  For example, re-inplacing to create code like the below
  isn't guaranteed to be sound::

    aten.mul_(a, a)

**(2)** Check that "a" and all of its outstanding aliases are not used anywhere
later in the graph. If this is the case, then it's safe to re-inplace
to ``b = foo_(a)``.

There are a few caveats to this, explained in more detail below:

- (a) If "a" is used later as an argument to a view op, that is okay.
  It's only a problem if "a" (or that view) is later passed
  into a normal operator, or if it is returned as the program output.
- (b) If "a" is a repeat argument in ``foo()``, then don't reinplace.
  Most ATen kernels don't make any guarantees that this is sound,
  e.g. if you do ``aten.mul_(a, a)``.
  So we'll just ban re-inplacing in this case.
- (c) If "a" is used as an input into a view "inverse" / "scatter"
  operator, it is potentially fine to re-inplace
  (and remove that scatter operator from the graph).
  See below for a more detailed example.

NOTE: there is an optimization in this step that is crucial
to fully recovering performance from functionalization.

Given this program::

    def f(x):
        a = torch.ops.aten.add(x, x)
        b = torch.ops.aten.diagonal(a)
        torch.ops.aten.fill_(b, 0)
        return d

Functionalization will emit the following::

    def f(x):
        a = torch.ops.aten.add(x, x)
        b = torch.ops.aten.diagonal(a, 0, 1)
        b_updated = torch.ops.aten.fill(b, 0)
        a_updated = torch.ops.aten.diagonal_scatter(a, b_updated, 0, 1)
        return a_updated

Ordinarily, we would not be able to reinplace the fill,
because "b" aliases with "a" which is used by the diagonal_scatter call.

"re-inplacing" is on the hook for figuring out that it is ok to
completely remove the expensive diagonal_scatter call, if we re-inplace
the add().

So, for every ``alias in alias_set(a)``, instead of checking
that "alias" is not used anywhere later in the graph,
we check that EITHER:

- (a) alias is not used anywhere later in the graph, OR
- (b) alias is used exactly once later on in the graph,
  in the following op::

    out = foo_scatter(alias, x, args...)

  where the following must hold:

  - (i) ``foo_scatter`` is the "inverse" operator for foo.
    This only applies to "foo" ops that are view operators,
    which view into a subset of the original tensor's memory.
    In practice, there are ~4 operators where this applies::

      diagonal -> diagonal_scatter
      slice -> slice_scatter
      select -> select_scatter
      as_strided -> as_strided_scatter

  - (ii) "args..." are the same between the ``foo()`` and
    ``foo_scatter()`` calls.

**(3)** Perform the actual re-inplacing on foo!

(3b) is the common case, but special care is needed for
``{view}_scatter`` (3a).

- **(3a)** ``{view}_scatter`` ops.

  Consider this program::

    a = torch.zeros(2, 2)
    b = torch.ones(2)
    a[0] = b

  Post functionalization, that will look like::

    a = torch.zeros(2)
    b = torch.ones(1)
    a_updated = torch.select_scatter(a, b, 0, 0)

  In this case though, there is no "functional" op to re-inplace!
  Instead, we'd like to directly remove the select_scatter call.
  We already know from (3) that this is valid,
  because "a" has no later usages in the graph.

  We perform the re-inplacing on the ``{view}_scatter`` op like so.

  Before::

    a_updated = torch.select_scatter(a, b, args...)

  After::

    a_slice = a.select(a, args...)
    a_slice.copy_(b)

- **(3b)** Otherwise, replace the functional op with its inplace variant.

  Before::

    b = foo(a, args...)

  After::

    a.foo_(args...)

**(4)** Finally, after converting either::

    # Before:                              # After:
    b = foo(a)                             foo_(a)

or::

    # Before:
    b = {slice}_scatter(a, mutated_slice, args...)
    # After:
    slice = {slice}(a, args...)
    slice.copy_(mutated_slice)

We now need to find all later nodes that use "b" as an argument
and update them to take in "a" instead.

Note that for the majority of inplace ops, this isn't actually necessary
(because most inplace ops return "self" as their output).
This isn't generally true for all mutable ops though, which is why
we need to actually replace all of the arguments.

We also need to update our metadata of ``Dict[StorageWeakRef, Set[Node]]``,
that maps a given tensor storage to the set of all nodes that take in that
storage as an input.
Specifically, re-inplacing ``b = foo(a)`` causes "a" and "b"'s sets to get
fused together.

**(5)** Any ``view_inverse/scatter`` nodes that were identified as
"it's ok to ignore them" during step (3) get manually deleted from the graph.
Their outputs are no longer used, so technically standard DCE would be able
to do this, but we can no longer run FX's DCE pass now that we have mutable
ops in the graph.
placeholderr?   c                    < \        V \        4      '       d2   S\        V P                  4       4      ,          P	                  S4       R # R # r   )r   r   r   rU   r   )r   r   storage_to_nodess   &r   _add_to_mapreinplace.<locals>._add_to_map6  s6    a,,$^A4D4D4F%GHLLQO -r   rB   FTr@   r   Nc                    < V S8X  d   S# V # r   r   )rf   newolds   &r   replace_argreinplace.<locals>.replace_arg  s    8#&J r   zExpected 1 storage, got )5r8   rh   graphnodesrN   r   rG   r    rb   r   rU   r   r   pytree	tree_map_rI   r!   r"   r$   r#   r%   rP   
TensorTyperH   tree_leavesrx   numeldtype_debug_has_internal_overlaprJ   rK   resizerM   r   r   r   inserting_beforecreate_nodetupler   rL   r   r   update	itertoolschainr   r   r
   r   rO   
erase_node	recompile)(gmsample_argsr:   input_storagesr   &all_later_view_inverse_nodes_to_deleteself_argself_flattenednode_flattenedself_has_wrong_metadata	self_meta	node_metaself_arg_storager   r   r   later_view_inverse_node_usagescan_reinplaceview_opmutated_slice_noderemaining_slice_args
slice_noder   curr_node_storager   nodes_to_updatenode_to_updater   old_flattened_resnode_flattened_resold_res_storagenode_res_storagenew_flattened_resnew_res_storagenew_refnode_ref	to_deleter   r   r   s(   &*                      `            @@@r   r   r   6  s5   z #2&00+>. HHNN"DGG}$ 	B 499]3U\\B	 	Btyy/>>@A"   9DC8HXX^^AFF"P [!&&*?@  .1U*77o% dkk5::+@+@AA4;;&&001A5DKK''11!499:%BRBRR yy|H#//m0LMN#//		-0HIN&+#>"c.&99,/,O(I (IOO,==26/ )//926/ 88CqH26/ -P '4;;%))..:O:O:W:W+W  .m,;;=   1tyy:y!MAAy:;a? -m,;;=  ,,<=L !;ii
3!
 .K!.*   14R RSWXXM  00F+DKK8 XX..t44)-1&+/99R=(!#!5!5'!e,@&AA	"J HH(('		,,44&.  5& 7::4@ $9#E #+. !/		-(779! -.55 !23 ./66 !12
 399. !v/MNhhqk"yy#(!AFF:,>:AV,VAAy   # '6N! +8k>+>+>+N' -:k>+@+@-N)
 )/(:(:388M;R(S%)/););&++M:*& "3'!2A%a4 ;q'7'7'9:!2 $ ' "4(!3A%a4 ;q'7'7'9:!3 % (" O,1 01Q6+/?? -3,>,>sxx?V,W) &7+%6)!Z8 ?N1+;+;+=>%6 ( +
 /14"0":3;O:P Q#  &5
&6
 )299:J7:ST(1889I(9STC '6 Oi ~ <	
I& < LLNIsP ;Z 544n#0'
(.+sZ   b6.b6.b6	b;
b;
;B,c +c
c1c
c
1c
c
c#
%c#
 cc                    V ^8  d   Qh/ ^ \         9   d5   \        \        R\        3,          \        R\        3,          3,          ;R&   # )r.   .r   )__conditional_annotations__dictr   r   )r0   s   "r   r1   r1      s<      V 4c*HS#X,>>? W r   )5r   rR   r   collectionsr   collections.abcr   enumr   typingr   r    torch._subclasses.fake_tensorr   r   torch.fxr
   torch.fx._compatibilityr    torch.multiprocessing.reductionsr   torch.utilsr   r   torch.utils._pytreer   __all__r   r,   r5   fxInterpreterr8   r}   r   rJ   rK   diagonal_scatterrM   diagonalselect_scatterselectr   slice_scatterslicerb   as_strided_scatter
as_stridedr   r   r   r   r1   )r   s   @r   <module>r     ss      # $    D  1 ; ) - - 0 e,F+UXX%9%9 F+ -F+R+6'V 
IINN##++UYY^^-D-D-L-L	IINN!!))599>>+@+@+D+D	IINN  ((%))..*>*>*E*E	IINN%%--uyy~~/H/H/P/P	C  B:z d+j ,jr   