§
    ŠŠtjÛŸ  ã            	       óú  — U d Z ddlZddlZddlZddlZddlZddlmZ ddlm	Z	m
Z
 ddlmZmZmZ ddlmZ ddlmZmZmZ dZedz  ed<   ej                             d	d
¦  «        dk    ZdZej                             dd¦  «        Zeed<   ej                             dd¦  «        Zeed<   ej                             dd¦  «        Zeed<   dZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ' eddd¬¦  «        Z(e)ed<   dZ* ed¬¦  «        Z+e,ed<    ed¬¦  «        Z-e,ed <    ed!dd¬"¦  «        Z.e)ed#<    ed$¬¦  «        Z/e)ed%<   dZ0dZ1dZ2ej                             d&d¦  «        dk    Z3dZ4dZ5ej                             d'd¦  «        dk    Z6d(Z7ed)         ed*<   dZ8dZ9dZ:dZ;dZ<dZ=dZ>ej                             d+d
¦  «        dk    Z? e@¦   «         ZAe@eBe                  ed,<    e@¦   «         ZCe@eBe                  ed-<    e)ej                             d.d¦  «        ¦  «        ZDej                             d/d
¦  «        dk    ZEdZFej                             d0d
¦  «        dk    ZGej                             d1d¦  «        ZHej                             d2d¦  «        ZIe)ez  ed3<   i ZJeKeef         ed4<   	 h d5£ZLej                             d6d¦  «        ZM e,ej                             d7d8¦  «        ¦  «        ZNej                             d9¦  «        dk    ZOd:ZPej                             d;¦  «        dk    ZQdZRej                             d<¦  «        dk    ZSej                             d=d
¦  «        dk    ZTdZUdZVdZWdZXe)ed>         z  ed?<   ej                             d@d
¦  «        dk    ZYe)edA<   dZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZjdZk e¦   «          ZldZmdZn e
 e
 e
 e	eo¦  «        ¦  «        ¦  «        ¦  «        ZpdZqdZrdBZsdCZtdDZudZvdZwdZxdZydZzdZ{dZ| eddEddF¬G¦  «        Z}dZ~e)edH<   dZdZ€dZ�dZ‚dZƒdZ„dZ…dZ†dZ‡dZˆdZ‰dZŠdZ‹dIefdJ„ZŒ eŒ¦   «         Z�h dK£ZŽdZ�dZ�dZ‘dZ’dZ“dZ”e)edL<   dZ• e@¦   «         Z–e@eegdf                  edM<    e@¦   «         Z—e@edNef                  edO<    edP¬¦  «        Z˜e@edNef                  edQ<   dZ™g dR¢Zšg dS¢Z›ej                             dTd¦  «        dk    Zœej                             dUd
¦  «        dk    Z�dZžej                             dVd
¦  «        dk    ZŸej                             dWd
¦  «        dk    Z dZ¡dZ¢dZ£dZ¤dZ¥i Z¦eKeef         edX<   	 ej                             dYd
¦  «        dk    Z§ej                             dZd
¦  «        dk    Z¨ ed[d\d¬]¦  «        Z©e)ed^<    ed_¦  «        Zªe)dz  ed`<   ej                             dad
¦  «        dk    Z«ej                             dbd¦  «        Z¬edz  edc<    e ej­        dd¦  «        dk    dedf¬g¦  «        Z®dZ¯dZ°dZ±dZ²dZ³edz  edh<   dZ´e)edi<   dZµe)edj<   dZ¶e)edk<   dZ·e)dz  edl<   erddml¸T dnedIefdo„Z¹ eejº        e»         ¦  «         dS )par  
Configuration module for TorchDynamo compiler and optimization settings.

This module contains various configuration flags and settings that control TorchDynamo's
behavior, including:

- Runtime behavior flags (e.g., guard settings, specialization options)
- Debugging and development options
- Performance tuning parameters
- Feature toggles for experimental features
é    N)ÚCallable)ÚabspathÚdirname)ÚAnyÚLiteralÚTYPE_CHECKING)Ú	is_fbcode)ÚConfigÚget_tristate_envÚinstall_config_moduleÚlog_file_nameÚTORCHDYNAMO_VERBOSEÚ0Ú1FÚTORCH_COMPILE_OVERRIDE_BACKENDSÚ Údebug_backend_overrideÚ'TORCH_COMPILE_OVERRIDE_INDUCTOR_CONFIGSÚdebug_inductor_config_overrideÚ%TORCH_COMPILE_OVERRIDE_DYNAMO_CONFIGSÚdebug_dynamo_config_overrideé   TÚinfoé   é   zdoes not do anything)ÚdefaultÚ
deprecatedÚdeprecation_messageÚ*skip_code_recursive_on_recompile_limit_hitz$torch._dynamo.config.recompile_limit)ÚaliasÚcache_size_limitz0torch._dynamo.config.accumulated_recompile_limitÚaccumulated_cache_size_limitz?torch._dynamo.config.skip_code_recursive_on_recompile_limit_hit)r    r   r   Ú&skip_code_recursive_on_cache_limit_hitz0torch._dynamo.config.fail_on_recompile_limit_hitÚfail_on_cache_limit_hitÚ#TORCH_COMPILE_USE_LAZY_GRAPH_MODULEÚ%TORCH_DYNAMO_AUTOMATIC_DYNAMIC_SHAPESÚdynamic)r'   ÚunbackedÚ automatic_dynamic_shapes_mark_asÚTORCHDYNAMO_PREPARE_FREEZINGÚtraceable_tensor_subclassesÚnontraceable_tensor_subclassesÚTORCHDYNAMO_SUPPRESS_ERRORSÚTORCH_COMPILE_REPLAY_RECORDÚTORCH_COMPILE_DISABLEÚTORCH_COMPILE_CPROFILEÚTORCH_COMPILE_DYNAMO_PROFILERÚdynamo_profilerÚ!skipfiles_inline_module_allowlist>   útorch._refsútorch._primsútorch._decompútorch.testingútorch.distributionsÚTORCHDYNAMO_REPRO_AFTERÚTORCHDYNAMO_REPRO_LEVELé   ÚTORCHDYNAMO_REPRO_FORWARD_ONLYgü©ñÒMbP?ÚTORCHDYNAMO_REPRO_IGNORE_NON_FPÚ"TORCHDYNAMO_CAPTURE_SCALAR_OUTPUTSÚ,TORCHDYNAMO_CAPTURE_DYNAMIC_OUTPUT_SHAPE_OPS)Úddp_optimizerÚpython_reducerÚ'python_reducer_without_compiled_forwardÚno_optimizationÚoptimize_ddpÚ(TORCH_DYNAMO_DO_NOT_EMIT_RUNTIME_ASSERTSÚdo_not_emit_runtime_assertsÚfloat64Ú
complex128Úint64z*pytorch/compiler:inline_inbuilt_nn_modulesz>does not do anything, inline_inbuilt_nn_modules is always True)r   Újustknobr   r   Únested_graph_breaksÚreturnc                  ó†  — d} | t           j        v r0t           j                             t           j        |          d¦  «        S t	          ¦   «         rCt           j                             t          j        ¦   «         t          j        ¦   «         d¦  «        S t           j                             t          j	        ¦   «         d¦  «        S )NÚTORCH_COMPILE_DEBUG_DIRÚtorch_compile_debug)
ÚosÚenvironÚpathÚjoinr	   ÚtempfileÚ
gettempdirÚgetpassÚgetuserÚgetcwd)ÚDEBUG_DIR_VAR_NAMEs    úR/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/torch/_dynamo/config.pyÚdefault_debug_dir_rootr[   �  s‘   € à2ÐØ�RœZÐ'Ð'ÝŒw�|Š|�BœJÐ'9Ô:Ð<QÑRÔRÐRÝ	‰Œð @ÝŒw�|Š|ÝÔÑ!Ô!¥7¤?Ñ#4Ô#4Ð6Kñ
ô 
ð 	
õ Œw�|Š|�BœI™KœKÐ)>Ñ?Ô?Ð?ó    >   Úrepro_afterÚrepro_levelÚconstant_functionsr3   Ú capture_profiler_record_functionÚreorderable_logging_functions.Úignore_logging_functionsz-torch._dynamo.config.ignore_logging_functionsÚignore_logger_methods)ÚlayoutÚis_negÚis_conjÚ	is_pinned)ÚstrideÚstorage_offsetÚis_contiguousÚ TORCH_FAKE_TENSOR_DISPATCH_CACHEÚ+TORCH_FAKE_TENSOR_DISPATCH_CACHE_CROSSCHECKÚTORCH_CACHING_PRECOMPILEÚTORCH_STRICT_PRECOMPILEÚ!compiled_autograd_kwargs_overrideÚTORCH_COMPILER_COLLECTIVESÚ"TORCHDYNAMO_ENABLE_P2P_COMPILATIONz7pytorch/remote_cache:enable_local_automatic_dynamic_pgoÚ(TORCH_DYNAMO_AUTOMATIC_DYNAMIC_LOCAL_PGO)rJ   Úenv_name_forcer   Úautomatic_dynamic_local_pgoÚ)TORCH_DYNAMO_AUTOMATIC_DYNAMIC_REMOTE_PGOÚautomatic_dynamic_remote_pgoÚUNSAFE_SKIP_FSDP_MODULE_GUARDSÚPT2_COMPILE_ID_PREFIXÚpt2_compile_id_prefixÚPy_GIL_DISABLEDz,pytorch/compiler:enable_run_gc_after_compileÚ!TORCH_DYNAMO_RUN_GC_AFTER_COMPILE)r   rJ   Úenv_name_defaultÚ_custom_ops_profileÚ'enable_invoke_subgraph_regional_compileÚinline_invoke_subgraphÚ!inline_single_use_invoke_subgraphÚ#invalidate_compile_context_weakrefs)Ú*Úchangesc                  ó   — d S )N© )rƒ   s    rZ   Ú_make_closure_patcherr†   ¡  s   € € € r\   )¼Ú__doc__rV   rP   ÚsysÚ	sysconfigrT   Úcollections.abcr   Úos.pathr   r   Útypingr   r   r   Útorch._environmentr	   Útorch.utils._config_moduler
   r   r   r   ÚstrÚ__annotations__rQ   ÚgetÚverboseÚverify_correctnessr   r   r   Úleaf_function_validate_outputsÚ%leaf_function_check_escaped_gradientsÚminimum_call_countÚdead_code_eliminationÚreplay_side_effectsÚgenerate_pycodeÚside_effect_replay_policyÚrecompile_limitÚaccumulated_recompile_limitr   ÚboolÚfail_on_recompile_limit_hitr!   Úintr"   r#   r$   Úspecialize_intÚspecialize_floatÚdynamic_shapesÚuse_lazy_graph_moduleÚassume_static_by_defaultÚ_shapes_specÚautomatic_dynamic_shapesr)   Ú!automatic_dynamic_exclusion_guardÚlog_graph_in_out_metadataÚforce_parameter_static_shapesÚ&force_nn_module_property_static_shapesÚallow_ignore_mark_dynamicÚguard_nn_modulesÚ guard_nn_modules_using_dict_tagsÚprepare_freezingÚsetr+   Útyper,   Úsuppress_errorsÚreplay_record_enabledÚ rewrite_assert_with_torch_assertÚdisableÚcprofiler2   r3   ÚdictÚ*allowed_functions_module_string_ignorelistr]   r^   Úrepro_forward_onlyÚrepro_toleranceÚrepro_ignore_non_fpÚsame_two_models_use_fp64Úcapture_scalar_outputsÚ capture_dynamic_output_shape_opsÚ+prefer_deferred_runtime_asserts_over_guardsÚ3force_unspec_int_unbacked_size_like_on_torchrec_kjtÚallow_unspec_int_on_nn_modulerD   rF   Úskip_torchrecÚdont_skip_tracingÚoptimize_ddp_lazy_compileÚ#use_lamba_guard_for_object_aliasingÚskip_fsdp_guardsÚskip_nnmodule_hook_guardsÚ,skip_no_tensor_aliasing_guards_on_parametersÚ*skip_tensor_guards_with_matching_dict_tagsÚ%skip_guards_on_constant_func_defaultsÚ)assume_dunder_attributes_remain_unchangedÚ"use_recursive_dict_tags_for_guardsÚ0max_saved_pointers_for_recursive_dict_tags_checkÚraise_on_ctx_manager_usageÚraise_on_unsafe_aot_autogradÚerror_on_nested_jit_traceÚerror_on_nested_fx_traceÚforce_compile_during_fx_traceÚ	allow_rnnÚcapture_sparse_computeÚerror_on_recompileÚreport_guard_failuresÚ__file__Úbase_dirÚtrace_numpyÚtrace_autograd_opsÚnumpy_default_floatÚnumpy_default_complexÚnumpy_default_intÚuse_numpy_random_streamÚenable_cpp_guard_managerÚ enable_cpp_symbolic_shape_guardsÚenable_trace_contextlibÚenable_trace_unittestÚenable_trace_load_build_classÚ"enable_faithful_generator_behaviorÚinline_inbuilt_nn_modulesrK   Ú3error_on_dynamo_callback_in_fullgraph_compiled_codeÚinstall_free_tensorsÚinstall_free_tensors_for_exportÚ!enable_cpp_framelocals_guard_evalÚuse_graph_deduplicationÚtrack_nodes_for_deduplicationÚgraph_deduplication_lintÚissue_3_13_0_warningÚallow_empty_graphsÚdebug_force_nested_callsÚ&debug_force_graph_break_on_leaf_returnÚdebug_disable_compile_counterÚ%record_compile_time_instruction_countr[   Údebug_dir_rootÚ_save_config_ignoreÚ%cudagraph_backend_keep_input_mutationÚ(cudagraph_backend_support_input_mutationÚonly_allow_pt2_compliant_opsÚcapture_autograd_functionÚcapture_func_transformsr`   Úlog_compilation_metricsra   rb   rc   Ú+inject_BUILD_SET_unimplemented_TESTING_ONLYÚ)_autograd_backward_strict_mode_banned_opsÚ5_autograd_backward_strict_mode_conditional_banned_opsÚfake_tensor_cache_enabledÚ$fake_tensor_cache_crosscheck_enabledÚ"fake_tensor_disable_inference_modeÚcaching_precompileÚstrict_precompileÚcompiled_autogradÚenable_dynamo_decompositionsÚgraph_break_on_nn_param_ctorÚ#inline_torch_dispatch_torch_compileÚ-skip_fwd_side_effects_in_bwd_under_checkpointro   Úenable_compiler_collectivesÚenable_p2p_compilationrt   rv   Ú_unsafe_skip_fsdp_module_guardsry   Úget_config_varÚrun_gc_after_compileÚ'constant_fold_autograd_profiler_enabledÚwrap_top_frameÚrecord_runtime_overheadÚenable_aot_compiler}   r~   r   r€   r�   Útorch.utils._config_typingr†   ÚmodulesÚ__name__r…   r\   rZ   ú<module>r     s�  ðð
ð 
ð 
ð €€€Ø 	€	€	€	Ø 
€
€
€
Ø Ð Ð Ð Ø €€€Ø $Ð $Ð $Ð $Ð $Ð $Ø $Ð $Ð $Ð $Ð $Ð $Ð $Ð $Ø .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .à (Ð (Ð (Ð (Ð (Ð (Ø VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ Vð !€ˆs�T‰zÐ  Ð  Ñ  ð Œ*�.Š.Ð.°Ñ
4Ô
4¸Ò
;€ð Ð ð !œjŸnšnÐ-NÐPRÑSÔSÐ ˜Ð SÐ SÑ Sð ')¤j§n¢nØ-¨rñ'ô 'Ð  ð ð ñ ð %'¤J§N¢NØ+¨Rñ%ô %Ð ˜cð ð ñ ð "'Ð ð ).Ð %ð Ð ð Ð ð Ð ð
 €ð #Ð ð €ð "Ð à39°6Ø˜TÐ7Mð4ñ 4ô 4Ð *¨Dð ð ñ ð $Ð à˜Ð%KÐLÑLÔLÐ �#Ð LÐ LÑ LØ$* FØ
<ð%ñ %ô %Ð ˜cð ð ñ ð 06¨vØ
KØØ.ð0ñ 0ô 0Ð &¨ð ð ñ ð !' Ø
<ð!ñ !ô !Ð ˜ð ð ñ ð €ð
 Ð ð €ð „J‡N‚NÐ8¸#Ñ>Ô>À#ÒEð ð  Ð ð €ð „J‡N‚NÐ:¸CÑ@Ô@ÀCÒGð ð
 DMÐ   'Ð*?Ô"@Ð LÐ LÑ Lð( %*Ð !ð "Ð ð !%Ð ð
 *.Ð &ð "Ð ð Ð ð $(Ð  ð
 ”:—>’>Ð"@À#ÑFÔFÈ#ÒMÐ ð /2¨c©e¬eÐ ˜S  c¤œ^Ð 3Ð 3Ñ 3ð 25°±´Ð   D¨¤I¤Ð 6Ð 6Ñ 6ð �$�r”z—~’~Ð&CÀUÑKÔKÑLÔL€ð
 œ
ŸšÐ'DÀcÑJÔJÈcÒQÐ ð $(Ð  ð Œ*�.Š.Ð0°#Ñ
6Ô
6¸#Ò
=€ð Œ:�>Š>Ð2°EÑ:Ô:€ð !œjŸnšnÐ-LÈeÑTÔT€�˜‘Ð TÐ TÑ Tð 57Ð ! 4¨¨S¨¤>Ð 6Ð 6Ñ 6ðð&.ð .ð .Ð *ð Œj�nŠnÐ6¸Ñ=Ô=€ð ˆc�"”*—.’.Ð!:¸AÑ>Ô>Ñ?Ô?€ð ”Z—^’^Ð$DÑEÔEÈÒLÐ ð
 €ð ”j—n’nÐ%FÑGÔGÈ3ÒNÐ ð  Ð ð
 œŸšÐ(LÑMÔMÐQTÒTÐ ð „J‡N‚NÐAÀ3ÑGÔGÈ3ÒNð !ð
 /4Ð +ð 7<Ð 3ð !&Ð ð4 	ð ØØð	ôñð	ð 	ñ 	ð  „J‡N‚NÐ=¸sÑCÔCÀsÒJð ˜Tð ð ñ ð
 €ð Ð ð "Ð ð '+Ð #ð Ð ð
 !Ð ð 04Ð ,ð .2Ð *ð ).Ð %ð& -1Ð )ð &+Ð "ð 47Ð 0ð "Ð ð  %Ð ð !Ð ð  Ð ð
 !&Ð ð €	ð '˜Y™[œ[˜Ð ð
 Ð ð Ð ð ˆ7�7�7˜7˜7 7 7¨8Ñ#4Ô#4Ñ5Ô5Ñ6Ô6Ñ7Ô7€ð €ð Ð ð  Ð Ø$Ð ØÐ ð  Ð ð  Ð ð $)Ð  ð Ð ð Ð ð !&Ð ð &*Ð "ð #˜FØØ9ØØXð	ñ ô Ð ð "Ð �TÐ !Ð !Ñ !ð 7<Ð 3ð
 Ð ð #'Ð ð %)Ð !ð  Ð ð !&Ð ð !Ð ð
 Ð ð Ð ð !Ð ð */Ð &ð
 !&Ð ð ).Ð %ð
@ ð 
@ð 
@ð 
@ð 
@ð (Ð'Ñ)Ô)€ðð ð Ð ð ).Ð %ð ,1Ð (ð  %Ð ð !Ð ð Ð ð */Ð   $Ð .Ð .Ñ .ð Ð ð =@¸C¹E¼EÐ ˜s 8¨S¨E°4¨KÔ#8Ô9Ð AÐ AÑ Að 58°C±E´EÐ ˜#˜h s¨C xÔ0Ô1Ð 9Ð 9Ñ 9ð 28°Ø
9ð2ñ 2ô 2Ð �s˜8 C¨ HÔ-Ô.ð ð ñ ð /4Ð +ð-ð -ð -Ð )ð9ð 9ð 9Ð 5ð „J‡N‚NÐ5°sÑ;Ô;¸sÒBð ð „J‡N‚NÐ@À#ÑFÔFÈ#ÒMð %ð &*Ð "ð ”Z—^’^Ð$>ÀÑDÔDÈÒKÐ à”J—N’NÐ#<¸cÑBÔBÀcÒIÐ ð Ð ð  $Ð ð  $Ð ð '+Ð #ð 16Ð -ð 57Ð ! 4¨¨S¨¤>Ð 6Ð 6Ñ 6ðð: !œjŸnšnÐ-IÈ3ÑOÔOÐSVÒVÐ ð „J‡N‚NÐ7¸Ñ=Ô=ÀÒDð ð2 %+ FØFØ=Øð%ñ %ô %Ð ˜Tð ð ñ ð -=Ð,<Ø/ñ-ô -Ð ˜d T™kð ð ñ ð „J‡N‚NÐ3°SÑ9Ô9¸SÒ@ð  ð
 %'¤J§N¢NÐ3JÈDÑ$QÔ$QÐ �s˜T‘zÐ QÐ QÑ Qð �và$ˆIÔ$Ð%6Ñ7Ô7¸1Ò<Ø;Ø8ð	ñ ô Ð ð +0Ð 'ð €ð Ð ð Ð ð #'Ð �S˜4‘ZÐ &Ð &Ñ &ð 16Ð '¨Ð 5Ð 5Ñ 5ð  %Ð ˜Ð $Ð $Ñ $ð +/Ð ! 4Ð .Ð .Ñ .ð 48Ð # T¨D¡[Ð 7Ð 7Ñ 7àð :Ø,Ð,Ð,Ð,à9¨Ð9°Ð9Ð9Ð9Ð9ð Ð �c”k (Ô+Ñ ,Ô ,Ð ,Ð ,Ð ,r\   