
    3jr                         S SK r S SKJr  S SKJr  SSKJrJrJrJ	r	J
r
  \S\	R                  S-  4S j5       r\" 5       r\(       a  \	R                  " \5        \	R                  " 5         g)    N)cache)cast   )cutedsl_utilsdsl_registryopsregistrytriton_utilsreturnc                  \   [         R                  " S5      n U (       d  g SSKnU R                  SS5      u  p#UR	                  U5      n[        XC5      n[        U5      (       d  [        U  S35      e[        [        R                  U5      $ ! [         a  n[        SU  S35      UeSnAff = f)	aK  
Get a user-supplied graph-ordering function if specified.

Pass in a `package.submodule.fn` string to the env variable
`TORCH_PYTHON_NATIVE_USER_GRAPH_ORDER_FN` that implements the
calling API described in `torch/_native/README.md`. This function
must be part of an importable path.

Return either the imported function or `None`
'TORCH_PYTHON_NATIVE_USER_GRAPH_ORDER_FNNr   .r   z& does not describe a callable functionzCould not resolve z' into an importable & callable function)osgetenv	importlibrsplitimport_modulegetattrcallable	TypeErrorr   r	   UserOrderingFn	Exception
ValueError)env_varr   module_namefn_namemodulefnes          P/home/wildlama/miniconda3/lib/python3.13/site-packages/torch/_native/__init__.pyget_user_ordering_fnr!   
   s     iiABG  '~~c15((5V%||wi'MNOO H++R00  	)PQ
	s   A+B 
B+B&&B+)r   	functoolsr   typingr    r   r   r   r	   r
   r   r!   user_order_fn!reorder_graphs_from_user_function_register_all_overrides     r    <module>r*      sg    	   G F !h55< ! !H %&..}= 	     "r)   