Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ functions
Functions
15,468 in github.com/deepspeedai/DeepSpeed
⨍
Functions
15,468
◇
Types & classes
2,493
↳
Endpoints
106
↓ 1 callers
Method
__init__
(self, ccl_comm_op=None)
deepspeed/comm/ccl.py:27
↓ 1 callers
Method
__init__
(self, name)
op_builder/builder.py:216
↓ 1 callers
Method
__init__
(self, ext)
op_builder/custom_collective.py:68
↓ 1 callers
Method
__init__
(self, name=None)
op_builder/cpu/comm.py:15
↓ 1 callers
Method
__new__
(cls, clsname, bases, attrs)
deepspeed/inference/v2/model_implementations/layer_container_base.py:51
↓ 1 callers
Method
__new__
(cls, *values)
deepspeed/runtime/config.py:154
↓ 1 callers
Method
__params_to_release
(self, submodule_to_release: Module, step_id: int)
deepspeed/runtime/zero/partitioned_param_coordinator.py:647
↓ 1 callers
Method
__prefetch_nvme_param_partitions
swap in parameter partitions from nvme for those parameters that will be used after the ones that are already being prefetched into full param
deepspeed/runtime/zero/partitioned_param_coordinator.py:680
↓ 1 callers
Method
__setitem__
(self, model, can_record_outputs)
tests/unit/v1/moe/test_autoep_unit.py:2487
↓ 1 callers
Method
__setitem__
(self, obj, name)
deepspeed/utils/debug.py:32
↓ 1 callers
Method
__setstate__
(self, state)
tests/unit/simple_model.py:195
↓ 1 callers
Method
__setstate__
(self, state)
deepspeed/ops/adam/zenflow_torch_adam.py:44
↓ 1 callers
Method
__str__
(self)
deepspeed/runtime/sparse_tensor.py:52
↓ 1 callers
Function
_accumulate_matmul
``accumulator += mat1 @ mat2`` with ``accumulator`` kept in its own (fp32) dtype. Accumulating block gradients in a low-precision buffer drops la
deepspeed/sequence/linear_cross_entropy.py:61
↓ 1 callers
Method
_activate_pending_cpu_grads_if_ready
(self, flush_pending)
deepspeed/runtime/reflow/reflow_stage3.py:1123
↓ 1 callers
Function
_adam_state
(engine)
tests/unit/v1/zero/test_zero_partial_offload.py:106
↓ 1 callers
Method
_add_backup_optimizer_state
Put the Adam state of the sub-groups kept on the device into self.optimizer.state; return their params.
deepspeed/runtime/zero/stage3.py:3828
↓ 1 callers
Function
_add_core_arguments
r"""Helper (internal) function to update an argument parser with an argument group of the core DeepSpeed arguments. The core set of DeepSpeed
deepspeed/__init__.py:643
↓ 1 callers
Method
_add_full_reduction_to_compact_grad_partition
(self, reduced_tensor, communication_data_type)
deepspeed/runtime/zero/stage_1_and_2.py:1443
↓ 1 callers
Method
_add_grad_to_ipg_bucket
(self, param)
deepspeed/runtime/reflow/reflow_stage3.py:648
↓ 1 callers
Method
_add_tensor_creation_wrappers
(self)
deepspeed/runtime/zero/partition_parameters.py:632
↓ 1 callers
Function
_add_weight_grads
Sum two ``(grad_w1, grad_w2, grad_w3)`` tuples, either of which may be ``None`` or hold ``None``.
deepspeed/moe/ep_experts.py:502
↓ 1 callers
Method
_adjust_for_misaligned_lengths
(self, tensors, offsets)
deepspeed/runtime/swap_tensor/optimizer_utils.py:464
↓ 1 callers
Function
_affine_resume_batch
(engine, step)
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:1659
↓ 1 callers
Function
_affine_resume_full_tensor
(name, value, tp_size)
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:1666
↓ 1 callers
Method
_aggregate_total_loss
(self)
deepspeed/runtime/pipe/engine.py:573
↓ 1 callers
Function
_agree_on_floor_peak
Make every rank plan against the same floor. This number is measured locally and varies across ranks. Ranks that disagree hand back different
deepspeed/compile/passes/offload_activation.py:163
↓ 1 callers
Function
_aliasing_ops
Ops whose output shares storage with an input, for the purpose of tracking that storage. get_no_copy_ops() reads the aten schemas, and aten._unsa
deepspeed/compile/passes/offload_activation.py:290
↓ 1 callers
Method
_align_qkv
Internal helper for accepting the head-contiguous weight matrix and chunking the query, key, and value components.
deepspeed/module_inject/containers/features/hybrid_megatron.py:14
↓ 1 callers
Method
_align_qkv_transposed
(self, x)
deepspeed/module_inject/containers/features/megatron.py:16
↓ 1 callers
Method
_all_gather
(self, param_list, async_op=False, hierarchy=None)
deepspeed/runtime/zero/partition_parameters.py:1734
↓ 1 callers
Function
_all_gather_along_dim
(tensor, partition_dim, mp_group, tp_world_size)
deepspeed/module_inject/layers.py:2183
↓ 1 callers
Function
_all_gather_uneven_along_dim
Gather shards of differing widths along ``partition_dim``. Shards are zero padded to a common width so the uniform (and faster) ``all_gather_
deepspeed/module_inject/layers.py:2198
↓ 1 callers
Method
_all_reduce_norm_entries_by_group
(total_norms, process_groups)
deepspeed/runtime/reflow/reflow_stage3.py:1592
↓ 1 callers
Function
_all_shards
(shard)
tests/unit/checkpoint/test_zero_affine.py:367
↓ 1 callers
Function
_all_test_functions
()
ci/test_torch_latest.py:1793
↓ 1 callers
Function
_all_test_functions
()
ci/test_tests_fetcher.py:644
↓ 1 callers
Function
_all_test_functions
()
ci/test_classify_multirank_exit.py:79
↓ 1 callers
Method
_allgather_param
(self, param, async_op=False, hierarchy=0)
deepspeed/runtime/zero/partition_parameters.py:1948
↓ 1 callers
Method
_allgather_params_coalesced
blocking call avoid explicit memory copy in _allgather_params
deepspeed/runtime/zero/partition_parameters.py:1998
↓ 1 callers
Method
_allgather_params_sequential
(self, param_list, hierarchy=0)
deepspeed/runtime/zero/partition_parameters.py:2108
↓ 1 callers
Function
_allgather_ranking_bytes
Use legacy logical bytes for deterministic candidate ranking.
deepspeed/compile/list_schedule.py:417
↓ 1 callers
Method
_allocate_buffer
(self, shape, num_buffers=-1, **kwargs)
deepspeed/runtime/pipe/engine.py:1267
↓ 1 callers
Method
_allocate_buffer
(self)
deepspeed/runtime/swap_tensor/async_swapper.py:105
↓ 1 callers
Function
_allocate_host
(accelerator, numel, arm)
tests/benchmarks/h2d_d2h_bench.py:56
↓ 1 callers
Method
_allocate_zeros
Allocate a tensor of zeros on the engine's device. Arguments: shape: the shape of the tensor to allocate kwargs: pas
deepspeed/runtime/pipe/engine.py:1249
↓ 1 callers
Method
_allreduce_noncontiguous_bucket_preserving_fp32
(self, grads, grad_params, communication_data_type)
deepspeed/runtime/zero/stage_1_and_2.py:2579
↓ 1 callers
Method
_alltoall
(self, dispatched_attention)
deepspeed/ops/transformer/inference/moe_inference.py:257
↓ 1 callers
Method
_append
(self, rows, group_counts, valid_counts, num_rows)
deepspeed/moe/ep_experts.py:634
↓ 1 callers
Method
_apply_autoep_folding_tp_correction
Correct one micro-batch gradient for AutoEP + AutoTP folding before it is reduce-scattered. The folded MoE layer runs the router on every TP
deepspeed/runtime/zero/stage3.py:1822
↓ 1 callers
Method
_apply_autotp_partitioning
Shard the model with AutoTP. Returns the ``ReplacementSourceMap`` of the parameters AutoTP replaced instead of resharding in place (weights of
deepspeed/runtime/engine.py:1052
↓ 1 callers
Function
_apply_forward_and_backward_to_tensors_only
(module, forward_function, backward_function, outputs)
deepspeed/runtime/zero/parameter_offload.py:24
↓ 1 callers
Method
_apply_injection_policy
(self, config, client_module=None)
deepspeed/inference/engine.py:411
↓ 1 callers
Method
_apply_muon_to_accumulated_grads
Orthogonalize each Muon parameter's accumulated gradient once per optimizer step. Without optimizer offload the reduce path leaves Muon out,
deepspeed/runtime/zero/stage3.py:2049
↓ 1 callers
Method
_apply_muon_updates_cpu_offload
Orthogonalize full logical gradients before clipping CPU-offloaded updates.
deepspeed/runtime/zero/stage3.py:2836
↓ 1 callers
Method
_apply_muon_updates_cpu_offload
Orthogonalize full Muon gradients before clipping CPU-offloaded updates.
deepspeed/runtime/zero/stage_1_and_2.py:2159
↓ 1 callers
Function
_apply_plan
Execute a plan over plain buffers, counting writes. Test scaffolding, never a production path.
tests/unit/checkpoint/test_affine_replica_policy.py:40
↓ 1 callers
Method
_apply_qk_norm
Apply RMSNorm to Q and K projections independently per head. hidden_states shape: [tokens, (n_q + n_kv + n_kv) * head_size]
deepspeed/inference/v2/model_implementations/exaone4/model.py:107
↓ 1 callers
Method
_apply_segki
Apply segment-KI kernel injection to the wrapped module. Returns the injection report dict, or None if the module is not supported (u
deepspeed/runtime/rollout/hybrid_engine_rollout.py:233
↓ 1 callers
Function
_args_to_key
(v)
deepspeed/compile/profilers/graph_profile.py:42
↓ 1 callers
Function
_as_cpu_float_tensor
(value)
tests/unit/v1/moe/test_moe.py:58
↓ 1 callers
Function
_as_finite_float
(value, field_name: str)
deepspeed/module_inject/auto_ep.py:137
↓ 1 callers
Function
_assert_autocast_comm_dtype
(model)
tests/unit/runtime/zero/test_zero_autocast_mixed_dtype.py:79
↓ 1 callers
Function
_assert_dense_fp32_master_params_match_universal
(engine, universal_dir, param_iter)
tests/unit/v1/moe/test_autoep_checkpoint.py:269
↓ 1 callers
Function
_assert_expert_fp32_master_params_match_universal
(engine, universal_dir)
tests/unit/v1/moe/test_autoep_checkpoint.py:259
↓ 1 callers
Function
_assert_expert_optimizer_states_match_universal
(engine, universal_dir)
tests/unit/v1/moe/test_autoep_checkpoint.py:243
↓ 1 callers
Function
_assert_expert_params_match_universal
(engine, universal_dir)
tests/unit/v1/moe/test_autoep_checkpoint.py:233
↓ 1 callers
Function
_assert_fp32_master_params_match_universal
(engine, universal_dir)
tests/unit/v1/moe/test_autoep_checkpoint.py:276
↓ 1 callers
Function
_assert_fp32_step_matches
(fused, eager)
tests/unit/v1/moe/test_autoep_fused_parity.py:266
↓ 1 callers
Function
_assert_fully_available
(model: Module)
tests/unit/v1/zero/test_zero.py:717
↓ 1 callers
Function
_assert_global_grad_norm_consistent
(engine)
tests/unit/v1/moe/test_autoep_integration.py:26
↓ 1 callers
Function
_assert_gradients_match_relatively
Relative L2 error of the input and every parameter gradient. The absolute tolerances above are larger than these small gradients, so they cannot
tests/unit/v1/moe/test_autoep_deepep_parity.py:470
↓ 1 callers
Function
_assert_gradients_no_worse_than_eager
(fused, eager, reference)
tests/unit/v1/moe/test_autoep_fused_parity.py:212
↓ 1 callers
Function
_assert_input_grad_no_worse_than_eager
(fused, eager, reference)
tests/unit/v1/moe/test_autoep_fused_parity.py:204
↓ 1 callers
Function
_assert_mixed_partition_dtypes
(model)
tests/unit/runtime/zero/test_zero_autocast_mixed_dtype.py:70
↓ 1 callers
Function
_assert_optimizer_step_restored
(engine, universal_dir)
tests/unit/v1/moe/test_autoep_checkpoint.py:288
↓ 1 callers
Method
_assert_recompute_skip_contract
Fail unless this recompute is the reentrant checkpoint of this layer's own decoder layer. Only then is the recomputed output unread: the chec
deepspeed/module_inject/auto_ep_layer.py:1007
↓ 1 callers
Function
_assert_relative_l2_close
(actual, expected, name)
tests/unit/v1/moe/test_autoep_grad_parity.py:696
↓ 1 callers
Function
_assert_resolvable_updates_match
(fused, eager, reference)
tests/unit/v1/moe/test_autoep_fused_parity.py:226
↓ 1 callers
Function
_assert_router_params_match_universal
(engine, universal_dir)
tests/unit/v1/moe/test_autoep_checkpoint.py:217
↓ 1 callers
Function
_assert_row_weighting_forward_matches
(fused, eager)
tests/unit/v1/ops/triton_ops/test_autoep_fused_token_ops.py:35
↓ 1 callers
Function
_assert_saved_checkpoint_metadata
(checkpoint_dir, *, ep_size=2)
tests/unit/v1/moe/test_autoep_autotp_checkpoint.py:229
↓ 1 callers
Function
_assert_shared_params_match_universal
(engine, universal_dir)
tests/unit/v1/moe/test_autoep_checkpoint.py:225
↓ 1 callers
Function
_assert_supported_device_and_dtype
(tensor: torch.Tensor, *, name: str)
deepspeed/ops/triton_ops/fused_rms_norm.py:212
↓ 1 callers
Function
_assert_zero_optimizer_folding_metadata
(checkpoint_dir)
tests/unit/v1/moe/test_autoep_autotp_grad_parity.py:657
↓ 1 callers
Function
_async_split_config
(enabled)
tests/unit/v1/moe/test_autoep_grad_parity.py:570
↓ 1 callers
Function
_async_split_step
(engine, seed, seq_len)
tests/unit/v1/moe/test_autoep_grad_parity.py:639
↓ 1 callers
Function
_attention
(Q, K, V, bias1, bias2)
deepspeed/ops/deepspeed4science/evoformer_attn.py:14
↓ 1 callers
Function
_attention_head_count_from
First non-None attention head count found on ``config`` via :data:`_ATTN_HEAD_ATTRS`, else ``None``.
deepspeed/module_inject/tp_shard.py:58
↓ 1 callers
Function
_autocast_dtype
The active autocast dtype for ``device_type``, or ``None`` when autocast is off.
deepspeed/sequence/linear_cross_entropy.py:97
↓ 1 callers
Function
_autoep_folding_param_family
Resolve a parameter's folded reduction family. An explicit ``mark_autoep_folding_*`` tag always wins. The ``.router.`` name match is only a r
deepspeed/module_inject/auto_ep_folding.py:332
↓ 1 callers
Method
_autoep_non_expert_param_families
(state_dict)
deepspeed/runtime/engine.py:4208
↓ 1 callers
Method
_autoep_param_family
(param_name)
deepspeed/runtime/engine.py:4220
↓ 1 callers
Function
_autosp_sequence_parallel_size
(config)
deepspeed/__init__.py:433
↓ 1 callers
Function
_autotp_layout_map
(name, param, tp_world_size)
deepspeed/checkpoint/zero_affine.py:247
↓ 1 callers
Method
_autotuning_exit
(self)
deepspeed/runtime/engine.py:3870
↓ 1 callers
Method
_average_expert_grad_norms
(self, norm_groups)
deepspeed/runtime/zero/stage_1_and_2.py:3311
↓ 1 callers
Method
_backward_impl
(ctx, all_args)
tests/unit/compile/test_zero3_grad_dtype.py:285
↓ 1 callers
Method
_backward_impl
(ctx, all_args)
tests/unit/compile/test_backend.py:97
↓ 1 callers
Method
_backward_prologue
(ctx, *grad_outputs)
tests/unit/compile/test_zero3_grad_dtype.py:289
← previous
next →
3,401–3,500 of 15,468, ranked by callers