~L iBu UdZddlZddlZddlZddlZddlmZmZddlm Z m Z m Z m Z m Z mZddlmZddlmZmZmZdZe eed<ej0j3dd d k(Zd Zd Zd ZdZdZd Z d Z!edZ"e#ed<edZ$e#ed<edZ%e&ed<edZ'e&ed<d Z(d Z)d Z*ej0j3dd d k(Z+d Z,d Z-dZ.e ded<d Z/d Z0d Z1d Z2d Z3d Z4ej0j3dd d k(Z5e6Z7e6e8e ed<e6Z9e6e8e ed<e&ej0j3d d Z:ej0j3d!d d k(Z;d ZiZ?e@e e fed$<hd%ZAej0j3d&dZBe#ej0j3d'd(ZCej0j3d)d k(ZDd*ZEej0j3d+d k(ZFd ZGej0j3d,d k(ZHej0j3d-d d k(ZId ZJd ZKd ZLd ZMee&e d.fed/<ej0j3d0d d k(ZNe&ed1<d ZOd ZPd ZQd ZRd ZSd ZTd ZUd ZVd ZWd ZXd ZYd ZZdZ[d Z\d Z]d Z^d Z_d Z`erd nd Zad Zbd ZceeeeedZed Zfd2Zgd3Zhd4Zid Zjd Zkd Zld Zmd Znd Zoed d56Zpd Zqd Zrd Zsd Ztd Zud Zvd Zwd Zxd Zyd Zzd Z{d Z|d7efd8Z}e}Z~hd9Zd Zd Zd Zd Zd Zd Ze6Ze6e e gdfed:<e6Ze6e d;e fed<<d Zgd=Zgd>Zej0j3d?d d k(Zej0j3d@d d k(Zd Zej0j3dAd d k(Zej0j3dBd d k(Zd Zd ZiZe@ee fedC<ej0j3dDd d k(ZedEdFd GZe&edH<edIZe e&edJ<ej0j3dKd d k(Zej0j3dLdZe eedM<ed dNdOPZd Zd Zd ZdZe e edQ<e r ddRldSe d7e fdTZeej>ey)Uaq 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)abspathdirname)AnyCallableLiteralOptional TYPE_CHECKINGUnion) is_fbcode)Configget_tristate_envinstall_config_module log_file_nameTORCHDYNAMO_VERBOSE01FTz$torch._dynamo.config.recompile_limit)aliascache_size_limitz0torch._dynamo.config.accumulated_recompile_limitaccumulated_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_hitfail_on_cache_limit_hit#TORCH_COMPILE_USE_LAZY_GRAPH_MODULEdynamic)runbacked automatic_dynamic_shapes_mark_asTORCHDYNAMO_PREPARE_FREEZINGtraceable_tensor_subclassesnontraceable_tensor_subclassesTORCHDYNAMO_SUPPRESS_ERRORSTORCH_COMPILE_REPLAY_RECORDTORCH_COMPILE_DISABLETORCH_COMPILE_CPROFILE!skipfiles_inline_module_allowlist> torch._refs torch._prims torch._decomp torch.testingtorch.distributionsTORCHDYNAMO_REPRO_AFTERTORCHDYNAMO_REPRO_LEVELTORCHDYNAMO_REPRO_FORWARD_ONLYgMbP?TORCHDYNAMO_REPRO_IGNORE_NON_FP"TORCHDYNAMO_CAPTURE_SCALAR_OUTPUTS,TORCHDYNAMO_CAPTURE_DYNAMIC_OUTPUT_SHAPE_OPS) ddp_optimizerpython_reducer'python_reducer_without_compiled_forwardno_optimization optimize_ddp(TORCH_DYNAMO_DO_NOT_EMIT_RUNTIME_ASSERTSdo_not_emit_runtime_assertsfloat64 complex128int64z*pytorch/compiler:inline_inbuilt_nn_modules)defaultjustknobreturncd}|tjvr1tjjtj|dSt rEtjjt j tjdStjjtjdS)NTORCH_COMPILE_DEBUG_DIRtorch_compile_debug) osenvironpathjoinr tempfile gettempdirgetpassgetusergetcwd)DEBUG_DIR_VAR_NAMEs Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/_dynamo/config.pydefault_debug_dir_rootrNs2RZZ'ww||BJJ'9:??> repro_after repro_levelconstant_functionsr&reorderable_logging_functions.ignore_logger_methods)layoutis_negis_conj is_pinned)stridestorage_offset is_contiguous TORCH_FAKE_TENSOR_DISPATCH_CACHE+TORCH_FAKE_TENSOR_DISPATCH_CACHE_CROSSCHECKTORCH_CACHING_PRECOMPILETORCH_STRICT_PRECOMPILE!compiled_autograd_kwargs_overrideTORCH_COMPILER_COLLECTIVESz7pytorch/remote_cache:enable_local_automatic_dynamic_pgo(TORCH_DYNAMO_AUTOMATIC_DYNAMIC_LOCAL_PGO)r>env_name_forcer=automatic_dynamic_local_pgo)TORCH_DYNAMO_AUTOMATIC_DYNAMIC_REMOTE_PGOautomatic_dynamic_remote_pgoUNSAFE_SKIP_FSDP_MODULE_GUARDSPT2_COMPILE_ID_PREFIXpt2_compile_id_prefixz,pytorch/compiler:enable_run_gc_after_compile!TORCH_DYNAMO_RUN_GC_AFTER_COMPILE)r=r>env_name_default_custom_ops_profile)*changesc y)N)rns rM_make_closure_patcherrqsrO)__doc__rIrCsysrGos.pathrrtypingrrrrr r torch._environmentr torch.utils._config_moduler r rrstr__annotations__rDgetverboseverify_correctnessminimum_call_countdead_code_eliminationrecompile_limitaccumulated_recompile_limit*skip_code_recursive_on_recompile_limit_hitfail_on_recompile_limit_hitrintrrboolrspecialize_intspecialize_floatdynamic_shapesuse_lazy_graph_moduleassume_static_by_defaultautomatic_dynamic_shapesrlog_graph_in_out_metadataforce_parameter_static_shapes&force_nn_module_property_static_shapesallow_ignore_mark_dynamicguard_nn_modules guard_nn_modules_using_dict_tagsprepare_freezingsetr typer!suppress_errorsreplay_record_enabled rewrite_assert_with_torch_assertdisablecprofiler&dict*allowed_functions_module_string_ignorelistrPrQrepro_forward_onlyrepro_tolerancerepro_ignore_non_fpsame_two_models_use_fp64capture_scalar_outputs capture_dynamic_output_shape_ops+prefer_deferred_runtime_asserts_over_guards3force_unspec_int_unbacked_size_like_on_torchrec_kjtallow_unspec_int_on_nn_moduler7r9 skip_torchrecdont_skip_tracingoptimize_ddp_lazy_compile#use_lamba_guard_for_object_aliasingskip_fsdp_guardsskip_fsdp_hooksskip_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_guards0max_saved_pointers_for_recursive_dict_tags_checkraise_on_ctx_manager_usageraise_on_unsafe_aot_autograderror_on_nested_jit_traceerror_on_nested_fx_trace allow_rnncapture_sparse_computeerror_on_recompilereport_guard_failures__file__base_dir trace_numpynumpy_default_floatnumpy_default_complexnumpy_default_intuse_numpy_random_streamenable_cpp_guard_manager enable_cpp_symbolic_shape_guardsenable_trace_contextlibenable_trace_unittest"enable_faithful_generator_behaviorinline_inbuilt_nn_modulesnested_graph_breaksinstall_free_tensors!enable_cpp_framelocals_guard_evaluse_graph_deduplicationtrack_nodes_for_deduplicationgraph_deduplication_lintissue_3_13_0_warningallow_empty_graphsdebug_force_nested_calls&debug_force_graph_break_on_leaf_returndebug_disable_compile_counter%record_compile_time_instruction_countrNdebug_dir_root_save_config_ignore%cudagraph_backend_keep_input_mutation(cudagraph_backend_support_input_mutationonly_allow_pt2_compliant_opscapture_autograd_functioncapture_func_transformslog_compilation_metricsrSrT+inject_BUILD_SET_unimplemented_TESTING_ONLY)_autograd_backward_strict_mode_banned_ops5_autograd_backward_strict_mode_conditional_banned_opsfake_tensor_cache_enabled$fake_tensor_cache_crosscheck_enabled"fake_tensor_disable_inference_modecaching_precompilestrict_precompilecompiled_autogradgraph_break_on_nn_param_ctorr`enable_compiler_collectivesrdrf_unsafe_skip_fsdp_module_guardsrirun_gc_after_compilewrap_top_framerecord_runtime_overheadenable_aot_compilerltorch.utils._config_typingrqmodules__name__rprOrMrs(  $II(VV $ x}# **... 4 ;".2*$%KL#L$* <%c 06 K0&!' <! JJNN8#>#E   DM '*?"@L " !% *.&"$( ::>>"@#F#M/2eSc^325DI6rzz~~&CUKL  'DcJcQ$(  **..0# 6# = ::>>2E :57!4S>6 .*jjnn6= "**..!:A>? ZZ^^$DEL jjnn%FG3N  (LMQTTJJNNA3G3N! /4+7<3!&4  e   JJNN=sCsJT  "'+# ! 04,.2*)-%&-1)&*"470" %!   #,+4  7778#456 7  $  $) &*"#  9 %)! !&! !*/& !&).% @ @()).%,1( %! =@Es8SE4K#89A 25s8CH-.6/4+-)95JJNN5s;sB JJNN@#F#M% &*"ZZ^^$>DKJJNN#6!jjnn-I3OSVV.%+ F= %T0@/0htn JJNN3S9S@ (*zz~~6Mt'Tx}T  ;8&*Xc]),999ckk(+,rO