Ë
    øÿæi•  ã            	       ón  — 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mZmZ ddlmZ ddlmZmZmZ dZee   ed<   ej4                  j7                  d	d
«      dk(  ZdZej4                  j7                  dd«      Zeed<   ej4                  j7                  dd«      Zeed<   dZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ) ed¬«      Z*e+ed<    ed¬«      Z,e+ed<    ed¬«      Z-e.ed<    ed¬«      Z/e.ed<   dZ0dZ1dZ2ej4                  j7                  d d«      dk(  Z3dZ4ej4                  j7                  d!d«      dk(  Z5d"Z6ed#   ed$<   dZ7dZ8dZ9dZ:dZ;dZ<ej4                  j7                  d%d
«      dk(  Z= e>«       Z?e>e@e      ed&<    e>«       ZAe>e@e      ed'<    e.ej4                  j7                  d(d«      «      ZBej4                  j7                  d)d
«      dk(  ZCdZDej4                  j7                  d*d
«      dk(  ZEej4                  j7                  d+d«      ZFej4                  j7                  d,d«      ZGe.ez  ed-<   i ZHeIeef   ed.<   	 h d/£ZJej4                  j7                  d0d«      ZK e+ej4                  j7                  d1d2«      «      ZLej4                  j7                  d3«      dk(  ZMd4ZNej4                  j7                  d5«      dk(  ZOdZPej4                  j7                  d6«      dk(  ZQej4                  j7                  d7d
«      dk(  ZRdZSdZTdZUdZVee.ed8   f   ed9<   ej4                  j7                  d:d
«      dk(  ZWe.ed;<   dZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZj e«        ZkdZldZm e
 e
 e
 e	en«      «      «      «      ZodZpdZqd<Zrd=Zsd>ZtdZudZvdZwdZxdZydZz ed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‡dZˆdZ‰dAefdB„ZŠ eŠ«       Z‹h dC£ZŒdZ�dZŽdZ�dZ�dZ‘dZ’e.edD<   dZ“ e>«       Z”e>eegdf      edE<    e>«       Z•e>edFef      edG<    edH¬«      Z–e>edFef      edI<   dZ—g dJ¢Z˜g dK¢Z™ej4                  j7                  dLd«      dk(  Zšej4                  j7                  dMd
«      dk(  Z›dZœej4                  j7                  dNd
«      dk(  Z�ej4                  j7                  dOd
«      dk(  ZždZŸdZ dZ¡dZ¢dZ£i Z¤eIeef   edP<   	 ej4                  j7                  dQd
«      dk(  Z¥ edRdSd¬T«      Z¦e.edU<    edV«      Z§ee.   edW<   ej4                  j7                  dXd
«      dk(  Z¨ej4                  j7                  dYd«      Z©ee   edZ<    e e�jT                  d[«      dk7  d\d]¬^«      Z«dZ¬dZ­dZ®dZ¯dZ°ee   ed_<   dZ±e.ed`<   dZ²ee.   eda<   erddbl³­ dcedAefdd„Z´ ee�jj                  e¶   «       y)ear  
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ÚOptionalÚTYPE_CHECKINGÚUnion)Ú	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é   TÚinfoé   é   z$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Ú&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_modules)ÚdefaultÚjustknobÚreturnc                  óŽ  — d} | t         j                  v r1t         j                  j                  t         j                  |    d«      S t	        «       rEt         j                  j                  t        j                  «       t        j                  «       d«      S t         j                  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    úi/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/torch/_dynamo/config.pyÚdefault_debug_dir_rootrW   S  s„   € à2ÐØœRŸZ™ZÑ'Ü�w‰w�|‰|œBŸJ™JÐ'9Ñ:Ð<QÓRÐRÜ	ŒÜ�w‰w�|‰|Ü×ÑÓ!¤7§?¡?Ó#4Ð6Kó
ð 	
ô �w‰w�|‰|œBŸI™I›KÐ)>Ó?Ð?ó    >   Úrepro_afterÚrepro_levelÚconstant_functionsr/   Ú 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_COLLECTIVESz7pytorch/remote_cache:enable_local_automatic_dynamic_pgoÚ(TORCH_DYNAMO_AUTOMATIC_DYNAMIC_LOCAL_PGO)rG   Úenv_name_forcerF   Ú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)rF   rG   Úenv_name_defaultÚ_custom_ops_profileÚ'enable_invoke_subgraph_regional_compileÚ#invalidate_compile_context_weakrefs)Ú*Úchangesc                   ó   — y )N© )r|   s    rV   Ú_make_closure_patcherr   c  s   € °crX   )·Ú__doc__rR   rL   ÚsysÚ	sysconfigrP   Úcollections.abcr   Úos.pathr   r   Útypingr   r   r   r	   r
   Útorch._environmentr   Útorch.utils._config_moduler   r   r   r   ÚstrÚ__annotations__rM   ÚgetÚverboseÚverify_correctnessr   r   Úleaf_function_validate_outputsÚ%leaf_function_check_escaped_gradientsÚminimum_call_countÚdead_code_eliminationÚreplay_side_effectsÚside_effect_replay_policyÚrecompile_limitÚaccumulated_recompile_limitÚ*skip_code_recursive_on_recompile_limit_hitÚfail_on_recompile_limit_hitr   Úintr   r   Úboolr    Úspecialize_intÚspecialize_floatÚdynamic_shapesÚuse_lazy_graph_moduleÚassume_static_by_defaultÚautomatic_dynamic_shapesr%   Ú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Úcprofiler.   r/   ÚdictÚ*allowed_functions_module_string_ignorelistrY   rZ   Ú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_moduler@   rB   Úskip_torchrecÚdont_skip_tracingÚoptimize_ddp_lazy_compileÚ#use_lamba_guard_for_object_aliasingÚskip_fsdp_guardsÚskip_fsdp_hooksÚ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_faithful_generator_behaviorÚinline_inbuilt_nn_modulesÚnested_graph_breaksÚ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_countrW   Ú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_metricsr]   r^   r_   Ú+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_checkpointrk   Úenable_compiler_collectivesro   rq   Ú_unsafe_skip_fsdp_module_guardsrt   Úget_config_varÚrun_gc_after_compileÚ'constant_fold_autograd_profiler_enabledÚwrap_top_frameÚrecord_runtime_overheadÚenable_aot_compilerx   ry   rz   Útorch.utils._config_typingr   ÚmodulesÚ__name__r~   rX   rV   Ú<module>r
     so  ðò
ó Û 	Û 
Û Û Ý $ß $ß ?Õ ?å (ß VÑ Vð  $€ˆx˜‰}Ó #ð �*‰*�.‰.Ð.°Ó
4¸Ñ
;€ð Ð ð !Ÿj™jŸn™nÐ-NÐPRÓSÐ ˜Ó Sð ')§j¡j§n¡nØ-¨ró'Ð  ó ð "'Ð ð ).Ð %ð Ð ð Ð ð Ð ð #Ð ð €ð "Ð ð .2Ð *ð $Ð áÐ%KÔLÐ �#Ó LÙ$*Ø
<ô%Ð ˜có ñ
 06Ø
Kô0Ð &¨ó ñ !'Ø
<ô!Ð ˜ó ð €ð
 Ð ð €ð ‡J�J‡N�NÐ8¸#Ó>À#ÑEð ð  Ð ð ‡J�J‡N�NÐ:¸CÓ@ÀCÑGð ð
 DMÐ   'Ð*?Ñ"@Ó Lð "Ð ð !%Ð ð
 *.Ð &ð "Ð ð Ð ð $(Ð  ð
 —:‘:—>‘>Ð"@À#ÓFÈ#ÑMÐ ñ /2«eÐ ˜S  c¡™^Ó 3ñ 25³Ð   D¨¡I¡Ó 6ñ �r—z‘z—~‘~Ð&CÀUÓKÓL€ð
 Ÿ
™
Ÿ™Ð'DÀcÓJÈcÑQÐ ð $(Ð  ð �*‰*�.‰.Ð0°#Ó
6¸#Ñ
=€ð �:‰:�>‰>Ð2°EÓ:€ð !Ÿj™jŸn™nÐ-LÈeÓT€�˜‘Ó Tð 57Ð ! 4¨¨S¨¡>Ó 6ðò&.Ð *ð �j‰j�n‰nÐ6¸Ó=€ñ �"—*‘*—.‘.Ð!:¸AÓ>Ó?€ð —Z‘Z—^‘^Ð$DÓEÈÑLÐ ð
 €ð —j‘j—n‘nÐ%FÓGÈ3ÑNÐ ð  Ð ð
 Ÿ™Ÿ™Ð(LÓMÐQTÑTÐ ð ‡J�J‡N�NÐAÀ3ÓGÈ3ÑNð !ð
 /4Ð +ð 7<Ð 3ð !&Ð ð4 	ð ˆeØØð	ñðñó 	ð  ‡J�J‡N�NÐ=¸sÓCÀsÑJð ˜Tó ð
 €ð Ð ð "Ð ð '+Ð #ð Ð ð €ð
 !Ð ð 04Ð ,ð .2Ð *ð )-Ð %ð& -1Ð )ð &*Ð "ð 47Ð 0ð "Ð ð  %Ð ð !Ð ð  Ð ð
 !&Ð ð €	ñ '›[˜Ð ð
 Ð ð Ð ñ ‘7™7¡7¨8Ó#4Ó5Ó6Ó7€ð €ð Ð ð  Ð Ø$Ð ØÐ ð  Ð ð  Ð ð $)Ð  ð Ð ð Ð ð &*Ð "ñ #ØØ9ôÐ ð Ð ð 7<Ð 3ð
 Ð ð #'Ð ð %)Ð !ð  Ð ð !&Ð ð !Ð ð
 Ð ð Ð ð !Ð ð */Ð &ð
 !&Ð ð ).Ð %ð
@ ó 
@ñ (Ó)€òÐ ð ).Ð %ð ,1Ð (ð  %Ð ð !Ð ð Ð ð */Ð   $Ó .ð Ð ñ =@»EÐ ˜s 8¨S¨E°4¨KÑ#8Ñ9Ó Añ 58³EÐ ˜#˜h s¨C xÑ0Ñ1Ó 9ñ 28Ø
9ô2Ð �s˜8 C¨ HÑ-Ñ.ó ð /4Ð +ò-Ð )ò9Ð 5ð ‡J�J‡N�NÐ5°sÓ;¸sÑBð ð ‡J�J‡N�NÐ@À#ÓFÈ#ÑMð %ð &*Ð "ð —Z‘Z—^‘^Ð$>ÀÓDÈÑKÐ à—J‘J—N‘NÐ#<¸cÓBÀcÑIÐ ð Ð ð  $Ð ð  $Ð ð '+Ð #ð 16Ð -ð 57Ð ! 4¨¨S¨¡>Ó 6ðð: !Ÿj™jŸn™nÐ-IÈ3ÓOÐSVÑVÐ ñ. %+ØFØ=Øô%Ð ˜Tó ñ 0@Ø/ó0Ð ˜h t™nó ð ‡J�J‡N�NÐ3°SÓ9¸SÑ@ð  ð
 (*§z¡z§~¡~Ð6MÈtÓ'TÐ �x ‘}Ó Tñ à$ˆI×$Ò$Ð%6Ó7¸1Ñ<Ø;Ø8ô	Ð ð +0Ð 'ð €ð Ð àÐ ð &*Ð �X˜c‘]Ó )ð 16Ð '¨Ó 5ð 7;Ð # X¨d¡^Ó :áÜ,à9¨Ð9°Ó9ñ �c—k’k (Ñ+Õ ,rX   