a
    hY                 z  @   s`
  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ZddlZddlZddl	Z	ddl
Z
ddlZddlZddl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 ddlmZmZmZmZm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" dd	l#m$Z$ dd
l%m&Z& ddl'm(Z(m)Z)m*Z*m+Z+ ddl,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7 dZ8eej9 e:d< zddl;Z8W n e<y   Y n0 ej=rddl>m?Z? de5de5de5de5de5de5de5de5de5de5de5de5de5de5de5de5de5d e5d!e6d"e5d#e5d$e5d%e4d&e4d'e4d(e4d)e4d*e4d+e4d,e4d-e4d.e4d/e4d0e4d1e4d2e5d3e5d4e4d5e5d6e6d7e6d8e6d9e6d:e6d;e5d<e5d=e5d>e5d?e5d@e5dAe5dBe5dCe6dDe4dEe4dFe5dGe4dHe5dIe4dJe4dKe4dLe4dMe4dNe4dOe4dPe4dQe4dRe4dSe4dTe4dUe4dVe4dWe4dXe4dYe4dZe4d[e4d\e5d]e6d^e6d_e6d`e6dae6dbe6dce6dde6dee6dfe6dge6dhe6die6dje6dke6dle6dme6dne6doe6dpe6dqe/dre6dse/dte6due6dve6dwe6dxe6dye6dze6d{e6d|e6d}e6d~e/de6de6de6de/de6de6de6de/de6de6de6de6de6de6de6de6de/de/de6de6de/de.de5de6de6de6de6de6de6de6de5de5de5de5de5de5de5de5de5de5de5de6de6de6de6de6de6de6de6de6de6de5de5de5de5de5de5de5de5de5de5de5de6de4de4de4de4de4de5de4de4de6de& e6de6de& e6de6de& e6iZ@eAeBef e:d< eACg d͢e5ZDejEdkre5eDd< e5eDd< eACg dѢe5ZFe@eDeFgZGejHeAeeId f dӜddՄZJddׄ ZKddل ZLejHddۄ ZMdd݄ ZNG dd߄ d߃ZOeOeAePeBf dӜddZQeOeAePeBf dӜddZReOeAePeBf dӜddZSeOeAePeBf dӜddZTeOeUeP dӜddZVeOeAePeBf dӜddZWeOeAePeBf dӜddZXeeYZZeAeBeYeg df  f e:d< eBeg df ddddZ[e\ddddZ]e^dӜddZ_e^dӜddZ`e^dӜddZae^dӜddZbe^dӜddZce^dӜdd Zde^dӜddZee^dӜddZfe^dӜddZge^dӜddZheeeeee	fZid	Zjd
d Zkdd Zlej9dddZmh dZnejop r|enh dO Zne$jqs|enrd g dZseteUesesksJ eUesZsejop resrd e$jqsesrd g dZueteUeueuksJ eUeuZuejHdd ZvejHdd ZwejHdd Zxdddeke"jyd gZzez{e|eke}de|emei e~d!aeU ZeUeB e:d"< e~d#d$e|eje d%Zh d&Ze~d#d$d'd( eD  d%Zd)hZe~d#d$d*d( eD  d%Zeme d+hZd,d- ZeBd.d/d0ZrejG d1d2 d2ZdNd4d5ZejG d6d7 d7ZdOd8d9ZdPd:d;ZejD ]Zere 	qe  d<d= ZejHd>d? Zd@dA ZdBdC ZdDdE ZdQedeUeB f dGdHdIZdRedeUeB f dGdJdKZdLdM ZdS (S  a  
Tracing rules and policies for TorchDynamo compilation decisions.

This module defines the rules that govern what code TorchDynamo should trace and compile
versus what should be executed eagerly. It contains functions and classes that determine:

- Which modules, functions, and objects should be skipped during tracing
- Which parts of the code should cause graph breaks
- How to handle different Python libraries and third-party packages
- Rules for determining when to inline functions vs calling them eagerly

Key components:
- Skip rules: Functions that return True if an object should be skipped during tracing
- Inlining rules: Policies for when to inline function calls during compilation
- Library-specific handling: Special cases for popular Python packages
- Performance heuristics: Rules that balance compilation overhead vs runtime benefits

These rules are critical for TorchDynamo's ability to automatically determine
compilation boundaries and optimize PyTorch programs effectively.
    N)defaultdict)Path)AnyCallablecastOptionalUnion)	is_fbcode)_config_module   )config)TORCH_DYNAMO_RESUME_IN_PREFIX)getfilehashableNP_SUPPORTED_MODULESunwrap_if_wrapper)BuiltinVariableFunctionalCallVariableFunctorchHigherOrderVariableLocalGeneratorFunctionVariableLocalGeneratorObjectVariableNestedUserFunctionVariablePolyfilledFunctionVariableSkipFunctionVariableTorchInGraphFunctionVariableUserFunctionVariableUserMethodVariablenp)VariableTrackerztorch.onnx.is_in_onnx_exportz$torch.onnx.operators.shape_as_tensorztorch.overrides.is_tensor_likeztorch.jit.is_scriptingztorch.jit.is_tracingztorch.jit.annotateztorch.distributed.is_availablez torch.distributed.is_initializedztorch.distributed.get_rankz torch.distributed.get_world_sizez0torch.distributed.tensor._api.DTensor#from_localz:torch.distributed.distributed_c10d._get_group_size_by_namezGtorch.distributed.distributed_c10d._resolve_group_name_by_ranks_and_tagz1torch.distributed.distributed_c10d._get_group_tagz:torch.distributed.distributed_c10d.get_process_group_ranksztorch._utils.is_compilingz&torch.fx._symbolic_trace.is_fx_tracingz)torch._dynamo.external_utils.is_compilingzLtorch._dynamo.utils._disable_side_effect_safety_checks_for_current_subtracerztorch.compiler.is_compilingz"torch.compiler.is_dynamo_compilingztorch.compiler.is_exportingz torch.autograd._profiler_enabledztorch._C._to_dlpackztorch.to_dlpackz!torch.default_generator#get_stateztorch._C.Generator#get_stateztorch.get_rng_stateztorch.cuda.get_rng_statez!torch.default_generator#set_stateztorch._C.Generator#set_stateztorch.set_rng_stateztorch.cuda.set_rng_stateztorch.manual_seedz'torch.nn.utils.rnn.pack_padded_sequenceztorch.nn.Parameterztorch.nn.Bufferztorch._nested_tensor_from_maskz7torch.nested._internal.nested_tensor.nested_from_paddedz&torch.nested.nested_tensor_from_jaggedz&torch.nested.nested_tensor_from_paddedztorch.fx.node.map_aggregateztorch.fx.node.map_argz+torch.fx.immutable_collections._no_mutationtorch.sym_nottorch.sym_floattorch.sym_inttorch.sym_maxtorch.sym_minztorch.sym_sqrttorch.sym_iteztorch.sym_sumztorch.sym_fresh_sizez#torch.Tensor#_make_wrapper_subclassztorch.Tensor#__init__ztorch.Tensor#splitztorch.cuda.set_deviceztorch.cuda.current_devicez#torch._C.autocast_decrement_nestingz#torch._C.autocast_increment_nestingztorch.autograd.gradztorch.autograd.backwardztorch._C.clear_autocast_cachez,torch.distributions.constraints.is_dependentztorch.jit.isinstanceztorch._C.set_anomaly_enabledz#torch._C.set_autocast_cache_enabledztorch._C.set_autocast_cpu_dtypez!torch._C.set_autocast_cpu_enabledztorch._C.set_autocast_enabledztorch._C.set_autocast_gpu_dtypeztorch._C.set_autocast_ipu_dtypez!torch._C.set_autocast_ipu_enabledztorch._C.set_autocast_xla_dtypez!torch._C.set_autocast_xla_enabledztorch.resize_as_ztorch.resize_as_sparse_ztorch.get_default_devicez(torch._functorch.vmap._check_int_or_nonez:torch._functorch.vmap._check_out_dims_is_int_or_int_pytreez+torch._functorch.vmap._check_randomness_argz#torch._functorch.vmap._chunked_vmapz-torch._functorch.vmap._concat_chunked_outputsz,torch._functorch.vmap._create_batched_inputsz torch._functorch.vmap._flat_vmapz,torch._functorch.vmap._flatten_chunks_outputz)torch._functorch.vmap._get_chunked_inputsztorch._functorch.vmap._get_namez-torch._functorch.vmap._maybe_remove_batch_dimz"torch._functorch.vmap._num_outputsz-torch._functorch.vmap._process_batched_inputsz%torch._functorch.vmap._unwrap_batchedz2torch._functorch.vmap._validate_and_get_batch_sizez8torch._functorch.vmap.doesnt_support_saved_tensors_hooksz%torch._functorch.vmap.get_chunk_sizesz"torch._functorch.vmap.restore_vmapztorch._functorch.apis.vmapz$torch._functorch.vmap.unwrap_batchedztorch._functorch.vmap.vmap_implz"torch._functorch.vmap.wrap_batchedz+torch._functorch.eager_transforms.grad_implz$torch._functorch.apis.grad_and_valuez+torch._functorch.eager_transforms._as_tuplez9torch._functorch.eager_transforms._check_unique_non_emptyz8torch._functorch.eager_transforms._create_differentiablez0torch._functorch.eager_transforms._slice_argnumsz=torch._functorch.eager_transforms._undo_create_differentiablez;torch._functorch.eager_transforms._validate_and_wrap_argnumz<torch._functorch.eager_transforms._validate_and_wrap_argnumsz3torch._functorch.eager_transforms._wrap_all_tensorsz7torch._functorch.eager_transforms._wrap_tensor_for_gradz(torch._functorch.eager_transforms.jacrevz2torch._functorch.eager_transforms.error_if_complexz>torch._functorch.eager_transforms._chunked_standard_basis_for_z2torch._functorch.eager_transforms._safe_zero_indexz%torch._functorch.eager_transforms.vjpz3torch._functorch.eager_transforms._vjp_with_argnumsz@torch._functorch.eager_transforms.assert_non_empty_tensor_outputz3torch._functorch.eager_transforms._jvp_with_argnumsz%torch._functorch.eager_transforms.jvpz/torch._functorch.eager_transforms._replace_argsz2torch._functorch.eager_transforms.safe_unpack_dualzBtorch._functorch.eager_transforms.assert_non_empty_list_of_tensorszDtorch._functorch.eager_transforms.assert_output_is_tensor_or_tensorsz*torch.autograd.forward_ad.enter_dual_levelz)torch.autograd.forward_ad.exit_dual_levelz#torch.autograd.forward_ad.make_dualz%torch.autograd.forward_ad.unpack_dualz+torch._functorch.eager_transforms.linearizez(torch._functorch.eager_transforms.jacfwdz?torch._functorch.eager_transforms._construct_standard_basis_forz0torch._functorch.eager_transforms.safe_unflattenz)torch._functorch.eager_transforms.hessianz0torch._functorch.functional_call.functional_callz(torch.nn.utils.stateless._groupby_tensorztorch._functorch.deprecated.jvpz#torch._functorch.deprecated.hessianz"torch._functorch.deprecated.jacfwdz"torch._functorch.deprecated.jacrevz torch._functorch.deprecated.gradz*torch._functorch.deprecated.grad_and_valueztorch._functorch.deprecated.vjpz"torch._C._functorch._add_batch_dimz%torch._C._functorch._remove_batch_dimz"torch._C._functorch._wrap_for_gradz$torch._C._functorch._unwrap_for_gradz#torch._C._functorch._unwrap_batchedz!torch._C._functorch.current_levelz'torch._C._functorch.maybe_current_levelz$torch._C._functorch.is_batchedtensorz*torch._C._functorch.peek_interpreter_stackz"torch._C._functorch.unwrap_if_deadz0torch._functorch.pyfunctorch.coerce_cinterpreterz;torch._higher_order_ops.triton_kernel_wrap.do_prune_configsz/torch._higher_order_ops.foreach_map.foreach_mapztorch._constrain_as_sizeztorch._tensor._convertztorch.jit._unwrap_optionalz'torch.backends.mha.get_fastpath_enabledztorch._dynamo.dont_skip_tracingztorch._dynamo.mark_staticztorch._dynamo.nonstrict_tracez!torch._dynamo.patch_dynamo_configz:torch.fx.experimental.symbolic_shapes.guard_size_obliviousz3torch.fx.experimental.symbolic_shapes.guard_or_truez4torch.fx.experimental.symbolic_shapes.guard_or_falsez;torch.fx.experimental.symbolic_shapes.statically_known_truez<torch.fx.experimental.symbolic_shapes.statically_known_falsez-torch.fx.experimental.symbolic_shapes.sym_andz,torch.fx.experimental.symbolic_shapes.sym_orz2torch.fx.experimental.symbolic_shapes.guard_scalarz6torch.fx.experimental.symbolic_shapes.has_static_valuez!torch.cuda._get_device_propertiesztorch.utils.hooks.BackwardHookztorch.set_default_deviceztorch.sparse_bsc_tensorztorch.sparse_bsr_tensorztorch.sparse_csc_tensorztorch.sparse_csr_tensorztorch.sparse_compressed_tensorz.torch._C._autograd._unsafe_set_version_counterztorch.xpu.get_rng_stateztorch.xpu.set_rng_statez.torch/testing/_internal/common_fsdp.py#forwardz'torch/testing/_internal/common_fsdp.py#zEtorch/testing/_internal/distributed/_tensor/common_dtensor.py#forwardz>torch/testing/_internal/distributed/_tensor/common_dtensor.py#z5torch/testing/_internal/common_distributed.py#forwardz.torch/testing/_internal/common_distributed.py#manual_torch_name_rule_map(  z	math.acosz
math.acoshz	math.asinz
math.asinhz	math.atanz
math.atan2z
math.atanhz	math.ceilz	math.combzmath.copysignzmath.cosz	math.coshzmath.degreesz	math.distzmath.erfz	math.erfczmath.expz
math.expm1z	math.fabszmath.factorialz
math.floorz	math.fmodz
math.frexpz	math.fsumz
math.gammazmath.gcdz
math.hypotzmath.isclosezmath.isfinitez
math.isinfz
math.isnanz
math.isqrtzmath.lcmz
math.ldexpzmath.lgammazmath.logz
math.log10z
math.log1pz	math.log2z	math.modfzmath.nextafterz	math.permzmath.powz	math.prodzmath.radianszmath.remainderzmath.sinz	math.sinhzmath.tanz	math.tanhz
math.trunczmath.ulpztorch._adaptive_avg_pool2dztorch._adaptive_avg_pool3dztorch._add_batch_dimztorch._add_relu_ztorch._add_reluztorch._addmm_activationztorch._aminmaxz0torch._amp_foreach_non_finite_check_and_unscale_ztorch._amp_update_scale_ztorch._assert_asyncztorch._assert_tensor_metadataztorch._batch_norm_impl_indexz$torch._C._accelerator_getAcceleratorz$torch._C._accelerator_getDeviceIndexztorch._C._accelerator_getStreamztorch._C._accelerator_setStreamz'torch._C._accelerator_synchronizeDeviceztorch._C._activate_gpu_traceztorch._C._add_cached_tensorztorch._C._add_docstrz)torch._C._are_functorch_transforms_activeztorch._C._autograd_initztorch._C._awaitable_nowaitztorch._C._awaitable_waitztorch._C._awaitablez3torch._C._backport_for_mobile_from_buffer_to_bufferz)torch._C._backport_for_mobile_from_bufferz'torch._C._backport_for_mobile_to_bufferztorch._C._backport_for_mobileztorch._C._broadcast_coalescedztorch._C._broadcast_outztorch._C._broadcastztorch._C._c10d_initz6torch._C._calculate_package_version_based_on_upgradersz!torch._C._can_use_flash_attentionz)torch._C._can_use_mem_efficient_attentionz!torch._C._can_use_cudnn_attentionztorch._C._check_onnx_protoz(torch._C._check_sparse_tensor_invariantsztorch._C._collect_allztorch._C._commit_updatez%torch._C._compile_graph_to_code_tablez9torch._C._construct_CUDA_Tensor_From_Storage_And_Metadataz-torch._C._construct_storage_from_data_pointerz.torch._C._conv_determine_backend_memory_format torch._C._cpu._is_avx2_supported"torch._C._cpu._is_avx512_supported'torch._C._cpu._is_avx512_vnni_supported'torch._C._cpu._is_avx512_bf16_supported$torch._C._cpu._is_amx_tile_supported$torch._C._cpu._is_amx_fp16_supportedztorch._C._cpu._init_amxztorch._C._crash_if_aten_asanztorch._C._crash_if_csrc_asanztorch._C._crash_if_csrc_ubsanz%torch._C._crash_if_debug_asserts_failztorch._C._crash_if_vptr_ubsanz$torch._C._create_function_from_graphz.torch._C._create_function_from_trace_with_dictz$torch._C._create_function_from_tracez!torch._C._create_graph_by_tracingz!torch._C._create_module_with_typez!torch._C._create_object_with_typez,torch._C._cuda_attach_out_of_memory_observerz/torch._C._cuda_beginAllocateCurrentStreamToPoolz"torch._C._cuda_canDeviceAccessPeerz%torch._C._cuda_changeCurrentAllocatorz'torch._C._cuda_checkPoolLiveAllocationsz$torch._C._cuda_clearCublasWorkspacesz-torch._C._cuda_cudaCachingAllocator_raw_allocz.torch._C._cuda_cudaCachingAllocator_raw_deletez:torch._C._cuda_cudaCachingAllocator_set_allocator_settingsz torch._C._cuda_cudaHostAllocatorztorch._C._cuda_customAllocatorztorch._C._cuda_emptyCachez torch._C._cuda_endAllocateToPoolztorch._C._cuda_exchangeDevicez-torch._C._cuda_get_conv_benchmark_empty_cachez(torch._C._cuda_get_cudnn_benchmark_limitz"torch._C._cuda_get_sync_debug_modeztorch._C._cuda_getAllocatorz"torch._C._cuda_getAllocatorBackendztorch._C._cuda_getArchFlagsz!torch._C._cuda_getCheckpointStatez!torch._C._cuda_getCompiledVersionz#torch._C._cuda_getCurrentBlasHandlez"torch._C._cuda_getCurrentRawStreamztorch._C._cuda_getCurrentStreamztorch._C._cuda_getDefaultStreamztorch._C._cuda_getDeviceztorch._C._cuda_getDeviceCountz torch._C._cuda_hasPrimaryContextztorch._C._cuda_hostMemoryStatsztorch._C._cuda_initztorch._C._cuda_ipc_collectz'torch._C._cuda_isCurrentStreamCapturingztorch._C._cuda_isHistoryEnabledztorch._C._cuda_isInBadForkz2torch._C._cuda_jiterator_compile_and_launch_kernelztorch._C._cuda_lock_mutexz"torch._C._cuda_maybeExchangeDeviceztorch._C._cuda_memorySnapshotztorch._C._cuda_memoryStatsz+torch._C._cuda_record_memory_history_legacyz$torch._C._cuda_record_memory_historyztorch._C._cuda_releasePoolz.torch._C._cuda_resetAccumulatedHostMemoryStatsz*torch._C._cuda_resetAccumulatedMemoryStatsz'torch._C._cuda_resetPeakHostMemoryStatsz#torch._C._cuda_resetPeakMemoryStatsz(torch._C._cuda_set_cudnn_benchmark_limitz"torch._C._cuda_set_sync_debug_modez%torch._C._cuda_setCheckpointPoolStateztorch._C._cuda_setDevicez torch._C._cuda_setMemoryFractionztorch._C._cuda_setStreamztorch._C._cuda_sleepztorch._C._cuda_synchronizeztorch._C._cuda_unlock_mutexz.torch._C._cudnn_set_conv_benchmark_empty_cachez!torch._C._cudnn.getCompileVersionz!torch._C._cudnn.getRuntimeVersionztorch._C._cudnn.getVersionIntztorch._C._current_autograd_nodez,torch._C._current_graph_task_execution_orderztorch._C._current_graph_task_idztorch._C._cxx_flagsz)torch._C._debug_get_fusion_group_inliningz7torch._C._debug_only_are_vmap_fallback_warnings_enabledz3torch._C._debug_only_display_vmap_fallback_warningsz.torch._C._debug_set_autodiff_subgraph_inliningz)torch._C._debug_set_fusion_group_inliningztorch._C._demanglez&torch._C._disabled_torch_dispatch_implztorch._C._dispatch_call_boxedz'torch._C._dispatch_check_all_invariantsz#torch._C._dispatch_check_invariantsztorch._C._dispatch_dump_tableztorch._C._dispatch_dumpz&torch._C._dispatch_find_dangling_implsz'torch._C._dispatch_find_schema_or_throwz#torch._C._dispatch_get_all_op_namesz3torch._C._dispatch_get_backend_keyset_from_autogradz5torch._C._dispatch_get_registrations_for_dispatch_keyz'torch._C._dispatch_has_backend_fallbackz7torch._C._dispatch_has_computed_kernel_for_dispatch_keyz2torch._C._dispatch_has_kernel_for_any_dispatch_keyz.torch._C._dispatch_has_kernel_for_dispatch_keyztorch._C._dispatch_has_kernelztorch._C._dispatch_is_alias_keyz'torch._C._dispatch_is_included_in_aliasz&torch._C._dispatch_is_main_interpreterz'torch._C._dispatch_isTensorSubclassLikez!torch._C._dispatch_key_for_deviceztorch._C._dispatch_key_nameztorch._C._dispatch_key_parseztorch._C._dispatch_key_setztorch._C._dispatch_keysz$torch._C._dispatch_keyset_full_afterztorch._C._dispatch_keyset_fullz#torch._C._dispatch_keyset_to_stringztorch._C._dispatch_libraryztorch._C._dispatch_num_backendsz7torch._C._dispatch_print_registrations_for_dispatch_keyztorch._C._dispatch_pystubz,torch._C._dispatch_set_report_error_callbackz/torch._C._dispatch_tls_is_dispatch_key_excludedz/torch._C._dispatch_tls_is_dispatch_key_includedz(torch._C._dispatch_tls_local_exclude_setz(torch._C._dispatch_tls_local_include_setz0torch._C._dispatch_tls_set_dispatch_key_excludedz0torch._C._dispatch_tls_set_dispatch_key_includedztorch._C._dist_autograd_initztorch._C._dump_local_tls_setztorch._C._dump_upgraders_mapz-torch._C._enable_mobile_interface_call_exportztorch._C._enter_dual_levelz#torch._C._error_if_any_worker_failsztorch._C._exit_dual_levelztorch._C._export_operator_listztorch._C._export_opnamesztorch._C._faulty_agent_initztorch._C._fft.fft_fftztorch._C._fft.fft_fft2ztorch._C._fft.fft_fftfreqztorch._C._fft.fft_fftnztorch._C._fft.fft_fftshiftztorch._C._fft.fft_hfftztorch._C._fft.fft_hfft2ztorch._C._fft.fft_hfftnztorch._C._fft.fft_ifftztorch._C._fft.fft_ifft2ztorch._C._fft.fft_ifftnztorch._C._fft.fft_ifftshiftztorch._C._fft.fft_ihfftztorch._C._fft.fft_ihfft2ztorch._C._fft.fft_ihfftnztorch._C._fft.fft_irfftztorch._C._fft.fft_irfft2ztorch._C._fft.fft_irfftnztorch._C._fft.fft_rfftztorch._C._fft.fft_rfft2ztorch._C._fft.fft_rfftfreqztorch._C._fft.fft_rfftnz#torch._C._free_And_Remove_DeleterFnztorch._C._freeze_moduleztorch._C._from_dlpackz'torch._C._functionality_to_backend_keysz-torch._C._functionalization_reapply_views_tlsztorch._C._fuse_to_static_moduleztorch._C._gather_outztorch._C._gatherz"torch._C._generate_upgraders_graphz$torch._C._get_autograd_fallback_modez'torch._C._get_backcompat_broadcast_warnz%torch._C._get_backcompat_keepdim_warnz$torch._C._get_blas_preferred_backendz-torch._C._get_caught_jit_exception_class_namez/torch._C._get_caught_jit_exception_original_msgz#torch._C._get_constant_bool_symnodeztorch._C._get_cpp_backtraceztorch._C._get_cpu_capabilityz;torch._C._get_cublas_allow_bf16_reduced_precision_reductionz;torch._C._get_cublas_allow_fp16_reduced_precision_reductionztorch._C._get_cublas_allow_tf32ztorch._C._get_cudnn_allow_tf32ztorch._C._get_cudnn_benchmarkz!torch._C._get_cudnn_deterministicztorch._C._get_cudnn_enabledz)torch._C._get_custom_class_python_wrapperztorch._C._get_default_devicez0torch._C._get_deterministic_algorithms_warn_onlyz&torch._C._get_deterministic_algorithmsz5torch._C._get_deterministic_fill_uninitialized_memoryztorch._C._get_dispatch_modeztorch._C._get_dispatch_stack_atztorch._C._get_file_formatztorch._C._get_flash_sdp_enabledz&torch._C._get_float32_matmul_precisionztorch._C._get_function_stack_atz%torch._C._get_graph_executor_optimizez&torch._C._get_linalg_preferred_backendz'torch._C._get_rocm_fa_preferred_backendztorch._C._get_math_sdp_enabledz0torch._C._get_math_sdp_allow_fp16_bf16_reductionz"torch._C._get_max_operator_versionz'torch._C._get_mem_efficient_sdp_enabledztorch._C._get_mkldnn_enabledztorch._C._get_cudnn_sdp_enabledztorch._C._set_sdp_use_cudnnz6torch._C._get_mobile_model_contained_types_from_bufferz*torch._C._get_mobile_model_contained_typesz0torch._C._get_model_bytecode_version_from_bufferz$torch._C._get_model_bytecode_versionz+torch._C._get_model_extra_files_from_bufferztorch._C._get_model_extra_filesz,torch._C._get_model_ops_and_info_from_bufferz torch._C._get_model_ops_and_infoz)torch._C._get_module_info_from_flatbufferztorch._C._get_nnpack_enabledztorch._C._get_obj_in_tlsz torch._C._get_operation_overloadz"torch._C._get_operator_version_mapz&torch._C._get_privateuse1_backend_nameztorch._C._get_qengineztorch._C._get_schemaz&torch._C._get_sm_carveout_experimentalztorch._C._get_nested_intztorch._C._get_tensor_metadataztorch._C._get_tracing_stateztorch._C._get_upgrader_rangesz!torch._C._get_upgraders_entry_mapz torch._C._get_upgraders_map_sizeztorch._C._get_value_tracez%torch._C._get_version_calculator_flagztorch._C._get_warnAlwaysztorch._C._graph_pool_handlez+torch._C._group_tensors_by_device_and_dtypez1torch._C._hack_do_not_use_clone_module_with_classztorch._C._has_distributedztorch._C._has_Standard_Deleterztorch._C._has_storagez"torch._C._has_tensorexpr_cpp_testsz"torch._C._run_tensorexpr_cpp_testsz"torch._C._has_torch_function_unaryz%torch._C._has_torch_function_variadicztorch._C._has_torch_functionz'torch._C._import_ir_module_from_packageztorch._C._increment_versionztorch._C._infer_sizeztorch._C._init_namesztorch._C._initExtensionztorch._C._is_alias_ofz!torch._C._is_any_autocast_enabledztorch._C._is_cached_tensorz&torch._C._is_flash_attention_availableztorch._C._is_fwd_grad_enabledztorch._C._is_key_in_tlsz#torch._C._is_multithreading_enabledz#torch._C._is_torch_function_enabledz(torch._C._is_torch_function_mode_enabledz(torch._C._is_torch_function_all_disabledztorch._C._is_tracingz torch._C._is_view_replay_enabledztorch._C._is_xnnpack_enabledztorch._C._itt.is_availableztorch._C._itt.markztorch._C._itt.rangePopztorch._C._itt.rangePushz$torch._C._ivalue_debug_python_objectztorch._C._ivalue_tags_matchz torch._C._jit_assert_is_instancez$torch._C._jit_can_fuse_on_cpu_legacyztorch._C._jit_can_fuse_on_cpuztorch._C._jit_can_fuse_on_gpuz!torch._C._jit_cat_wo_conditionalsz$torch._C._jit_check_alias_annotationz"torch._C._jit_clear_class_registryz1torch._C._jit_debug_fuser_num_cached_kernel_specsz$torch._C._jit_debug_module_iteratorsz,torch._C._jit_decay_packed_param_input_typesz*torch._C._jit_decomposition_graph_for_nodeztorch._C._jit_differentiatez/torch._C._jit_erase_non_input_shape_informationztorch._C._jit_flattenz)torch._C._jit_fuser_get_fused_kernel_codeztorch._C._jit_get_all_schemasz&torch._C._jit_get_custom_class_schemasztorch._C._jit_get_emit_hooksz(torch._C._jit_get_inline_everything_modez torch._C._jit_get_logging_optionz#torch._C._jit_get_num_profiled_runsztorch._C._jit_get_operationz&torch._C._jit_get_schemas_for_operatorz/torch._C._jit_get_te_cuda_pointwise_block_countz.torch._C._jit_get_te_cuda_pointwise_block_sizez/torch._C._jit_get_te_cuda_pointwise_loop_levelsz(torch._C._jit_get_te_generate_block_codez&torch._C._jit_get_te_must_use_llvm_cpuz#torch._C._jit_get_tracer_state_warnztorch._C._jit_has_cpp_testsztorch._C._jit_initztorch._C._jit_interpret_graphz!torch._C._jit_is_onnx_log_enabledztorch._C._jit_is_script_objectztorch._C._jit_llga_enabledz$torch._C._jit_nvfuser_can_be_enabledz/torch._C._jit_nvfuser_clear_comparison_callbackztorch._C._jit_nvfuser_enabledz%torch._C._jit_nvfuser_horizontal_modez-torch._C._jit_nvfuser_set_comparison_callbackz&torch._C._jit_nvfuser_single_node_modez#torch._C._jit_object_is_non_holdingz0torch._C._jit_onnx_convert_pattern_from_subblockz)torch._C._jit_onnx_create_full_scope_namez(torch._C._jit_onnx_list_model_parametersztorch._C._jit_onnx_logztorch._C._jit_opt_conditionalsz-torch._C._jit_override_can_fuse_on_cpu_legacyz&torch._C._jit_override_can_fuse_on_cpuz&torch._C._jit_override_can_fuse_on_gpuztorch._C._jit_pass_autocastztorch._C._jit_pass_batch_mmz/torch._C._jit_pass_canonicalize_graph_fuser_opsztorch._C._jit_pass_canonicalizez*torch._C._jit_pass_complete_shape_analysisz'torch._C._jit_pass_concat_frozen_linearz*torch._C._jit_pass_constant_loop_unrollingz#torch._C._jit_pass_constant_poolingz7torch._C._jit_pass_constant_propagation_immutable_typesz'torch._C._jit_pass_constant_propagationz/torch._C._jit_pass_convert_frozen_ops_to_mkldnnz,torch._C._jit_pass_create_autodiff_subgraphsz+torch._C._jit_pass_create_functional_graphsztorch._C._jit_pass_csez5torch._C._jit_pass_custom_pattern_based_rewrite_graphz/torch._C._jit_pass_custom_pattern_based_rewritez5torch._C._jit_pass_dbr_quant_remove_redundant_aliasesz=torch._C._jit_pass_dce_allow_deleting_nodes_with_side_effectsztorch._C._jit_pass_dcez torch._C._jit_pass_decompose_opsz$torch._C._jit_pass_dedup_module_usesz%torch._C._jit_pass_erase_number_typesz*torch._C._jit_pass_erase_shape_informationz.torch._C._jit_pass_filter_non_tensor_argumentsz.torch._C._jit_pass_fixup_onnx_controlflow_nodeztorch._C._jit_pass_fold_convbnz.torch._C._jit_pass_fold_frozen_conv_add_or_subz&torch._C._jit_pass_fold_frozen_conv_bnz.torch._C._jit_pass_fold_frozen_conv_mul_or_divz(torch._C._jit_pass_fold_frozen_linear_bnz&torch._C._jit_pass_fold_prepacking_opsz3torch._C._jit_pass_functional_to_inplace_activationz torch._C._jit_pass_fuse_add_reluztorch._C._jit_pass_fuse_addmmz5torch._C._jit_pass_fuse_clamp_w_prepacked_linear_convz,torch._C._jit_pass_fuse_frozen_conv_add_reluztorch._C._jit_pass_fuse_linearz*torch._C._jit_pass_fuse_quantized_add_reluz#torch._C._jit_pass_fuse_tensorexprsztorch._C._jit_pass_fusez#torch._C._jit_pass_inline_fork_waitz+torch._C._jit_pass_inline_functional_graphsztorch._C._jit_pass_inlinez3torch._C._jit_pass_inplace_to_functional_activationz:torch._C._jit_pass_insert_observer_method_for_ondevice_ptqz#torch._C._jit_pass_insert_observersz(torch._C._jit_pass_insert_prepack_unpackz'torch._C._jit_pass_insert_prepacked_opsz8torch._C._jit_pass_insert_quant_dequant_for_ondevice_ptqz'torch._C._jit_pass_insert_quant_dequantz+torch._C._jit_pass_integer_value_refinementztorch._C._jit_pass_lintz!torch._C._jit_pass_loop_unrollingz#torch._C._jit_pass_lower_all_tuplesztorch._C._jit_pass_lower_graphz,torch._C._jit_pass_metal_fold_prepacking_opsz4torch._C._jit_pass_metal_fuse_clamp_w_prepacked_convz-torch._C._jit_pass_metal_insert_prepacked_opsz,torch._C._jit_pass_metal_optimize_for_mobilez+torch._C._jit_pass_onnx_assign_output_shapez>torch._C._jit_pass_onnx_assign_scoped_names_for_node_and_valuez1torch._C._jit_pass_onnx_autograd_function_processztorch._C._jit_pass_onnx_blockz5torch._C._jit_pass_onnx_cast_all_constant_to_floatingz+torch._C._jit_pass_onnx_clear_scope_recordsz%torch._C._jit_pass_onnx_constant_foldz0torch._C._jit_pass_onnx_deduplicate_initializersz.torch._C._jit_pass_onnx_eliminate_unused_itemsz%torch._C._jit_pass_onnx_eval_peepholez+torch._C._jit_pass_onnx_function_extractionz-torch._C._jit_pass_onnx_function_substitutionz2torch._C._jit_pass_onnx_graph_shape_type_inferenceztorch._C._jit_pass_onnx_lintz1torch._C._jit_pass_onnx_node_shape_type_inferencez torch._C._jit_pass_onnx_peepholez)torch._C._jit_pass_onnx_preprocess_caffe2z"torch._C._jit_pass_onnx_preprocessz4torch._C._jit_pass_onnx_quantization_insert_permutesz3torch._C._jit_pass_onnx_remove_inplace_ops_for_onnxz$torch._C._jit_pass_onnx_remove_printz,torch._C._jit_pass_onnx_scalar_type_analysisz/torch._C._jit_pass_onnx_set_dynamic_input_shapez.torch._C._jit_pass_onnx_track_scope_attributesz0torch._C._jit_pass_onnx_unpack_quantized_weightsztorch._C._jit_pass_onnxz)torch._C._jit_pass_optimize_for_inferencez&torch._C._jit_pass_optimize_for_mobilez(torch._C._jit_pass_optimize_frozen_graphz(torch._C._jit_pass_pattern_based_rewritez'torch._C._jit_pass_peephole_list_idiomsztorch._C._jit_pass_peepholez,torch._C._jit_pass_prepare_division_for_onnxz#torch._C._jit_pass_propagate_devicez"torch._C._jit_pass_propagate_dtypez>torch._C._jit_pass_propagate_shapes_on_graph_and_build_computez,torch._C._jit_pass_propagate_shapes_on_graphz2torch._C._jit_pass_quant_finalize_for_ondevice_ptqz!torch._C._jit_pass_quant_finalizeztorch._C._jit_pass_quant_fusionz(torch._C._jit_pass_refine_integer_valuesz%torch._C._jit_pass_refine_tuple_typesz!torch._C._jit_pass_remove_dropoutz!torch._C._jit_pass_remove_expandsz%torch._C._jit_pass_remove_inplace_opsz"torch._C._jit_pass_remove_mutationz1torch._C._jit_pass_replace_old_ops_with_upgradersz'torch._C._jit_pass_replicate_dequantizez%torch._C._jit_pass_run_decompositionsz*torch._C._jit_pass_specialize_autogradzeroz)torch._C._jit_pass_swap_functional_linearz-torch._C._jit_pass_transform_conv1d_to_conv2dz*torch._C._jit_pass_transpose_frozen_linearz-torch._C._jit_pass_vulkan_fold_prepacking_opsz5torch._C._jit_pass_vulkan_fuse_clamp_w_prepacked_convz.torch._C._jit_pass_vulkan_insert_prepacked_opsz-torch._C._jit_pass_vulkan_optimize_for_mobilez/torch._C._jit_register_decomposition_for_schemaz3torch._C._jit_register_shape_compute_graph_for_nodeztorch._C._jit_resolve_packetztorch._C._jit_run_cpp_testsz"torch._C._jit_script_class_compilez%torch._C._jit_script_compile_overloadztorch._C._jit_script_compilez&torch._C._jit_script_interface_compileztorch._C._jit_set_autocast_modeztorch._C._jit_set_bailout_depthztorch._C._jit_set_emit_hooksz!torch._C._jit_set_fusion_strategyz(torch._C._jit_set_inline_everything_modeztorch._C._jit_set_llga_enabledz torch._C._jit_set_logging_optionz torch._C._jit_set_logging_streamz#torch._C._jit_set_num_profiled_runsz!torch._C._jit_set_nvfuser_enabledz$torch._C._jit_set_nvfuser_guard_modez)torch._C._jit_set_nvfuser_horizontal_modez*torch._C._jit_set_nvfuser_single_node_modez(torch._C._jit_set_nvfuser_skip_node_kindz"torch._C._jit_set_onnx_log_enabledz(torch._C._jit_set_onnx_log_output_streamz$torch._C._jit_set_profiling_executorz torch._C._jit_set_profiling_modez+torch._C._jit_set_symbolic_shapes_test_modez/torch._C._jit_set_te_cuda_pointwise_block_countz.torch._C._jit_set_te_cuda_pointwise_block_sizez/torch._C._jit_set_te_cuda_pointwise_loop_levelsz(torch._C._jit_set_te_generate_block_codez&torch._C._jit_set_te_must_use_llvm_cpuz-torch._C._jit_set_texpr_dynamic_shape_enabledz%torch._C._jit_set_texpr_fuser_enabledz*torch._C._jit_set_texpr_reductions_enabledz#torch._C._jit_set_tracer_state_warnz&torch._C._jit_set_utf8_decoding_ignorez*torch._C._jit_shape_compute_graph_for_nodez/torch._C._jit_symbolic_shapes_test_mode_enabledz)torch._C._jit_texpr_dynamic_shape_enabledz$torch._C._jit_texpr_fallback_allowedz!torch._C._jit_texpr_fuser_enabledz&torch._C._jit_texpr_reductions_enabledz(torch._C._jit_texpr_set_fallback_allowedz"torch._C._jit_to_backend_selectiveztorch._C._jit_to_backendztorch._C._jit_to_static_moduleztorch._C._jit_trace_graphztorch._C._jit_trace_modulez%torch._C._jit_tree_views.FalseLiteralz$torch._C._jit_tree_views.NoneLiteralz$torch._C._jit_tree_views.TrueLiteralztorch._C._jit_try_infer_typeztorch._C._jit_unflattenz'torch._C._last_executed_optimized_graphz"torch._C._len_torch_dispatch_stackz"torch._C._len_torch_function_stackz torch._C._linalg._linalg_eigvalsz#torch._C._linalg.linalg_cholesky_exz torch._C._linalg.linalg_choleskyztorch._C._linalg.linalg_condztorch._C._linalg.linalg_crossztorch._C._linalg.linalg_detz torch._C._linalg.linalg_diagonalztorch._C._linalg.linalg_eigztorch._C._linalg.linalg_eighztorch._C._linalg.linalg_eigvalsz torch._C._linalg.linalg_eigvalshz+torch._C._linalg.linalg_householder_productztorch._C._linalg.linalg_inv_exztorch._C._linalg.linalg_invz%torch._C._linalg.linalg_ldl_factor_exz"torch._C._linalg.linalg_ldl_factorz!torch._C._linalg.linalg_ldl_solveztorch._C._linalg.linalg_lstsqz$torch._C._linalg.linalg_lu_factor_exz!torch._C._linalg.linalg_lu_factorz torch._C._linalg.linalg_lu_solveztorch._C._linalg.linalg_luztorch._C._linalg.linalg_matmulz"torch._C._linalg.linalg_matrix_expz#torch._C._linalg.linalg_matrix_normz$torch._C._linalg.linalg_matrix_powerz#torch._C._linalg.linalg_matrix_rankz!torch._C._linalg.linalg_multi_dotztorch._C._linalg.linalg_normztorch._C._linalg.linalg_pinvztorch._C._linalg.linalg_qrztorch._C._linalg.linalg_slogdetz torch._C._linalg.linalg_solve_exz(torch._C._linalg.linalg_solve_triangularztorch._C._linalg.linalg_solveztorch._C._linalg.linalg_svdztorch._C._linalg.linalg_svdvalsz!torch._C._linalg.linalg_tensorinvz#torch._C._linalg.linalg_tensorsolveztorch._C._linalg.linalg_vanderztorch._C._linalg.linalg_vecdotz#torch._C._linalg.linalg_vector_normztorch._C._llvm_enabledz/torch._C._load_for_lite_interpreter_from_bufferz#torch._C._load_for_lite_interpreterz$torch._C._load_jit_module_from_bytesz#torch._C._load_jit_module_from_filez'torch._C._load_mobile_module_from_bytesz&torch._C._load_mobile_module_from_filez torch._C._log_api_usage_metadataztorch._C._log_api_usage_onceztorch._C._logging_set_loggerz&torch._C._meta_in_tls_dispatch_includeztorch._C._mps_acquireEventz$torch._C._mps_currentAllocatedMemoryztorch._C._mps_deviceSynchronizez#torch._C._mps_driverAllocatedMemoryz"torch._C._mps_recommendedMaxMemoryz!torch._C._mps_elapsedTimeOfEventsztorch._C._mps_emptyCachez#torch._C._mps_get_default_generatorztorch._C._mps_is_availableztorch._C._mps_is_in_bad_forkz%torch._C._mps_is_on_macos_13_or_newerz torch._C._mps_profilerStartTraceztorch._C._mps_profilerStopTraceztorch._C._mps_queryEventztorch._C._mps_recordEventztorch._C._mps_releaseEventztorch._C._mps_setMemoryFractionztorch._C._mps_synchronizeEventztorch._C._mps_waitForEventztorch._C._multiprocessing_initztorch._C._nccl_all_gatherztorch._C._nccl_all_reduceztorch._C._nccl_broadcastztorch._C._nccl_init_rankztorch._C._nccl_reduce_scatterztorch._C._nccl_reduceztorch._C._nccl_unique_idztorch._C._nccl_version_suffixztorch._C._nccl_versionztorch._C._nested.nested_tensorz(torch._C._nested.nested_to_padded_tensorz#torch._C._new_symbolic_shape_symbolztorch._C._nn_module_to_mobileztorch._C._nn._conv_depthwise2dztorch._C._nn._pad_circularztorch._C._nn._pad_enumztorch._C._nn._parse_toz%torch._C._nn._test_ambiguous_defaultsz*torch._C._nn._test_optional_filled_intlistz%torch._C._nn._test_optional_floatlistz#torch._C._nn._test_optional_intlistz!torch._C._nn._test_string_defaultz#torch._C._nn._test_warn_in_autogradz#torch._C._nn._upsample_bicubic2d_aaz$torch._C._nn._upsample_bilinear2d_aaz&torch._C._nn._upsample_nearest_exact1dz&torch._C._nn._upsample_nearest_exact2dz&torch._C._nn._upsample_nearest_exact3dz torch._C._nn.adaptive_avg_pool2dz torch._C._nn.adaptive_avg_pool3dz torch._C._nn.adaptive_max_pool2dz torch._C._nn.adaptive_max_pool3dztorch._C._nn.avg_pool2dztorch._C._nn.avg_pool3dz!torch._C._nn.binary_cross_entropyztorch._C._nn.col2imztorch._C._nn.conv_depthwise3dztorch._C._nn.cross_entropy_lossztorch._C._nn.elu_ztorch._C._nn.eluz"torch._C._nn.flatten_dense_tensorsz"torch._C._nn.fractional_max_pool2dz"torch._C._nn.fractional_max_pool3dztorch._C._nn.gelu_ztorch._C._nn.geluztorch._C._nn.gluztorch._C._nn.hardsigmoid_ztorch._C._nn.hardsigmoidztorch._C._nn.hardswish_ztorch._C._nn.hardswishztorch._C._nn.hardtanh_ztorch._C._nn.hardtanhztorch._C._nn.huber_lossztorch._C._nn.im2colztorch._C._nn.l1_lossztorch._C._nn.leaky_relu_ztorch._C._nn.leaky_reluztorch._C._nn.linearztorch._C._nn.log_sigmoidz$torch._C._nn.max_pool2d_with_indicesz$torch._C._nn.max_pool3d_with_indicesztorch._C._nn.max_unpool2dztorch._C._nn.max_unpool3dztorch._C._nn.mish_ztorch._C._nn.mishztorch._C._nn.mkldnn_linearz)torch._C._nn.mkldnn_reorder_conv2d_weightz)torch._C._nn.mkldnn_reorder_conv3d_weightztorch._C._nn.mse_lossztorch._C._nn.multi_margin_lossz#torch._C._nn.multilabel_margin_lossztorch._C._nn.nll_loss_ndztorch._C._nn.nll_lossztorch._C._nn.nll_loss2dztorch._C._nn.one_hotztorch._C._nn.pad_sequenceztorch._C._nn.padztorch._C._nn.reflection_pad1dztorch._C._nn.reflection_pad2dztorch._C._nn.reflection_pad3dztorch._C._nn.relu6_ztorch._C._nn.relu6ztorch._C._nn.replication_pad1dztorch._C._nn.replication_pad2dztorch._C._nn.replication_pad3dztorch._C._nn.rrelu_with_noise_ztorch._C._nn.rrelu_with_noisez)torch._C._nn.scaled_dot_product_attentionztorch._C._nn.silu_ztorch._C._nn.siluz torch._C._nn.slow_conv_dilated2dz torch._C._nn.slow_conv_dilated3dz"torch._C._nn.slow_conv_transpose2dz"torch._C._nn.slow_conv_transpose3dztorch._C._nn.slow_conv3dztorch._C._nn.smooth_l1_lossztorch._C._nn.soft_margin_lossztorch._C._nn.softplusztorch._C._nn.softshrinkztorch._C._nn.thnn_conv2dz$torch._C._nn.unflatten_dense_tensorsztorch._C._nn.upsample_bicubic2dz torch._C._nn.upsample_bilinear2dztorch._C._nn.upsample_linear1dztorch._C._nn.upsample_nearest1dztorch._C._nn.upsample_nearest2dztorch._C._nn.upsample_nearest3dz!torch._C._nn.upsample_trilinear3dztorch._C._non_sym_sizesztorch._C._overlapsztorch._C._parallel_infoztorch._C._parse_dispatch_keyztorch._C._parse_source_defz"torch._C._pop_torch_dispatch_stackz"torch._C._pop_torch_function_stackz+torch._C._propagate_and_assign_input_shapesztorch._C._propagate_shapesztorch._C._propagate_xla_dataz&torch._C._push_on_torch_dispatch_stackz&torch._C._push_on_torch_function_stackz'torch._C._quantize_ondevice_ptq_dynamicz&torch._C._register_py_class_for_deviceztorch._C._remove_cached_tensorztorch._C._remove_worker_pidsz$torch._C._rename_privateuse1_backendztorch._C._replace_z(torch._C._replace_overloaded_method_declz"torch._C._resolve_type_from_objectztorch._C._resolve_typeztorch._C._rocm_is_backward_passztorch._C._rpc_initztorch._C._run_emit_module_hookz"torch._C._save_jit_module_to_bytesztorch._C._save_jit_modulez%torch._C._save_mobile_module_to_bytesztorch._C._save_mobile_moduleztorch._C._save_parametersztorch._C._scatter_outztorch._C._scatterztorch._C._select_conv_backendz#torch._C._select_batch_norm_backendz$torch._C._set_autograd_fallback_modez'torch._C._set_backcompat_broadcast_warnz%torch._C._set_backcompat_keepdim_warnz$torch._C._set_blas_preferred_backendz$torch._C._set_cached_tensors_enabledz,torch._C._set_check_sparse_tensor_invariantsztorch._C._set_conjz;torch._C._set_cublas_allow_bf16_reduced_precision_reductionz;torch._C._set_cublas_allow_fp16_reduced_precision_reductionztorch._C._set_cublas_allow_tf32ztorch._C._set_cudnn_allow_tf32ztorch._C._set_cudnn_benchmarkz!torch._C._set_cudnn_deterministicztorch._C._set_cudnn_enabledztorch._C._set_default_dtypez*torch._C._set_default_mobile_cpu_allocatorz!torch._C._set_default_tensor_typez&torch._C._set_deterministic_algorithmsz5torch._C._set_deterministic_fill_uninitialized_memoryztorch._C._set_dispatch_modez&torch._C._set_float32_matmul_precisionztorch._C._set_fwd_grad_enabledztorch._C._set_grad_enabledz%torch._C._set_graph_executor_optimizez&torch._C._set_linalg_preferred_backendz'torch._C._set_rocm_fa_preferred_backendz*torch._C._set_meta_in_tls_dispatch_includeztorch._C._set_mkldnn_enabledz$torch._C._set_multithreading_enabledztorch._C._set_negztorch._C._set_nnpack_enabledz0torch._C._set_print_stack_traces_on_fatal_signalztorch._C._set_qengineztorch._C._set_sdp_use_flashztorch._C._set_sdp_use_mathz0torch._C._set_math_sdp_allow_fp16_bf16_reductionz#torch._C._set_sdp_use_mem_efficientz1torch._C._set_should_use_format_with_string_tablez&torch._C._set_sm_carveout_experimentalz&torch._C._set_storage_access_error_msgztorch._C._set_tensor_metadataztorch._C._set_tracing_stateztorch._C._set_value_tracez!torch._C._set_view_replay_enabledztorch._C._set_warnAlwaysztorch._C._set_worker_pidsz$torch._C._set_worker_signal_handlersz)torch._C._should_allow_numbers_as_tensorsztorch._C._show_configztorch._C._sparse._sparse_addmmz$torch._C._sparse._sparse_log_softmaxz'torch._C._sparse._sparse_mm_reduce_implztorch._C._sparse._sparse_mmz torch._C._sparse._sparse_softmaxztorch._C._sparse._spdiagsz%torch._C._sparse.sparse_sampled_addmmz!torch._C._special.special_airy_aiz#torch._C._special.special_bessel_j0z#torch._C._special.special_bessel_j1z#torch._C._special.special_bessel_y0z#torch._C._special.special_bessel_y1z0torch._C._special.special_chebyshev_polynomial_tz0torch._C._special.special_chebyshev_polynomial_uz0torch._C._special.special_chebyshev_polynomial_vz0torch._C._special.special_chebyshev_polynomial_wz!torch._C._special.special_digammaztorch._C._special.special_entrztorch._C._special.special_erfztorch._C._special.special_erfcztorch._C._special.special_erfcxz torch._C._special.special_erfinvztorch._C._special.special_exp2ztorch._C._special.special_expitztorch._C._special.special_expm1z"torch._C._special.special_gammaincz#torch._C._special.special_gammainccz!torch._C._special.special_gammalnz.torch._C._special.special_hermite_polynomial_hz/torch._C._special.special_hermite_polynomial_heztorch._C._special.special_i0ztorch._C._special.special_i0eztorch._C._special.special_i1ztorch._C._special.special_i1ez/torch._C._special.special_laguerre_polynomial_lz/torch._C._special.special_legendre_polynomial_pz"torch._C._special.special_log_ndtrz%torch._C._special.special_log_softmaxztorch._C._special.special_log1pztorch._C._special.special_logitz#torch._C._special.special_logsumexpz,torch._C._special.special_modified_bessel_i0z,torch._C._special.special_modified_bessel_i1z,torch._C._special.special_modified_bessel_k0z,torch._C._special.special_modified_bessel_k1z&torch._C._special.special_multigammalnztorch._C._special.special_ndtrztorch._C._special.special_ndtriz#torch._C._special.special_polygammaztorch._C._special.special_psiztorch._C._special.special_roundz3torch._C._special.special_scaled_modified_bessel_k0z3torch._C._special.special_scaled_modified_bessel_k1z8torch._C._special.special_shifted_chebyshev_polynomial_tz8torch._C._special.special_shifted_chebyshev_polynomial_uz8torch._C._special.special_shifted_chebyshev_polynomial_vz8torch._C._special.special_shifted_chebyshev_polynomial_wztorch._C._special.special_sincz!torch._C._special.special_softmaxz-torch._C._special.special_spherical_bessel_j0z!torch._C._special.special_xlog1pyztorch._C._special.special_xlogyztorch._C._special.special_zetaztorch._C._stash_obj_in_tlsztorch._C._storage_idztorch._C._storage_Use_Countztorch._C._supported_qenginesztorch._C._te.absztorch._C._te.acosz"torch._C._te.annotate_input_shapesztorch._C._te.asinztorch._C._te.atanztorch._C._te.atan2ztorch._C._te.ceilztorch._C._te.Computeztorch._C._te.Compute2ztorch._C._te.construct_codegenztorch._C._te.cosztorch._C._te.coshztorch._C._te.erfztorch._C._te.erfcztorch._C._te.expztorch._C._te.expm1z%torch._C._te.fixup_missing_shape_infoztorch._C._te.floorztorch._C._te.fmodztorch._C._te.fracztorch._C._te.ifThenElsez torch._C._te.is_graph_compilableztorch._C._te.isnanztorch._C._te.lgammaztorch._C._te.logztorch._C._te.log10ztorch._C._te.log1pztorch._C._te.log2ztorch._C._te.lowerz!torch._C._te.make_shapes_symbolicztorch._C._te.powztorch._C._te.Reduceztorch._C._te.remainderz torch._C._te.remove_graph_outputz(torch._C._te.remove_unused_self_argumentz+torch._C._te.replace_list_output_with_tupleztorch._C._te.roundztorch._C._te.rsqrtztorch._C._te.sigmoidztorch._C._te.simplifyztorch._C._te.sinztorch._C._te.sinhztorch._C._te.sqrtztorch._C._te.tanztorch._C._te.tanhztorch._C._te.trim_graphztorch._C._te.truncz torch._C._tensor_impl_raw_handlez/torch._C._test_only_add_entry_to_op_version_mapz&torch._C._test_only_populate_upgradersz2torch._C._test_only_remove_entry_to_op_version_mapz$torch._C._test_only_remove_upgradersztorch._C._to_functionality_keyz#torch._C._tracer_set_force_outplacez'torch._C._tracer_set_get_unique_name_fnz torch._C._tracer_warn_use_pythonz,torch._C._unset_default_mobile_cpu_allocatorztorch._C._unset_dispatch_modez%torch._C._valgrind_supported_platformz(torch._C._valgrind_toggle_and_dump_statsztorch._C._valgrind_togglez!torch._C._verbose.mkl_set_verbosez$torch._C._verbose.mkldnn_set_verbosez$torch._C._vmapmode_decrement_nestingz$torch._C._vmapmode_increment_nestingztorch._C._warn_deprecationztorch._C._warnz"torch._C._will_engine_execute_nodeztorch._C._wrap_tensor_implztorch._C._xpu_emptyCacheztorch._C._xpu_getArchFlagsztorch._C._xpu_getCurrentStreamz!torch._C._xpu_getCurrentRawStreamztorch._C._xpu_getDeviceCountztorch._C._xpu_getDeviceztorch._C._xpu_getMemoryInfoz#torch._C._xpu_getStreamFromExternalztorch._C._xpu_isInBadForkztorch._C._xpu_initztorch._C._xpu_memoryStatsz)torch._C._xpu_resetAccumulatedMemoryStatsz"torch._C._xpu_resetPeakMemoryStatsztorch._C._xpu_setStreamztorch._C._xpu_synchronizeztorch._C.forkztorch._C.get_autocast_cpu_dtypeztorch._C.get_autocast_dtypeztorch._C.get_autocast_gpu_dtypeztorch._C.get_autocast_ipu_dtypeztorch._C.get_autocast_xla_dtypeztorch._C.get_default_dtypez torch._C.get_num_interop_threadsztorch._C.get_num_threadsz%torch._C.import_ir_module_from_bufferztorch._C.import_ir_moduleztorch._C.init_num_threadsz%torch._C.is_anomaly_check_nan_enabledztorch._C.is_anomaly_enabledz"torch._C.is_autocast_cache_enabledz torch._C.is_autocast_cpu_enabledztorch._C.is_autocast_enabledz torch._C.is_autocast_ipu_enabledz torch._C.is_autocast_xla_enabledztorch._C.is_grad_enabledz"torch._C.is_inference_mode_enabledz%torch._C.merge_type_from_type_commentztorch._C.parse_irztorch._C.parse_schemaztorch._C.parse_type_commentztorch._C.read_vitalsztorch._C.set_vitalztorch._C.unify_type_listztorch._C.vitals_enabledztorch._C.waitztorch._cast_Byteztorch._cast_Charztorch._cast_Doubleztorch._cast_Floatztorch._cast_Halfztorch._cast_Intztorch._cast_Longztorch._cast_Shortz torch._choose_qparams_per_tensorztorch._chunk_catztorch._coalescez!torch._compute_linear_combinationztorch._conj_copyztorch._conj_physicalztorch._conjz&torch._convert_indices_from_coo_to_csrz&torch._convert_indices_from_csr_to_cooz!torch._convert_weight_to_int4packz)torch._convert_weight_to_int4pack_for_cpuztorch._convolution_modeztorch._convolutionztorch._copy_from_and_resizeztorch._copy_fromztorch._cslt_compressztorch._cslt_sparse_mmztorch._ctc_lossztorch._cudnn_ctc_lossztorch._cudnn_init_dropout_stateztorch._cudnn_rnn_flatten_weightztorch._cudnn_rnnztorch._cufft_clear_plan_cachez$torch._cufft_get_plan_cache_max_sizez torch._cufft_get_plan_cache_sizez$torch._cufft_set_plan_cache_max_sizeztorch._cummax_helperztorch._cummin_helperz!torch._debug_has_internal_overlapztorch._dim_arangeztorch._dirichlet_gradz torch._disable_functionalizationztorch._dyn_quant_matmul_4bitz!torch._dyn_quant_pack_4bit_weightztorch._efficientzerotensorz!torch._embedding_bag_forward_onlyztorch._embedding_bagztorch._empty_affine_quantizedz)torch._empty_per_channel_affine_quantizedztorch._enable_functionalizationztorch._euclidean_distz1torch._fake_quantize_learnable_per_channel_affinez0torch._fake_quantize_learnable_per_tensor_affinez?torch._fake_quantize_per_tensor_affine_cachemask_tensor_qparamsztorch._fft_c2cztorch._fft_c2rztorch._fft_r2cz!torch._fill_mem_eff_dropout_mask_ztorch._foobarztorch._foreach_abs_ztorch._foreach_absztorch._foreach_acos_ztorch._foreach_acosztorch._foreach_add_ztorch._foreach_addztorch._foreach_addcdiv_ztorch._foreach_addcdivztorch._foreach_addcmul_ztorch._foreach_addcmulztorch._foreach_asin_ztorch._foreach_asinztorch._foreach_atan_ztorch._foreach_atanztorch._foreach_ceil_ztorch._foreach_ceilztorch._foreach_clamp_max_ztorch._foreach_clamp_maxztorch._foreach_clamp_min_ztorch._foreach_clamp_minztorch._foreach_copy_ztorch._foreach_cos_ztorch._foreach_cosztorch._foreach_cosh_ztorch._foreach_coshztorch._foreach_div_ztorch._foreach_divztorch._foreach_erf_ztorch._foreach_erfztorch._foreach_erfc_ztorch._foreach_erfcztorch._foreach_exp_ztorch._foreach_expztorch._foreach_expm1_ztorch._foreach_expm1ztorch._foreach_floor_ztorch._foreach_floorztorch._foreach_frac_ztorch._foreach_fracztorch._foreach_lerp_ztorch._foreach_lerpztorch._foreach_lgamma_ztorch._foreach_lgammaztorch._foreach_log_ztorch._foreach_logztorch._foreach_log10_ztorch._foreach_log10ztorch._foreach_log1p_ztorch._foreach_log1pztorch._foreach_log2_ztorch._foreach_log2ztorch._foreach_maximum_ztorch._foreach_maximumztorch._foreach_minimum_ztorch._foreach_minimumztorch._foreach_mul_ztorch._foreach_mulztorch._foreach_neg_ztorch._foreach_negztorch._foreach_normztorch._foreach_pow_ztorch._foreach_powztorch._foreach_reciprocal_ztorch._foreach_reciprocalztorch._foreach_round_ztorch._foreach_roundztorch._foreach_sigmoid_ztorch._foreach_sigmoidztorch._foreach_rsqrt_ztorch._foreach_rsqrtztorch._foreach_sign_ztorch._foreach_signztorch._foreach_sin_ztorch._foreach_sinztorch._foreach_sinh_ztorch._foreach_sinhztorch._foreach_sqrt_ztorch._foreach_sqrtztorch._foreach_sub_ztorch._foreach_subztorch._foreach_tan_ztorch._foreach_tanztorch._foreach_tanh_ztorch._foreach_tanhztorch._foreach_trunc_ztorch._foreach_truncztorch._foreach_zero_ztorch._freeze_functional_tensorztorch._from_functional_tensorztorch._functional_assert_asyncz.torch._functional_sym_constrain_range_for_sizez%torch._functional_sym_constrain_rangez;torch._functionalize_are_all_mutations_hidden_from_autogradz"torch._functionalize_commit_updatez)torch._functionalize_enable_reapply_viewsz&torch._functionalize_has_data_mutationz*torch._functionalize_has_metadata_mutationz)torch._functionalize_is_multi_output_viewz7torch._functionalize_mark_mutation_hidden_from_autogradztorch._functionalize_replaceztorch._functionalize_syncz(torch._functionalize_was_storage_changedztorch._fused_adam_ztorch._fused_adamw_ztorch._fused_dropoutz%torch._fused_moving_avg_obs_fq_helperztorch._fused_sdp_choiceztorch._fw_primal_copyz#torch._grid_sampler_2d_cpu_fallbackztorch._grouped_mmz'torch._has_compatible_shallow_copy_typeztorch._histogramdd_bin_edgesztorch._histogramdd_from_bin_ctsz#torch._histogramdd_from_bin_tensorsztorch._index_put_impl_ztorch._indices_copyztorch._int_mmztorch._is_all_trueztorch._is_any_trueztorch._is_functional_tensorztorch._is_zerotensorztorch._linalg_check_errorsztorch._linalg_detztorch._linalg_eighztorch._linalg_eigvalsztorch._linalg_slogdetztorch._linalg_solve_exztorch._linalg_svdz torch._log_softmax_backward_dataztorch._log_softmaxztorch._logcumsumexpztorch._lstm_mpsztorch._lu_with_infoztorch._make_dep_tokenztorch._make_dual_copyztorch._make_dualz(torch._make_per_channel_quantized_tensorz'torch._make_per_tensor_quantized_tensorztorch._masked_scaleztorch._masked_softmaxztorch._mirror_autograd_meta_toztorch._mixed_dtypes_linearztorch._mkldnn_reshapeztorch._mkldnn_transpose_ztorch._mkldnn_transposez torch._mps_convolution_transposeztorch._mps_convolutionz*torch._native_batch_norm_legit_no_trainingztorch._native_batch_norm_legitz"torch._native_multi_head_attentionztorch._neg_view_copyztorch._neg_viewz,torch._nested_from_padded_and_nested_examplez torch._nested_from_padded_tensorz+torch._nested_tensor_from_mask_left_alignedz%torch._nested_tensor_from_tensor_listz'torch._nested_tensor_softmax_with_shapez#torch._nested_view_from_buffer_copyztorch._nested_view_from_bufferztorch._nnpack_availablez!torch._nnpack_spatial_convolutionztorch._pack_padded_sequenceztorch._pad_packed_sequenceztorch._pin_memoryztorch._prelu_kernelztorch._propagate_xla_dataztorch._remove_batch_dimztorch._reshape_alias_copyztorch._reshape_from_tensorztorch._resize_output_ztorch._rowwise_pruneztorch._sample_dirichletztorch._saturate_weight_to_fp16z(torch._scaled_dot_product_attention_mathz-torch._scaled_dot_product_efficient_attentionz)torch._scaled_dot_product_flash_attentionz1torch._scaled_dot_product_flash_attention_for_cpuz)torch._scaled_dot_product_cudnn_attentionztorch._scaled_mmztorch._scaled_grouped_mmztorch._shape_as_tensorztorch._sobol_engine_drawztorch._sobol_engine_ff_z%torch._sobol_engine_initialize_state_ztorch._sobol_engine_scramble_ztorch._softmax_backward_dataztorch._softmaxztorch._sparse_broadcast_to_copyztorch._sparse_broadcast_toztorch._sparse_csr_prodztorch._sparse_csr_sumz'torch._sparse_log_softmax_backward_dataz#torch._sparse_semi_structured_addmmz$torch._sparse_semi_structured_linearz torch._sparse_semi_structured_mmz#torch._sparse_softmax_backward_dataztorch._sparse_sparse_matmulztorch._sparse_sumztorch._stackztorch._standard_gamma_gradztorch._standard_gammaz0torch._test_autograd_multiple_dispatch_view_copyz+torch._test_autograd_multiple_dispatch_viewz&torch._test_autograd_multiple_dispatchztorch._test_check_tensorztorch._test_functorch_fallbackz!torch._test_serialization_subcmulztorch._to_cpuztorch._to_functional_tensorz torch._to_sparse_semi_structuredz!torch._transform_bias_rescale_qkvz$torch._transformer_encoder_layer_fwdztorch._trilinearz"torch._triton_multi_head_attentionz"torch._triton_scaled_dot_attentionztorch._uniqueztorch._unique2ztorch._unpack_dualztorch._unsafe_index_putztorch._unsafe_indexz)torch._unsafe_masked_index_put_accumulateztorch._unsafe_masked_indexztorch._use_cudnn_ctc_lossz#torch._use_cudnn_rnn_flatten_weightztorch._values_copyztorch._weight_int4pack_mmz!torch._weight_int4pack_mm_for_cpuz/torch._weight_int4pack_mm_with_scales_and_zerosztorch._weight_int8pack_mmztorch._weight_norm_interfaceztorch._weight_normz
torch.abs_z	torch.absztorch.absoluteztorch.acos_z
torch.acosztorch.acosh_ztorch.acoshztorch.adaptive_avg_pool1dztorch.adaptive_max_pool1dz	torch.addztorch.addbmmztorch.addcdivztorch.addcmulztorch.addmmztorch.addmv_ztorch.addmvz
torch.addrztorch.adjointztorch.affine_grid_generatorztorch.alias_copyz	torch.allztorch.allcloseztorch.alpha_dropout_ztorch.alpha_dropoutz
torch.amaxz
torch.aminztorch.aminmaxztorch.anglez	torch.anyztorch.arangeztorch.arccos_ztorch.arccosztorch.arccosh_ztorch.arccoshztorch.arcsin_ztorch.arcsinztorch.arcsinh_ztorch.arcsinhztorch.arctan_ztorch.arctanztorch.arctan2ztorch.arctanh_ztorch.arctanhztorch.argmaxztorch.argminztorch.argsortztorch.argwhereztorch.as_strided_ztorch.as_strided_copyztorch.as_strided_scatterztorch.as_stridedztorch.as_tensorztorch.asarrayztorch.asin_z
torch.asinztorch.asinh_ztorch.asinhztorch.atan_z
torch.atanztorch.atan2ztorch.atanh_ztorch.atanhztorch.avg_pool1dztorch.baddbmmztorch.bartlett_windowztorch.batch_norm_backward_elemtz torch.batch_norm_backward_reduceztorch.batch_norm_elemtz)torch.batch_norm_gather_stats_with_countsztorch.batch_norm_gather_statsztorch.batch_norm_statsztorch.batch_norm_update_statsztorch.batch_normztorch.bernoulliztorch.bilinearz&torch.binary_cross_entropy_with_logitsztorch.bincountztorch.binomialztorch.bitwise_andztorch.bitwise_left_shiftztorch.bitwise_notztorch.bitwise_orztorch.bitwise_right_shiftztorch.bitwise_xorztorch.blackman_windowz	torch.bmmztorch.broadcast_toztorch.bucketizeztorch.can_castz	torch.catztorch.ccol_indices_copyztorch.ceil_z
torch.ceilztorch.celu_z
torch.celuztorch.channel_shuffleztorch.cholesky_inverseztorch.cholesky_solveztorch.choleskyztorch.choose_qparams_optimizedztorch.chunkztorch.clamp_ztorch.clamp_max_ztorch.clamp_maxztorch.clamp_min_ztorch.clamp_minztorch.clampztorch.clip_z
torch.clipztorch.cloneztorch.col_indices_copyztorch.column_stackztorch.combinationsztorch.complexztorch.concatztorch.concatenateztorch.conj_physical_ztorch.conj_physicalz
torch.conjztorch.constant_pad_ndztorch.conv_tbcztorch.conv_transpose1dztorch.conv_transpose2dztorch.conv_transpose3dztorch.conv1dztorch.conv2dztorch.conv3dztorch.convolutionztorch.copysignztorch.corrcoefz
torch.cos_z	torch.cosztorch.cosh_z
torch.coshztorch.cosine_embedding_lossztorch.cosine_similarityztorch.count_nonzeroz	torch.covztorch.crossztorch.crow_indices_copyztorch.ctc_lossz!torch.cudnn_affine_grid_generatorztorch.cudnn_batch_normz torch.cudnn_convolution_add_reluztorch.cudnn_convolution_reluz!torch.cudnn_convolution_transposeztorch.cudnn_convolutionztorch.cudnn_grid_samplerztorch.cudnn_is_acceptableztorch.cummaxztorch.cumminztorch.cumprodztorch.cumsumztorch.cumulative_trapezoidztorch.deg2rad_ztorch.deg2radztorch.dequantizez	torch.detztorch.detach_ztorch.detach_copyztorch.detachztorch.diag_embedz
torch.diagztorch.diagflatztorch.diagonal_copyztorch.diagonal_scatterztorch.diagonalz
torch.diffztorch.digammaz
torch.distz	torch.divztorch.dividez	torch.dotztorch.dropout_ztorch.dropoutz
torch.dsmmztorch.dsplitztorch.dstackztorch.embedding_bagztorch.embedding_renorm_ztorch.embeddingztorch.empty_likeztorch.empty_permutedztorch.empty_quantizedztorch.empty_stridedztorch.emptyztorch.eqztorch.equalz
torch.erf_z	torch.erfztorch.erfc_z
torch.erfcztorch.erfinvz
torch.exp_z	torch.expztorch.exp2_z
torch.exp2ztorch.expand_copyztorch.expm1_ztorch.expm1z	torch.eyez&torch.fake_quantize_per_channel_affinez%torch.fake_quantize_per_tensor_affinez/torch.fbgemm_linear_fp16_weight_fp32_activationztorch.fbgemm_linear_fp16_weightz/torch.fbgemm_linear_int8_weight_fp32_activationztorch.fbgemm_linear_int8_weightz#torch.fbgemm_linear_quantize_weightz"torch.fbgemm_pack_gemm_matrix_fp16z"torch.fbgemm_pack_quantized_matrixztorch.feature_alpha_dropout_ztorch.feature_alpha_dropoutztorch.feature_dropout_ztorch.feature_dropoutztorch.fill_z
torch.fillz
torch.fix_z	torch.fixztorch.flattenz
torch.flipztorch.fliplrztorch.flipudztorch.float_powerztorch.floor_ztorch.floor_divideztorch.floorz
torch.fmaxz
torch.fminz
torch.fmodztorch.frac_z
torch.fracztorch.frexpztorch.frobenius_normztorch.from_fileztorch.from_numpyztorch.frombufferztorch.full_likez
torch.fullz%torch.fused_moving_avg_obs_fake_quantztorch.gatherz
torch.gcd_z	torch.gcdztorch.geztorch.geqrfz	torch.gerztorch.get_deviceztorch.gradientztorch.greater_equalztorch.greaterztorch.grid_sampler_2dztorch.grid_sampler_3dztorch.grid_samplerztorch.group_normztorch.gru_cellz	torch.gruztorch.gtztorch.hamming_windowztorch.hann_windowztorch.hardshrinkztorch.heavisideztorch.hinge_embedding_lossztorch.histcztorch.histogramztorch.histogramddz
torch.hsmmztorch.hsplitztorch.hspmmztorch.hstackztorch.hypotz	torch.i0_ztorch.i0ztorch.igammaztorch.igammacz
torch.imagztorch.index_addztorch.index_copyztorch.index_fillztorch.index_put_ztorch.index_putztorch.index_reduceztorch.index_selectztorch.indices_copyztorch.innerztorch.instance_normztorch.int_reprztorch.inverseztorch.is_complexztorch.is_conjztorch.is_distributedztorch.is_floating_pointztorch.is_inferenceztorch.is_negztorch.is_nonzeroztorch.is_same_sizeztorch.is_signedztorch.is_vulkan_availableztorch.iscloseztorch.isfinitez
torch.isinztorch.isinfztorch.isnanztorch.isneginfztorch.isposinfztorch.isrealztorch.istftztorch.kaiser_windowztorch.kl_divz
torch.kronztorch.kthvalueztorch.layer_normz
torch.lcm_z	torch.lcmztorch.ldexp_ztorch.ldexpztorch.lez
torch.lerpztorch.less_equalz
torch.lessztorch.lgammaztorch.linspacez
torch.log_ztorch.log_softmaxz	torch.logztorch.log10_ztorch.log10ztorch.log1p_ztorch.log1pztorch.log2_z
torch.log2ztorch.logaddexpztorch.logaddexp2ztorch.logcumsumexpztorch.logdetztorch.logical_andztorch.logical_notztorch.logical_orztorch.logical_xorztorch.logit_ztorch.logitztorch.logspaceztorch.logsumexpztorch.lstm_cellz
torch.lstmztorch.ltztorch.lu_solveztorch.lu_unpackztorch.margin_ranking_lossztorch.masked_fillztorch.masked_scatterztorch.masked_selectztorch.matmulztorch.matrix_expztorch.matrix_powerztorch.max_pool1d_with_indicesztorch.max_pool1dztorch.max_pool2dztorch.max_pool3dz	torch.maxztorch.maximumz
torch.meanztorch.medianz	torch.minztorch.minimumztorch.miopen_batch_normz!torch.miopen_convolution_add_reluztorch.miopen_convolution_reluz"torch.miopen_convolution_transposeztorch.miopen_convolutionz"torch.miopen_depthwise_convolutionztorch.miopen_rnnz torch.mkldnn_adaptive_avg_pool2dztorch.mkldnn_convolutionz$torch.mkldnn_linear_backward_weightsztorch.mkldnn_max_pool2dztorch.mkldnn_max_pool3dztorch.mkldnn_rnn_layerztorch.mmz
torch.modeztorch.moveaxisztorch.movedimztorch.msortz	torch.mulztorch.multinomialztorch.multiplyztorch.mvztorch.mvlgammaztorch.nan_to_num_ztorch.nan_to_numztorch.nanmeanztorch.nanmedianztorch.nanquantileztorch.nansumztorch.narrow_copyztorch.narrowztorch.native_batch_normztorch.native_channel_shuffleztorch.native_dropoutztorch.native_group_normztorch.native_layer_normztorch.native_normztorch.nez
torch.neg_z	torch.negztorch.negative_ztorch.negativeztorch.nextafterztorch.nonzero_staticztorch.nonzeroztorch.norm_except_dimztorch.normalztorch.not_equalztorch.nuclear_normztorch.numelztorch.ones_likez
torch.onesztorch.orgqrztorch.ormqrztorch.outerztorch.pairwise_distanceztorch.pdistztorch.permute_copyztorch.permuteztorch.pinverseztorch.pixel_shuffleztorch.pixel_unshuffleztorch.poisson_nll_lossztorch.poissonztorch.polarztorch.polygammaztorch.positivez	torch.powztorch.preluztorch._printz
torch.prodztorch.promote_typesz	torch.putztorch.q_per_channel_axisztorch.q_per_channel_scalesztorch.q_per_channel_zero_pointsztorch.q_scaleztorch.q_zero_pointztorch.qrztorch.quantileztorch.quantize_per_channelz!torch.quantize_per_tensor_dynamicztorch.quantize_per_tensorztorch.quantized_batch_normztorch.quantized_gru_cellztorch.quantized_lstm_cellztorch.quantized_max_pool1dztorch.quantized_max_pool2dztorch.quantized_max_pool3dztorch.quantized_rnn_relu_cellztorch.quantized_rnn_tanh_cellztorch.rad2deg_ztorch.rad2degztorch.rand_likez
torch.randztorch.randint_likeztorch.randintztorch.randn_likeztorch.randnztorch.randpermztorch.rangeztorch.ravelz
torch.realztorch.reciprocal_ztorch.reciprocalztorch.relu_z
torch.reluztorch.remainderztorch.renormztorch.repeat_interleaveztorch.reshapeztorch.resolve_conjztorch.resolve_negztorch.result_typeztorch.rms_normztorch.rnn_relu_cellztorch.rnn_reluztorch.rnn_tanh_cellztorch.rnn_tanhz
torch.rollztorch.rot90ztorch.round_ztorch.roundztorch.row_indices_copyztorch.row_stackztorch.rrelu_ztorch.rreluztorch.rsqrt_ztorch.rsqrtz
torch.rsubztorch.saddmmztorch.scalar_tensorztorch.scatter_addztorch.scatter_reduceztorch.scatterztorch.searchsortedztorch.segment_reduceztorch.select_copyztorch.select_scatterztorch.selectztorch.selu_z
torch.seluz	torch.sgnztorch.sigmoid_ztorch.sigmoidz
torch.signz!torch.signal.windows.windows.sqrtztorch.signbitz
torch.sin_z	torch.sinztorch.sinc_z
torch.sincztorch.sinh_z
torch.sinhztorch.slice_copyztorch.slice_scatterztorch.slogdetz	torch.smmztorch.softmaxz
torch.sortztorch.split_copyztorch.split_with_sizes_copyztorch.split_with_sizesz
torch.spmmztorch.sqrt_z
torch.sqrtztorch.square_ztorch.squareztorch.squeeze_copyztorch.squeezeztorch.sspaddmmztorch.stackztorch.std_meanz	torch.stdz	torch.subztorch.subtractz	torch.sumz	torch.svdztorch.swapaxesztorch.swapdimsz"torch.sym_constrain_range_for_sizeztorch.sym_constrain_rangeztorch.t_copyztorch.tztorch.take_along_dimz
torch.takez
torch.tan_z	torch.tanztorch.tanh_z
torch.tanhztorch.tensor_splitztorch.tensorztorch.threshold_ztorch.thresholdz
torch.tilez
torch.topkztorch.traceztorch.transpose_copyztorch.transposeztorch.trapezoidztorch.trapzztorch.triangular_solveztorch.tril_indicesz
torch.trilztorch.triplet_margin_lossztorch.triu_indicesz
torch.triuztorch.true_divideztorch.trunc_ztorch.truncztorch.unbind_copyztorch.unbindztorch.unflattenztorch.unfold_copyztorch.unsafe_chunkztorch.unsafe_split_with_sizesztorch.unsafe_splitztorch.unsqueeze_copyztorch.unsqueezeztorch.values_copyztorch.vanderztorch.var_meanz	torch.varz
torch.vdotztorch.view_as_complex_copyztorch.view_as_complexztorch.view_as_real_copyztorch.view_as_realztorch.view_copyztorch.vsplitztorch.vstackztorch.whereztorch.xlogy_ztorch.xlogyztorch.zero_ztorch.zerosztorch.zeros_likeztorch._fused_sgd_ztorch.slice_inverseztorch._assert_scalarztorch._functional_assert_scalarz torch.xpu._get_device_properties)      z	math.exp2z	math.cbrt(~  z:torch.__future__.get_overwrite_module_params_on_conversionz:torch.__future__.set_overwrite_module_params_on_conversionztorch.__getattr__ztorch._assertztorch._check_indexztorch._check_is_sizeztorch._check_not_implementedztorch._check_tensor_all_withztorch._check_tensor_allztorch._check_typeztorch._check_valueztorch._check_withztorch._checkztorch._compile._disable_dynamoz torch._functorch.apis.chunk_vmapzHtorch._functorch.batch_norm_replacement.batch_norm_without_running_statszGtorch._functorch.batch_norm_replacement.replace_all_batch_norm_modules_z6torch._functorch.deprecated.combine_state_for_ensemblez)torch._functorch.deprecated.functionalizez'torch._functorch.deprecated.get_warningz8torch._functorch.deprecated.make_functional_with_buffersz+torch._functorch.deprecated.make_functionalz&torch._functorch.deprecated.setup_docsz+torch._functorch.deprecated.warn_deprecatedz5torch._functorch.eager_transforms._any_differentiablez0torch._functorch.eager_transforms._autograd_gradz;torch._functorch.eager_transforms._set_tensor_requires_gradz4torch._functorch.eager_transforms._is_differentiablezAtorch._functorch.eager_transforms._maybe_unwrap_functional_tensorz?torch._functorch.eager_transforms._maybe_wrap_functional_tensorzEtorch._functorch.eager_transforms._unwrap_all_tensors_from_functionalzAtorch._functorch.eager_transforms._wrap_all_tensors_to_functionalz>torch._functorch.eager_transforms.assert_flat_tuple_of_tensorsz/torch._functorch.eager_transforms.functionalizez5torch._functorch.eager_transforms.lazy_dynamo_disablez&torch._functorch.eager_transforms.noopz<torch._functorch.utils.enable_single_level_autograd_functionz!torch._functorch.utils.exposed_inz+torch._functorch.utils.unwrap_dead_wrappersz.torch._functorch.vmap.lazy_load_decompositionsztorch._guards.compile_contextztorch._guards.detect_fake_modeztorch._guards.tracingz=torch._higher_order_ops.map._has_potential_branch_input_aliasz@torch._higher_order_ops.map._has_potential_branch_input_mutationz)torch._higher_order_ops.map._stack_pytreez+torch._higher_order_ops.map._unstack_pytreez.torch._higher_order_ops.map.create_fw_bw_graphz(torch._higher_order_ops.map.map_autogradz%torch._higher_order_ops.map.map_densez0torch._higher_order_ops.map.map_fake_tensor_modez-torch._higher_order_ops.map.map_functionalizez9torch._higher_order_ops.map.map_proxy_torch_dispatch_modez'torch._higher_order_ops.map.map_wrapperz%torch._higher_order_ops.map.trace_mapz4torch._higher_order_ops.out_dtype.elementwise_dtypesz+torch._higher_order_ops.out_dtype.is_int_mmz1torch._higher_order_ops.out_dtype.out_dtype_densez<torch._higher_order_ops.out_dtype.out_dtype_fake_tensor_modez4torch._higher_order_ops.out_dtype.out_dtype_fallbackz0torch._higher_order_ops.out_dtype.out_dtype_funcz1torch._higher_order_ops.out_dtype.out_dtype_proxyz1torch._higher_order_ops.out_dtype.trace_out_dtypez<torch._higher_order_ops.utils.autograd_not_implemented_innerz6torch._higher_order_ops.utils.autograd_not_implementedztorch._linalg_utils._symeigztorch._linalg_utils.basisztorch._linalg_utils.bformztorch._linalg_utils.eigz&torch._linalg_utils.get_floating_dtypeztorch._linalg_utils.is_sparseztorch._linalg_utils.lstsqztorch._linalg_utils.matmulztorch._linalg_utils.matrix_rankztorch._linalg_utils.qformztorch._linalg_utils.solveztorch._linalg_utils.symeigztorch._load_global_depsztorch._lowrank._svd_lowrankz$torch._lowrank.get_approximate_basisztorch._lowrank.pca_lowrankztorch._lowrank.svd_lowrankztorch._preload_cuda_depsztorch._register_device_moduleztorch._running_with_deployztorch._utils._dummy_typez#torch._utils._flatten_dense_tensorsz%torch._utils._unflatten_dense_tensorsz2torch._weights_only_unpickler._get_allowed_globalsz"torch._weights_only_unpickler.loadz%torch.accelerator.current_acceleratorz&torch.accelerator.current_device_indexz torch.accelerator.current_streamztorch.accelerator.device_countztorch.accelerator.is_availableztorch.accelerator.set_streamztorch.accelerator.synchronizeztorch.align_tensorsz'torch.amp.autocast_mode._enter_autocastz&torch.amp.autocast_mode._exit_autocastz*torch.amp.autocast_mode.autocast_decoratorz"torch.amp.autocast_mode.custom_bwdz"torch.amp.autocast_mode.custom_fwdz*torch.are_deterministic_algorithms_enabledztorch.atleast_1dztorch.atleast_2dztorch.atleast_3dztorch.autograd._calculate_shapez#torch.autograd._is_checkpoint_validztorch.autograd._make_gradsz3torch.autograd._register_py_tensor_class_for_devicez*torch.autograd._tensor_or_tensors_to_tuplez4torch.autograd.forward_ad._maybe_load_decompositionsz$torch.autograd.function._iter_filterz(torch.autograd.function._iter_jit_valuesz*torch.autograd.function._iter_None_tensorsz0torch.autograd.function._iter_tensors_permissivez%torch.autograd.function._iter_tensorsz.torch.autograd.function._jit_unwrap_structuredz(torch.autograd.function._map_tensor_dataz#torch.autograd.function._nested_mapz"torch.autograd.function._unflattenz+torch.autograd.function.once_differentiablez!torch.autograd.function.traceablez+torch.autograd.functional._as_tuple_nocheckz#torch.autograd.functional._as_tuplez(torch.autograd.functional._autograd_gradz.torch.autograd.functional._check_requires_gradz7torch.autograd.functional._construct_standard_basis_forz(torch.autograd.functional._fill_in_zerosz+torch.autograd.functional._grad_postprocessz*torch.autograd.functional._grad_preprocessz!torch.autograd.functional._jacfwdz,torch.autograd.functional._tuple_postprocessz%torch.autograd.functional._validate_vz!torch.autograd.functional.hessianztorch.autograd.functional.hvpz"torch.autograd.functional.jacobianztorch.autograd.functional.jvpztorch.autograd.functional.vhpztorch.autograd.functional.vjpz.torch.autograd.grad_mode._enter_inference_modez-torch.autograd.grad_mode._exit_inference_modeztorch.autograd.graph._get_sidztorch.autograd.graph._get_tidz4torch.autograd.graph.allow_mutation_on_saved_tensorsz&torch.autograd.graph.get_gradient_edgez&torch.autograd.graph.increment_versionz-torch.autograd.graph.register_multi_grad_hookztorch.autograd.variablez,torch.backends.__allow_nonbracketed_mutationz%torch.backends.cpu.get_cpu_capabilityz/torch.backends.cuda.can_use_efficient_attentionz+torch.backends.cuda.can_use_flash_attentionz+torch.backends.cuda.can_use_cudnn_attentionz$torch.backends.cuda.enable_flash_sdpz#torch.backends.cuda.enable_math_sdpz6torch.backends.cuda.allow_fp16_bf16_reduction_math_sdpz,torch.backends.cuda.enable_mem_efficient_sdpz%torch.backends.cuda.flash_sdp_enabledztorch.backends.cuda.is_builtz0torch.backends.cuda.is_flash_attention_availablez$torch.backends.cuda.math_sdp_enabledz8torch.backends.cuda.fp16_bf16_reduction_math_sdp_allowedz-torch.backends.cuda.mem_efficient_sdp_enabledz%torch.backends.cuda.cudnn_sdp_enabledz$torch.backends.cuda.enable_cudnn_sdpz*torch.backends.cuda.preferred_blas_libraryz,torch.backends.cuda.preferred_linalg_libraryz-torch.backends.cuda.preferred_rocm_fa_libraryztorch.backends.cuda.sdp_kernelztorch.backends.cudnn._initztorch.backends.cudnn.flagsz"torch.backends.cudnn.is_acceptablez!torch.backends.cudnn.is_availableztorch.backends.cudnn.set_flagsztorch.backends.cudnn.versionz#torch.backends.disable_global_flagsztorch.backends.flags_frozenztorch.backends.mkl.is_availableztorch.backends.mkldnn.flagsz"torch.backends.mkldnn.is_availableztorch.backends.mkldnn.set_flagsztorch.backends.mps._initztorch.backends.mps.is_availableztorch.backends.mps.is_builtz&torch.backends.mps.is_macos13_or_newerz"torch.backends.openmp.is_availablez(torch.backends.quantized._get_qengine_idz)torch.backends.quantized._get_qengine_strztorch.block_diagztorch.broadcast_tensorsztorch.cartesian_prodztorch.cdistztorch.chain_matmulztorch.compileztorch.compiled_with_cxx11_abir&   r'   r(   r)   r*   r+   ztorch.cpu._init_amxztorch.cpu.current_deviceztorch.cpu.current_streamztorch.cpu.device_countztorch.cpu.is_availableztorch.cpu.set_deviceztorch.cpu.streamztorch.cpu.synchronizeztorch.cuda._check_capabilityztorch.cuda._check_cubinsztorch.cuda._device_count_amdsmiztorch.cuda._device_count_nvmlztorch.cuda._get_amdsmi_handlerz#torch.cuda._get_amdsmi_device_indexztorch.cuda._get_deviceztorch.cuda._get_generatorz!torch.cuda._get_nvml_device_indexztorch.cuda._get_pynvml_handlerz torch.cuda._get_rng_state_offsetztorch.cuda._is_compiledztorch.cuda._lazy_callztorch.cuda._lazy_initz*torch.cuda._memory_viz._block_extra_legacyz#torch.cuda._memory_viz._block_extraz#torch.cuda._memory_viz._format_sizez"torch.cuda._memory_viz._format_vizz$torch.cuda._memory_viz._frame_filterz!torch.cuda._memory_viz._frame_fmtz"torch.cuda._memory_viz._frames_fmtz+torch.cuda._memory_viz._profile_to_snapshotz#torch.cuda._memory_viz._report_freez$torch.cuda._memory_viz._write_blocksz"torch.cuda._memory_viz.calc_activeztorch.cuda._memory_viz.comparez(torch.cuda._memory_viz.format_flamegraphztorch.cuda._memory_viz.memoryz#torch.cuda._memory_viz.profile_plotz#torch.cuda._memory_viz.segment_plotztorch.cuda._memory_viz.segmentsztorch.cuda._memory_viz.segsumz!torch.cuda._memory_viz.trace_plotztorch.cuda._memory_viz.traceztorch.cuda._nvml_based_availz!torch.cuda._parse_visible_devicesz#torch.cuda._raw_device_count_amdsmiz!torch.cuda._raw_device_count_nvmlz"torch.cuda._raw_device_uuid_amdsmiz torch.cuda._raw_device_uuid_nvmlz#torch.cuda._register_triton_kernelsz torch.cuda._set_rng_state_offsetztorch.cuda._set_stream_by_idztorch.cuda._sleepz&torch.cuda._transform_uuid_to_ordinalsz#torch.cuda._utils._get_device_indexz"torch.cuda.amp.autocast_mode._castz'torch.cuda.amp.autocast_mode.custom_bwdz'torch.cuda.amp.autocast_mode.custom_fwdz2torch.cuda.amp.common.amp_definitely_not_availablez2torch.amp.grad_scaler._refresh_per_optimizer_statez!torch.cuda.can_device_access_peerztorch.cuda.check_errorztorch.cuda.clock_rateztorch.cuda.cudartztorch.cuda.current_blas_handleztorch.cuda.current_streamztorch.cuda.default_streamztorch.cuda.device_countztorch.cuda.device_memory_usedztorch.cuda.get_arch_listz torch.cuda.get_device_capabilityztorch.cuda.get_device_namez torch.cuda.get_device_propertiesztorch.cuda.get_gencode_flagsztorch.cuda.get_sync_debug_modez#torch.cuda.graphs.graph_pool_handlez-torch.cuda.graphs.is_current_stream_capturingz(torch.cuda.graphs.make_graphed_callablesztorch.cuda.initztorch.cuda.ipc_collectztorch.cuda.is_availableztorch.cuda.is_bf16_supportedztorch.cuda.is_initializedz#torch.cuda.jiterator._create_jit_fnz0torch.cuda.jiterator._create_multi_output_jit_fnztorch.cuda.memory_usagez torch.cuda.memory._dump_snapshotztorch.cuda.memory._free_mutexz(torch.cuda.memory._get_current_allocatorz!torch.cuda.memory._host_allocatorz-torch.cuda.memory._record_memory_history_implz/torch.cuda.memory._record_memory_history_legacyz(torch.cuda.memory._record_memory_historyz$torch.cuda.memory._save_memory_usagez%torch.cuda.memory._save_segment_usagez)torch.cuda.memory._set_allocator_settingsztorch.cuda.memory._snapshotz)torch.cuda.memory.caching_allocator_allocz*torch.cuda.memory.caching_allocator_deletez*torch.cuda.memory.caching_allocator_enablez*torch.cuda.memory.change_current_allocatorztorch.cuda.memory.empty_cachez'torch.cuda.memory.get_allocator_backendz1torch.cuda.memory.get_per_process_memory_fractionz2torch.cuda.memory.host_memory_stats_as_nested_dictz#torch.cuda.memory.host_memory_statsz$torch.cuda.memory.list_gpu_processesz&torch.cuda.memory.max_memory_allocatedz#torch.cuda.memory.max_memory_cachedz%torch.cuda.memory.max_memory_reservedztorch.cuda.memory.mem_get_infoz"torch.cuda.memory.memory_allocatedztorch.cuda.memory.memory_cachedz!torch.cuda.memory.memory_reservedz!torch.cuda.memory.memory_snapshotz-torch.cuda.memory.memory_stats_as_nested_dictztorch.cuda.memory.memory_statsz torch.cuda.memory.memory_summaryz5torch.cuda.memory.reset_accumulated_host_memory_statsz0torch.cuda.memory.reset_accumulated_memory_statsz,torch.cuda.memory.reset_max_memory_allocatedz)torch.cuda.memory.reset_max_memory_cachedz.torch.cuda.memory.reset_peak_host_memory_statsz)torch.cuda.memory.reset_peak_memory_statsz1torch.cuda.memory.set_per_process_memory_fractionz$torch.cuda.nccl._check_sequence_typeztorch.cuda.nccl.all_gatherztorch.cuda.nccl.all_reduceztorch.cuda.nccl.broadcastztorch.cuda.nccl.init_rankztorch.cuda.nccl.is_availableztorch.cuda.nccl.reduce_scatterztorch.cuda.nccl.reduceztorch.cuda.nccl.unique_idztorch.cuda.nccl.versionztorch.cuda.nvtx.markztorch.cuda.nvtx.range_endztorch.cuda.nvtx.range_popztorch.cuda.nvtx.range_pushztorch.cuda.nvtx.range_startztorch.cuda.nvtx.rangeztorch.cuda.power_drawztorch.cuda.profiler.initztorch.cuda.profiler.profileztorch.cuda.profiler.startztorch.cuda.profiler.stopz#torch.cuda.random.get_rng_state_allztorch.cuda.random.initial_seedz!torch.cuda.random.manual_seed_allztorch.cuda.random.manual_seedztorch.cuda.random.seed_allztorch.cuda.random.seedz#torch.cuda.random.set_rng_state_allztorch.cuda.set_streamztorch.cuda.set_sync_debug_modeztorch.cuda.streamztorch.cuda.synchronizeztorch.cuda.temperatureztorch.cuda.utilizationztorch.einsumz!torch.functional._check_list_sizez+torch.functional._consecutive_return_countsz2torch.functional._consecutive_return_inverse_falsez1torch.functional._consecutive_return_inverse_truez,torch.functional._consecutive_return_inversez+torch.functional._consecutive_return_outputztorch.functional._lu_implztorch.functional._lu_no_infosztorch.functional._lu_with_infosztorch.functional._meshgridztorch.functional._return_countsz&torch.functional._return_inverse_falsez%torch.functional._return_inverse_truez torch.functional._return_inverseztorch.functional._return_outputz)torch.functional._unique_consecutive_implztorch.functional._unique_implztorch.functional._unravel_indexz!torch.functional.broadcast_shapesztorch.functional.luztorch.functional.uniqueztorch.functional.unravel_indexztorch.futures.collect_allztorch.futures.wait_allz6torch.fx.experimental.const_fold.split_const_subgraphsz*torch.fx.experimental.proxy_tensor.make_fxz"torch.get_deterministic_debug_modez"torch.get_float32_matmul_precisionz3torch.is_deterministic_algorithms_warn_only_enabledztorch.is_storageztorch.is_tensorztorch.is_warn_always_enabledztorch.masked._ops._anyz,torch.masked._ops._apply_docstring_templatesz torch.masked._ops._canonical_dimz)torch.masked._ops._combine_input_and_maskz%torch.masked._ops._generate_docstringztorch.masked._ops._input_maskztorch.masked._ops._output_maskz%torch.masked._ops._reduction_identityz-torch.masked._ops._sparse_coo_flatten_indicesz6torch.masked._ops._sparse_coo_scatter_reduction_helperz#torch.masked._ops._sparse_coo_wherez6torch.masked._ops._sparse_csr_segment_reduction_helperz#torch.masked._ops._sparse_csr_whereztorch.masked._ops._std_varztorch.masked._ops._whereztorch.masked._ops.amaxztorch.masked._ops.aminztorch.masked._ops.argmaxztorch.masked._ops.argminz*torch.masked._ops.corresponding_real_dtypeztorch.masked._ops.cumprodztorch.masked._ops.cumsumztorch.masked._ops.log_softmaxztorch.masked._ops.logaddexpztorch.masked._ops.logsumexpztorch.masked._ops.meanztorch.masked._ops.medianztorch.masked._ops.normztorch.masked._ops.normalizeztorch.masked._ops.prodztorch.masked._ops.softmaxztorch.masked._ops.softminztorch.masked._ops.stdztorch.masked._ops.sumztorch.masked._ops.varztorch.meshgridz$torch.mps._get_default_mps_generatorz"torch.mps.current_allocated_memoryz!torch.mps.driver_allocated_memoryztorch.mps.empty_cacheztorch.mps.get_rng_stateztorch.mps.manual_seedztorch.mps.profiler.profileztorch.mps.profiler.startztorch.mps.profiler.stopztorch.mps.seedz)torch.mps.set_per_process_memory_fractionztorch.mps.set_rng_stateztorch.mps.synchronizez7torch.nested._internal.nested_tensor.buffer_from_jaggedz6torch.nested._internal.nested_tensor.get_tensor_symintz5torch.nested._internal.nested_tensor.is_expandable_toz5torch.nested._internal.nested_tensor.jagged_from_listzCtorch.nested._internal.nested_tensor.jagged_from_tensor_and_lengthszDtorch.nested._internal.nested_tensor.nested_view_from_values_offsetszLtorch.nested._internal.nested_tensor.nested_view_from_values_offsets_lengthsztorch.nested.as_nested_tensorztorch.nested.narrowztorch.nested.nested_tensorztorch.nn._reduction.get_enumz#torch.nn._reduction.legacy_get_enumz%torch.nn._reduction.legacy_get_stringztorch.nn.factory_kwargsz'torch.nn.functional.adaptive_avg_pool2dz'torch.nn.functional.adaptive_avg_pool3dz4torch.nn.functional.adaptive_max_pool1d_with_indicesz'torch.nn.functional.adaptive_max_pool1dz4torch.nn.functional.adaptive_max_pool2d_with_indicesz'torch.nn.functional.adaptive_max_pool2dz4torch.nn.functional.adaptive_max_pool3d_with_indicesz'torch.nn.functional.adaptive_max_pool3dztorch.nn.functional.affine_gridz!torch.nn.functional.alpha_dropoutz&torch.nn.functional.assert_int_or_pairztorch.nn.functional.batch_normz4torch.nn.functional.binary_cross_entropy_with_logitsz(torch.nn.functional.binary_cross_entropyztorch.nn.functional.celuz)torch.nn.functional.cosine_embedding_lossz!torch.nn.functional.cross_entropyztorch.nn.functional.ctc_lossztorch.nn.functional.dropoutztorch.nn.functional.dropout1dztorch.nn.functional.dropout2dztorch.nn.functional.dropout3dztorch.nn.functional.eluz!torch.nn.functional.embedding_bagztorch.nn.functional.embeddingz)torch.nn.functional.feature_alpha_dropoutztorch.nn.functional.foldz6torch.nn.functional.fractional_max_pool2d_with_indicesz)torch.nn.functional.fractional_max_pool2dz6torch.nn.functional.fractional_max_pool3d_with_indicesz)torch.nn.functional.fractional_max_pool3dz%torch.nn.functional.gaussian_nll_lossztorch.nn.functional.gluztorch.nn.functional.grid_sampleztorch.nn.functional.group_normz"torch.nn.functional.gumbel_softmaxztorch.nn.functional.hardsigmoidztorch.nn.functional.hardswishztorch.nn.functional.hardtanhz(torch.nn.functional.hinge_embedding_lossztorch.nn.functional.huber_lossz!torch.nn.functional.instance_normztorch.nn.functional.interpolateztorch.nn.functional.kl_divztorch.nn.functional.l1_lossztorch.nn.functional.layer_normztorch.nn.functional.leaky_reluz'torch.nn.functional.local_response_normztorch.nn.functional.log_softmaxztorch.nn.functional.lp_pool1dztorch.nn.functional.lp_pool2dz'torch.nn.functional.margin_ranking_lossz+torch.nn.functional.max_pool1d_with_indicesztorch.nn.functional.max_pool1dz+torch.nn.functional.max_pool2d_with_indicesztorch.nn.functional.max_pool2dz+torch.nn.functional.max_pool3d_with_indicesztorch.nn.functional.max_pool3dz torch.nn.functional.max_unpool1dz torch.nn.functional.max_unpool2dz torch.nn.functional.max_unpool3dztorch.nn.functional.mishztorch.nn.functional.mse_lossz0torch.nn.functional.multi_head_attention_forwardz%torch.nn.functional.multi_margin_lossz*torch.nn.functional.multilabel_margin_lossz/torch.nn.functional.multilabel_soft_margin_lossztorch.nn.functional.nll_lossztorch.nn.functional.normalizez$torch.nn.functional.poisson_nll_lossztorch.nn.functional.reluztorch.nn.functional.relu6ztorch.nn.functional.rreluztorch.nn.functional.seluztorch.nn.functional.sigmoidztorch.nn.functional.siluz"torch.nn.functional.smooth_l1_lossz$torch.nn.functional.soft_margin_lossztorch.nn.functional.softmaxztorch.nn.functional.softminztorch.nn.functional.softsignztorch.nn.functional.tanhztorch.nn.functional.tanhshrinkz'torch.nn.functional.triplet_margin_lossztorch.nn.functional.unfoldz%torch.nn.functional.upsample_bilinearz$torch.nn.functional.upsample_nearestztorch.nn.functional.upsampleztorch.nn.grad._pairztorch.nn.grad._singleztorch.nn.grad._tripleztorch.nn.grad.conv1d_inputztorch.nn.grad.conv1d_weightztorch.nn.grad.conv2d_inputztorch.nn.grad.conv2d_weightztorch.nn.grad.conv3d_inputztorch.nn.grad.conv3d_weightz/torch.nn.modules.activation._is_make_fx_tracingz)torch.nn.modules.utils._list_with_defaultztorch.nn.modules.utils._ntuplez!torch.nn.modules.utils._quadruplez,torch.nn.modules.utils._reverse_repeat_tuplez>torch.nn.modules.utils.consume_prefix_in_state_dict_if_presentztorch.nn.parameter.is_lazyz
torch.normz"torch.quantization.default_eval_fnz torch.random._seed_custom_deviceztorch.random.fork_rngztorch.random.initial_seedztorch.random.seedz,torch.return_types.pytree_register_structseqztorch.set_default_dtypeztorch.set_default_tensor_typez"torch.set_deterministic_debug_modez"torch.set_float32_matmul_precisionztorch.set_warn_alwaysz(torch.signal.windows.windows._add_docstrz4torch.signal.windows.windows._window_function_checksz%torch.signal.windows.windows.bartlettz%torch.signal.windows.windows.blackmanz#torch.signal.windows.windows.cosinez(torch.signal.windows.windows.exponentialz%torch.signal.windows.windows.gaussianz+torch.signal.windows.windows.general_cosinez,torch.signal.windows.windows.general_hammingz$torch.signal.windows.windows.hammingz!torch.signal.windows.windows.hannz#torch.signal.windows.windows.kaiserz(torch.signal.windows.windows.merge_dictsz$torch.signal.windows.windows.nuttallz)torch.signal.windows.windows.parse_kwargsz6torch.sparse.semi_structured.to_sparse_semi_structuredztorch.sparse.sumztorch.splitz
torch.stftr    r!   r$   r"   r#   r   ztorch.tensordotztorch.unique_consecutivez"torch.use_deterministic_algorithmsztorch.xpu._get_deviceztorch.xpu._get_generatorztorch.xpu._get_rng_state_offsetztorch.xpu._is_compiledztorch.xpu._lazy_callztorch.xpu._lazy_initztorch.xpu._set_rng_state_offsetztorch.xpu._set_stream_by_idz"torch.xpu._utils._get_device_indexztorch.xpu.current_deviceztorch.xpu.current_streamztorch.xpu.device_countztorch.xpu.get_arch_listztorch.xpu.get_device_capabilityztorch.xpu.get_device_nameztorch.xpu.get_device_propertiesztorch.xpu.get_gencode_flagsz"torch.xpu.get_stream_from_externalztorch.xpu.initztorch.xpu.is_availableztorch.xpu.is_bf16_supportedztorch.xpu.is_initializedztorch.xpu.memory.empty_cachez%torch.xpu.memory.max_memory_allocatedz$torch.xpu.memory.max_memory_reservedztorch.xpu.memory.mem_get_infoz!torch.xpu.memory.memory_allocatedz torch.xpu.memory.memory_reservedz,torch.xpu.memory.memory_stats_as_nested_dictztorch.xpu.memory.memory_statsz/torch.xpu.memory.reset_accumulated_memory_statsz(torch.xpu.memory.reset_peak_memory_statsztorch.xpu.random.initial_seedztorch.xpu.random.seed_allztorch.xpu.random.seedztorch.xpu.set_streamztorch.xpu.synchronizer   returnc               
   C   s   i } t D ]}| D ]v\}}d|vr.t|}ntt|tdd   }|d ur|| v r| | |krtd| d| d| |  q|| |< qq| S )Nz.py#ztorch/zDuplicate torch object z with different rules: z, )torch_name_rule_mapitemsload_object_module_dirtorchlenAssertionError)dmkvobj r<   G/var/www/auris/lib/python3.9/site-packages/torch/_dynamo/trace_rules.pyget_torch_obj_rule_map  s    
r>   c                 C   s"   | j ddd\}}tt||S )N.r   )maxsplit)rsplitgetattr	importlibimport_module)Zfully_qualified_namemoduleZobj_namer<   r<   r=   _load_obj_from_str  s    rF   c              	   C   s   zd|  d}t|dkr4t|d }t||d }n&t|dksNJ d|  t|d }t|}W n ttfy~   d }Y n0 |S )N#   r   r   zInvalid obj name )splitr5   rF   rB   r   AttributeErrorImportError)namexr;   valr<   r<   r=   r2     s    

r2   c                  C   sv   h d} t  }ttjD ]8}ttj|}t|tjtjtj	fr|| vr|
| q|
tjj |
tjj t|S )N>   __new__Z_make_wrapper_subclassZ_make_subclass)setdirr4   ZTensorrB   
isinstancetypesMethodDescriptorTypeWrapperDescriptorTypeBuiltinFunctionTypeadd__contains__register_hook	frozenset)Zdisallowed_tensor_methodssrL   methodr<   r<   r=   get_tensor_method  s$    	r]   c                 C   s    | t  v pt| tjjtjjfS N)r]   rR   r4   Z_opsZOpOverloadPacketZ
OpOverloadr;   r<   r<   r=   is_aten_op_or_tensor_method  s    r`   c                   @   s   e Zd ZU dZdZeee  ed< dZ	ee
eef  ed< eg ee
eef ee f f ddddZee dd	d
ZeedddZedddZedddZeedddZdS )FunctionIdSeta2  
    Track a set of `id()`s of objects which are either allowed or not
    allowed to go into the generated FX graph.  Use to test for torch.*,
    numpy.*, builtins.*, etc.

    Support user modification to permit customization of what can be
    added to the graph and what will cause a graph break.
    Nfunction_idsfunction_names)lazy_initializerr/   c                 C   s
   || _ d S r^   )rd   )selfrd   r<   r<   r=   __init__  s    zFunctionIdSet.__init__r.   c                 C   sL   | j d u rF|  }t|tr2t| | _ || _nt|ts@J || _ | j S r^   )rb   rd   rR   dictrP   keysrc   )re   valuer<   r<   r=   __call__  s    

zFunctionIdSet.__call__)idxdefaultc                 C   s"   |   | j d usJ | j ||S r^   )rc   get)re   rk   rl   r<   r<   r=   get_name  s    zFunctionIdSet.get_name)rk   c                 C   s   |  }| | d S r^   )rW   re   rk   rb   r<   r<   r=   rW     s    zFunctionIdSet.addc                 C   s   |  }||v r| | d S r^   )removero   r<   r<   r=   rp     s    zFunctionIdSet.remove)rk   r/   c                 C   s
   ||  v S r^   r<   )re   rk   r<   r<   r=   rX     s    zFunctionIdSet.__contains__)__name__
__module____qualname____doc__rb   r   rP   int__annotations__rc   rg   strr   r   rf   rj   rn   rW   rp   boolrX   r<   r<   r<   r=   ra     s   
	ra   c                  C   s   i } | S r^   r<   rvr<   r<   r=   _allowed_callable_ids  s    r{   c                  C   s   i } | S r^   r<   ry   r<   r<   r=   _disallowed_callable_ids$  s    r|   c                  C   s   i } | S r^   r<   ry   r<   r<   r=   _nonstrict_trace_callable_ids*  s    r}   c                  C   sN   dd t j D } | dd tj D  | ttdttjdi | S )Nc                 S   s2   i | ]*\}}| d st|rt|d| qS _z	builtins.
startswithcallableid.0r9   r:   r<   r<   r=   
<dictcomp>3  s   z)_builtin_function_ids.<locals>.<dictcomp>c                 S   s2   i | ]*\}}| d st|rt|d| qS )r   z	operator.r   r   r<   r<   r=   r   9  s   ztyping.castzcopy.deepcopy)	builtins__dict__r1   updateoperatorr   r   copydeepcopyry   r<   r<   r=   _builtin_function_ids0  s    
r   c                   C   s   t  S r^   )rP   r<   r<   r<   r=   _polyfilled_function_idsH  s    r   c                     s^   h d  fdd} i }t D ]<}|j D ],\}}| |||r*|j d| |t|< q*q|S )N>   sampleseedZRandomStateZranfZget_bit_generatorZset_bit_generatorc                    sP   t |sdS t|dd sdS |j|jkr,dS |jdkrL|jdkrL|  vrLdS dS )NFrr   Tznumpy.random.mtrandznumpy.random)r   rB   rr   rq   )r9   r:   modZunsupported_funcsr<   r=   is_supportedY  s    z)_numpy_function_ids.<locals>.is_supportedr?   )r   r   r1   rq   r   )r   rz   r   r9   r:   r<   r   r=   _numpy_function_idsN  s    	r   c                  C   s   dd t j D } | S )zC
    Collects constant builtins by eliminating callable items.
    c                 S   s2   i | ]*\}}| d st|st|d| qS r~   r   r   r<   r<   r=   r   u  s   z)_builtin_constant_ids.<locals>.<dictcomp>)r   r   r1   ry   r<   r<   r=   _builtin_constant_idsp  s    r   _lazy_module_init)rL   	init_funcr/   c                 C   s4   d| vsJ d|  | t vs"J t |  | dS )z.Register a module without eagerly importing itr?   z%Expected a root module name, but got N)r   append)rL   r   r<   r<   r=   add_module_init_func  s    r   )r;   r/   c                 C   sN   t | dd }|d u rd S |dd }t|d }|d urJ|D ]
}|  q>d S )Nrr   r?   r   )rB   rI   r   pop)r;   rE   base_moduleZ
init_funcsfnr<   r<   r=   _maybe_init_lazy_module  s    r   c                 C   s   t |  t| tv S r^   )r   r   r{   r_   r<   r<   r=   is_callable_allowed  s    r   c                 C   s   t |  t| tv S r^   )r   r   r}   r_   r<   r<   r=   is_nonstrict_trace_callable  s    r   c                 C   s   t |  t| tv S r^   )r   r   r|   r_   r<   r<   r=   is_callable_disallowed  s    r   c                 C   s   t |  t| ddS )NZ_dynamo_forbiddenF)r   inspectgetattr_staticr_   r<   r<   r=   is_forbidden  s    r   c                 C   s   t | tv S r^   )r   r   r_   r<   r<   r=   is_builtin_callable  s    r   c                 C   s   t | tv S r^   )r   r   r_   r<   r<   r=   is_builtin_constant  s    r   c                 C   s   t | tv S r^   )r   r   r_   r<   r<   r=   is_polyfilled_callable  s    r   c                 C   s*   t d u rdS t| t jt jfp(t| tv S NF)r   rR   ZndarrayZgenericr   r   r_   r<   r<   r=   is_numpy  s    r   c                 C   s   t d u rdS t| t jS r   )r   rR   Zdtyper_   r<   r<   r=   is_numpy_dtype  s    r   c                 C   s   t d u rdS t| t jt jfS r   )r   rR   ZfinfoZiinfor_   r<   r<   r=   is_numpy_type_info  s    r   )Z
fx2trt_ossZ
hypothesisZnetworkxnumpyZonnxZonnxruntimeZonnx_tfZpandasZsklearntabulateZ
tensorflowZtensorrtZ	torch2trtZtqdmtreeZtvmZxarrayc                 C   s2   t tj|  }| tjjdfr.|d7 }|S )N/)r   ospathnormpathas_posixendswithsep)r   Z
posix_pathr<   r<   r=   _as_posix_path  s    r   c                 C   s   d}|  |} t| S )Nz__init__.py)removesuffixr   )r[   suffixr<   r<   r=   _strip_init_py  s    
r   )r8   c                 C   s   t | dd }|ot|S )N__file__)rB   r   )r8   filer<   r<   r=   r3     s    r3   >   ztorch._export.db.examplesz1torch.ao.quantization.quantizer.xnnpack_quantizerztorch._functorch.apisztorch.export.unflattenz!torch.nn.attention.flex_attentionz'torch.ao.quantization.pt2e.export_utilsztorch._dynamo.external_utilsz$torch.ao.quantization.pt2e.qat_utilsz torch.ao.quantization.pt2e.utilsz1torch.ao.quantization.pt2e.representation.rewriteztorch._export.wrappersztorch._functorch.deprecated>   z$torch.distributed.tensor.device_meshz6torch.distributed.tensor.parallel._data_parallel_utilsz'torch.distributed.tensor.parallel.stylez;torch.distributed.algorithms._checkpoint.checkpoint_wrapperztorch.distributed.tensor._apiz'torch.distributed._composable.replicateztorch.distributed.device_meshz(torch.distributed.tensor.parallel._utilsz#torch.distributed.fsdp._fully_shard),torch._decompz,torch._dynamo._trace_wrapped_higher_order_opztorch._dynamo.compiled_autogradztorch._dynamo.comptimeztorch._dynamo.polyfillsz7torch._functorch._aot_autograd.subclass_parametrizationz"torch._functorch.autograd_functionz!torch._functorch.eager_transformsz torch._functorch.functional_callztorch._functorch.pyfunctorchztorch._functorch.vmapztorch._inductor.test_operatorsztorch._library.autogradztorch._library.custom_ops
torch._opstorch._primstorch._refstorch._tensorztorch.amp.autocast_modeztorch.ao.nnztorch.autograd.functionztorch.backends.cudaztorch.cuda.amp.autocast_modetorch.distributionsztorch.export._tree_utilsztorch.export._wrapper_utilsztorch.fx._pytreeztorch.fx._symbolic_tracez"torch.fx.experimental.proxy_tensorztorch.fx.passes.shape_proptorch.nntorch.overridestorch.randomztorch.return_typestorch.sparsetorch.testingztorch.utils._content_storeztorch.utils._contextlibztorch.utils._cxx_pytreeztorch.utils._deviceztorch.utils._foreach_utilsztorch.utils._python_dispatchztorch.utils._pytreeztorch.utils.hookstorch.distributed)Wz	torch._VFztorch.__future__ztorch.__init__ztorch._awaitsztorch._classesztorch._compileztorch._custom_opztorch._custom_opsr   ztorch._deployztorch._dispatchztorch._dynamoztorch._exportztorch._functorchztorch._guardsztorch._higher_order_ops.effectsz!torch._higher_order_ops.torchbindztorch._higher_order_ops.wrapztorch._inductorztorch._jit_internalztorch._lazyztorch._libraryztorch._linalg_utilsztorch._lobpcgztorch._loggingztorch._lowrankztorch._meta_registrationsztorch._namedtensor_internalsztorch._numpyr   r   ztorch._prims_commonztorch._python_dispatcherr   ztorch._strobelightztorch._subclassesr   ztorch._tensor_strztorch._thread_safe_forkztorch._utilsztorch._utils_internalztorch._vmap_internalsztorch._weights_only_unpicklerztorch.acceleratorz	torch.ampztorch.aoztorch.autogradztorch.backendsztorch.compilerztorch.contribz	torch.cpuz
torch.cudar   r   ztorch.exportztorch.fbz	torch.fftztorch.functionalztorch.futuresztorch.fxz	torch.hubz	torch.jitztorch.libraryztorch.linalgztorch.maskedztorch.monitorz	torch.mpsz
torch.mtiaztorch.multiprocessingztorch.nestedr   z
torch.onnxr   ztorch.packageztorch.profilerztorch.quantizationztorch.quasirandomr   ztorch.serializationztorch.signalr   ztorch.specialztorch.storager   ztorch.typesztorch.utilsz	torch.xpuc                  C   s   dd t D } | S )Nc                 S   s0   h | ](}t tt|td d dd qS ztorch.Nr?   r   r   r3   r4   r5   replacer   r8   r<   r<   r=   	<setcomp>  s   z,get_legacy_mod_inlinelist.<locals>.<setcomp>)LEGACY_MOD_INLINELISTZ
inlinelistr<   r<   r=   get_legacy_mod_inlinelist  s    r   c                  C   s   dd t D } | S )Nc                 S   s0   h | ](}t tt|td d dd qS r   r   r   r<   r<   r=   r     s   z%get_mod_inlinelist.<locals>.<setcomp>)MOD_INLINELISTr   r<   r<   r=   get_mod_inlinelist  s    r   c                  C   s   dd t D } | S )Nc                 S   s0   h | ](}t tt|td d dd qS r   r   r   r<   r<   r=   r     s   z#get_mod_skiplist.<locals>.<setcomp>)MOD_SKIPLIST)Zskiplistr<   r<   r=   get_mod_skiplist  s    r   z<frozen importlibz<frozen abcz<__array_function__ internals>ztriton/backendszmatch nothing^FBCODE_SKIP_DIRSz.*(|)>   z5caffe2/torch/fb/sparsenn/pooled_embeddings_modules.pyztorchrec/distributedztorchrec/fb/distributedc                 c   s   | ]}t t|V  qd S r^   reescaper   r   r7   r<   r<   r=   	<genexpr>      r   ztorchrec/distributed/types.pyc                 c   s   | ]}t t|V  qd S r^   r   r   r<   r<   r=   r     r   zoptim/lr_scheduler.pyc                   C   s&   t dddd tD  dad S )Nz	^[^\s<]*(r   c                 s   s   | ]}t t|V  qd S r^   r   r   r<   r<   r=   r   $  r   z _recompile_re.<locals>.<genexpr>r   )r   compilejoin	SKIP_DIRSSKIP_DIRS_REr<   r<   r<   r=   _recompile_re!  s    r   )import_namec                 C   sj   t | tjrt| jS t | ts$J ddlm} || }|s@d S |j}|d u rRd S t	
t| t  d S )Nr   )	find_spec)rR   rS   
ModuleTyperW   rq   rw   importlib.utilr   originr   r   r   r   )r   r   Zmodule_specr   r<   r<   r=   rW   (  s    
rW   c                   @   s"   e Zd ZU eed< ee ed< dS )
SkipResultskippedreasonN)rq   rr   rs   rx   rv   r   rw   r<   r<   r<   r=   r   8  s   
r   Fc                    s4   du rt ddS t   tv r,t ddS t fddt D rNt ddS |rdt rdt dd	S t rtrtt	
 rtt
 st dd
S t rtjrtrtt
 rtt
 st ddS  ttrtjjjst ddS tt
 rt ddS t fddt D r*t ddS t ddS )zShould skip this file?NTzfilename is NoneFORCE_SKIP_FILESc                 3   s   | ]}  |V  qd S r^   r   r   filenamer<   r=   r   F  r   zcheck_file.<locals>.<genexpr>Fr   r   r   FBCODE_SKIP_TORCHREC_DIRSunittestr   c                 3   s   | ]}  |V  qd S r^   r   r   r   r<   r=   r   m  r   r   zinlined by default)r   r   r   anyr   is_torch_inline_allowedr	   r   rx   FBCODE_SKIP_DIRS_REmatch&FBCODE_INLINE_FILES_IN_SKIPPED_DIRS_REr   Zskip_torchrecr   FBCODE_SKIP_TORCHREC_DIRS_REr   r3   r   r4   _dynamoZenable_trace_unittestr   r   )r   is_inlined_callr<   r   r=   
check_file>  s`    





r   c                   @   s<   e Zd ZU ee ed< ee ed< eed< eej ed< dS )FunctionInfopy_objrL   r   codeN)	rq   rr   rs   r   objectrv   rw   rS   CodeTyper<   r<   r<   r=   r   r  s   
r   c                 C   s:  t | tttttfrTz|  }W n ty6   d }Y n0 t|| 	 | 
 |  }n\t | tjrttd | j| j| }n<t | tjtjfrt| | jt| | j}nt| d t| d }t }t|j|j|j||}t|tttfrtdd|  S t|trtdd|  S |tks"J |tdd|  S d S )NFz%inlined according trace_rules.lookup zregistered in torch_obj_rule Tz%skipped according trace_rules.lookup ) rR   r   r   r   r   r   Zget_functionNotImplementedErrorr   rn   get_filenameget_coderS   r   co_nameco_filenameFunctionType
MethodTyperq   r   __code__rP   lookup_innerr   rL   r   
issubclassr   r   r   r   r   )r;   r   r   fireasonsruler<   r<   r=   check_verbose  s^    

r
  c                 C   s   t | |jS r^   )r
  r   )r;   r   r<   r<   r=   check  s    r  c                    s   t  fddt D S )Nc                 3   s   | ]}  |V  qd S r^   r   r   r   r<   r=   r     r   z*is_torch_inline_allowed.<locals>.<genexpr>)r   r   r   r<   r   r=   r     s    r   c                  C   s   dd l } t| jS )Nr   )Ztorch._dynamor3   r   )r4   r<   r<   r=   
dynamo_dir  s    r  c                 C   s   |  t rdS |  ttS r   )r   r  r3   r4   r   r<   r<   r=   is_torch  s    r  c                 C   s@   t | sd S t| rtS t| r$tS t| r0tS t| r<tS d S r^   )	r   r   r   r   r   r   r   r   r   r_   r<   r<   r=   lookup_callable  s    r  c                 C   s   t | S r^   )r  r_   r<   r<   r=   lookup
  s    r  T)r  c                 C   sz   t | ||||d}tjrv|tu rv|d u r0t| }t|}tttd }||r`|	ds`tS |d urr|
d tS |S )N)rL   r   is_direct_callr  r   z#test_dont_skip_tracing_functions.pyzVAttempted skip but we are ignoring skips due to torch._dynamo.config.dont_skip_tracing)_lookup_innerr   Zdont_skip_tracingr   r   r   r3   r4   r   r   rW   r   )r;   rL   r   r  r  resultZdynamo_pathr<   r<   r=   r    s,    r  c                 C   s  zt | }W n ty"   d}Y n0 |s>|d ur:|d d S | d urt| rRtS t | d }|d ur~|d urz|d |S n|d ur|d ur|s|trt |d t d }nt |d | d }|d ur|d ur|d |S n"|dkr|d ur
|d t	S |rp|dkr6|d ur2|d t
S |d	ksX| rpt| d
d d	krp|d url|d t	S |s|dkr|d ur|d t
S |d u rt| }t||}|d ur||j |jrt
S t	S d S )NFzobj is not hashabler>   rG   z
<listcomp>z&inlining frame from list comprehensionZpatched_initzfunc name is patched_initZ__torch_function__rq   zfunc name is __torch_function____getattr__zCTracing __getattr__ as the top level frame, unsuitable for tracing.)r   	ExceptionrW   r`   r   r>   rm   r   r   r   r   rB   r   r   r   r   )r;   rL   r   r  r  Zcan_hashr	  Zskip_resultr<   r<   r=   r  2  st    


















r  c                   C   sJ   t jjj  t jjj  t jjj  t jjj  t jjj  d S r^   )	r4   r   Ztrace_rulesr>   cache_clearr]   r   r   r  r<   r<   r<   r=   clear_lru_cache  s
    r  )F)F)F)NNTN)NNTN)rt   abcr   collectionsr   Zdataclasses	functoolsrC   r   	linecacher   r   randomr   sys	tracebackrS   typingr   r   pathlibr   r   r   r   r   r   r4   Ztorch._inductor.test_operatorsZtorch.distributedZtorch.utils._content_storeZtorch._environmentr	   Ztorch.utilsr
    r   Zresume_executionr   utilsr   r   r   r   	variablesr   r   r   r   r   r   r   r   r   r   r   r   r   rv   r   ModuleNotFoundErrorTYPE_CHECKINGZvariables.baser   r%   rg   rw   fromkeysZ"torch_c_binding_in_graph_functionsversion_infoZ&torch_non_c_binding_in_graph_functionsr0   cachetyper>   rF   r2   r]   r`   ra   ru   r{   r|   r}   r   rP   r   r   r   listr   r   r   r   rx   r   r   r   r   r   r   r   r   r   r   ZBUILTIN_SKIPLISTZTHIRDPARTY_SKIPLISTr   r   r3   r   ZdistributedZis_availableZskip_fsdp_hooksrW   r   sortedr   r   r   r   r   r   extendmapfilterr   r   r   r   r   r   r   r   Z#FBCODE_INLINE_FILES_IN_SKIPPED_DIRSr   r   r   Z	dataclassr   r   r   r
  r  _namer   r  r  r  r  r  r  r  r<   r<   r<   r=   <module>   sR  4G


  \                                                            

/!$


.
Z
&
$$	4)8   %   X