from __future__ import annotations

from typing import Any

from paddle.fluid.framework import Variable as Variable
from paddle.fluid.framework import core as core
from paddle.fluid.framework import set_flags as set_flags

non_auto_func_called: bool

def __non_auto_func_called__(func: Any): ...

is_strict_auto: Any

def get_msg_dict(msg: Any): ...
def assign_configs_value(msg: Any, config: Any) -> None: ...
def check_configs_key(msg: Any, config: Any, field_name: Any) -> None: ...

class DistributedJobInfo:
    job_info: Any = ...
    def __init__(self) -> None: ...

ReduceStrategyFluid: Any
ReduceStrategyFleet = int

class DistributedStrategy:
    strategy: Any = ...
    def __init__(self) -> None: ...
    def __setattr__(self, key: Any, value: Any) -> None: ...
    def save_to_prototxt(self, output: Any) -> None: ...
    def load_from_prototxt(self, pb_file: Any) -> None: ...
    @property
    def execution_strategy(self): ...
    @execution_strategy.setter
    def execution_strategy(self, strategy: Any) -> None: ...
    @property
    def build_strategy(self): ...
    @build_strategy.setter
    def build_strategy(self, strategy: Any) -> None: ...
    @property
    def gradient_scale_configs(self): ...
    @gradient_scale_configs.setter
    def gradient_scale_configs(self, config: Any) -> None: ...
    @property
    def a_sync(self): ...
    @a_sync.setter
    def a_sync(self, flag: Any) -> None: ...
    @property
    def a_sync_configs(self): ...
    @a_sync_configs.setter
    def a_sync_configs(self, configs: Any) -> None: ...
    @property
    def trainer_desc_configs(self): ...
    @property
    def adam_d2sum(self): ...
    @adam_d2sum.setter
    def adam_d2sum(self, flag: Any) -> None: ...
    @trainer_desc_configs.setter
    def trainer_desc_configs(self, configs: Any) -> None: ...
    @property
    def fs_client_param(self): ...
    @fs_client_param.setter
    def fs_client_param(self, configs: Any) -> None: ...
    @property
    def sparse_table_configs(self): ...
    @sparse_table_configs.setter
    def sparse_table_configs(self, configs: Any) -> None: ...
    @sparse_table_configs.setter
    def fleet_desc_configs(self, configs: Any) -> None: ...
    @property
    def amp(self): ...
    @amp.setter
    def amp(self, flag: Any) -> None: ...
    @property
    def amp_configs(self): ...
    @amp_configs.setter
    def amp_configs(self, configs: Any) -> None: ...
    @property
    def asp(self): ...
    @asp.setter
    def asp(self, flag: Any) -> None: ...
    @property
    def recompute(self): ...
    @property
    def sync_nccl_allreduce(self): ...
    @sync_nccl_allreduce.setter
    def sync_nccl_allreduce(self, flag: Any) -> None: ...
    @property
    def use_hierarchical_allreduce(self): ...
    @use_hierarchical_allreduce.setter
    def use_hierarchical_allreduce(self, flag: Any) -> None: ...
    @property
    def hierarchical_allreduce_inter_nranks(self): ...
    @hierarchical_allreduce_inter_nranks.setter
    def hierarchical_allreduce_inter_nranks(self, value: Any) -> None: ...
    @property
    def sync_batch_norm(self): ...
    @sync_batch_norm.setter
    def sync_batch_norm(self, flag: Any) -> None: ...
    @property
    def fuse_all_reduce_ops(self): ...
    @fuse_all_reduce_ops.setter
    def fuse_all_reduce_ops(self, flag: Any) -> None: ...
    @property
    def fuse_grad_size_in_MB(self): ...
    @fuse_grad_size_in_MB.setter
    def fuse_grad_size_in_MB(self, value: Any) -> None: ...
    @property
    def last_comm_group_size_MB(self): ...
    @last_comm_group_size_MB.setter
    def last_comm_group_size_MB(self, value: Any) -> None: ...
    @property
    def find_unused_parameters(self): ...
    @find_unused_parameters.setter
    def find_unused_parameters(self, flag: Any) -> None: ...
    @property
    def nccl_comm_num(self): ...
    @nccl_comm_num.setter
    def nccl_comm_num(self, value: Any) -> None: ...
    @recompute.setter
    def recompute(self, flag: Any) -> None: ...
    @property
    def recompute_configs(self): ...
    @recompute_configs.setter
    def recompute_configs(self, configs: Any) -> None: ...
    @property
    def sharding(self): ...
    @sharding.setter
    def sharding(self, flag: Any) -> None: ...
    @property
    def sharding_configs(self): ...
    @sharding_configs.setter
    def sharding_configs(self, configs: Any) -> None: ...
    @property
    def without_graph_optimization(self): ...
    @without_graph_optimization.setter
    def without_graph_optimization(self, flag: Any) -> None: ...
    @property
    def fuse_grad_merge(self): ...
    @fuse_grad_merge.setter
    def fuse_grad_merge(self, fuse_grad_merge: Any) -> None: ...
    @property
    def fuse_grad_size_in_num(self): ...
    @fuse_grad_size_in_num.setter
    def fuse_grad_size_in_num(self, num: Any) -> None: ...
    @property
    def pipeline(self): ...
    @pipeline.setter
    def pipeline(self, flag: Any) -> None: ...
    @property
    def pipeline_configs(self): ...
    @pipeline_configs.setter
    def pipeline_configs(self, configs: Any) -> None: ...
    @property
    def tensor_parallel(self): ...
    @tensor_parallel.setter
    def tensor_parallel(self, flag: Any) -> None: ...
    @property
    def tensor_parallel_configs(self): ...
    @tensor_parallel_configs.setter
    def tensor_parallel_configs(self, configs: Any) -> None: ...
    @property
    def hybrid_configs(self): ...
    @hybrid_configs.setter
    def hybrid_configs(self, configs: Any) -> None: ...
    @property
    def localsgd(self): ...
    @localsgd.setter
    def localsgd(self, flag: Any) -> None: ...
    @property
    def localsgd_configs(self): ...
    @localsgd_configs.setter
    def localsgd_configs(self, configs: Any) -> None: ...
    @property
    def adaptive_localsgd(self): ...
    @adaptive_localsgd.setter
    def adaptive_localsgd(self, flag: Any) -> None: ...
    @property
    def adaptive_localsgd_configs(self): ...
    @adaptive_localsgd_configs.setter
    def adaptive_localsgd_configs(self, configs: Any) -> None: ...
    @property
    def dgc(self): ...
    @dgc.setter
    def dgc(self, flag: Any) -> None: ...
    @property
    def dgc_configs(self): ...
    @dgc_configs.setter
    def dgc_configs(self, configs: Any) -> None: ...
    @property
    def fp16_allreduce(self): ...
    @fp16_allreduce.setter
    def fp16_allreduce(self, flag: Any) -> None: ...
    @property
    def gradient_merge(self): ...
    @gradient_merge.setter
    def gradient_merge(self, flag: Any) -> None: ...
    @property
    def gradient_merge_configs(self): ...
    @gradient_merge_configs.setter
    def gradient_merge_configs(self, configs: Any) -> None: ...
    @property
    def lars(self): ...
    @lars.setter
    def lars(self, flag: Any) -> None: ...
    @property
    def lars_configs(self): ...
    @lars_configs.setter
    def lars_configs(self, configs: Any) -> None: ...
    @property
    def lamb(self): ...
    @lamb.setter
    def lamb(self, flag: Any) -> None: ...
    @property
    def lamb_configs(self): ...
    @lamb_configs.setter
    def lamb_configs(self, configs: Any) -> None: ...
    @property
    def elastic(self): ...
    @elastic.setter
    def elastic(self, flag: Any) -> None: ...
    @property
    def auto(self): ...
    @auto.setter
    def auto(self, flag: Any) -> None: ...
    @property
    def semi_auto(self): ...
    @semi_auto.setter
    def semi_auto(self, flag: Any) -> None: ...
    @property
    def auto_search(self): ...
    @auto_search.setter
    def auto_search(self, flag: Any) -> None: ...
    @property
    def heter_ccl_mode(self): ...
    @heter_ccl_mode.setter
    def heter_ccl_mode(self, flag: Any) -> None: ...
    @property
    def cudnn_exhaustive_search(self): ...
    @cudnn_exhaustive_search.setter
    def cudnn_exhaustive_search(self, flag: Any) -> None: ...
    @property
    def conv_workspace_size_limit(self): ...
    @conv_workspace_size_limit.setter
    def conv_workspace_size_limit(self, value: Any) -> None: ...
    @property
    def cudnn_batchnorm_spatial_persistent(self): ...
    @cudnn_batchnorm_spatial_persistent.setter
    def cudnn_batchnorm_spatial_persistent(self, flag: Any) -> None: ...
