Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ functions
Functions
14,579 in github.com/deepspeedai/DeepSpeed
⨍
Functions
14,579
◇
Types & classes
2,353
↳
Endpoints
92
↓ 1 callers
Function
_set_allgather_allocation_metadata
Stamp padded gather allocation bytes without discarding a more precise estimate.
deepspeed/compile/passes/zero3_compile.py:192
↓ 1 callers
Method
_set_batch_related_parameters
(self)
deepspeed/runtime/config.py:611
↓ 1 callers
Method
_set_cpu_affinity
Set CPU affinity for the main (Pytorch) process and worker (CPU Adam) process. Args: cpuadam_cores_perc: Percentage of c
deepspeed/runtime/superoffload/superoffload_utils.py:207
↓ 1 callers
Method
_set_distributed_vars
(self, args)
deepspeed/runtime/engine.py:2012
↓ 1 callers
Method
_set_dtype
(self, ds_config, dtype)
deepspeed/runtime/zero/partition_parameters.py:392
↓ 1 callers
Function
_set_grad_error
Drive safe_set_full_grad between two backwards in one window and return the window sum read at its end. Returns the value written by safe_get_ful
tests/unit/v1/zero/test_zero_offload_accum_precision.py:113
↓ 1 callers
Method
_set_leaf_by_threshold_preorder
Set modules as leaf modules based on the threshold, prioritizing parent nodes.
deepspeed/runtime/zero/parameter_offload.py:669
↓ 1 callers
Method
_set_z3_leaf_modules_by_threshold
(self, module, zero_module_granularity_threshold)
deepspeed/runtime/zero/parameter_offload.py:607
↓ 1 callers
Method
_setup_for_aio
(self, aio_config)
deepspeed/runtime/model_checkpointing/writer_factory.py:69
↓ 1 callers
Method
_setup_for_gds
(self, aio_config)
deepspeed/runtime/model_checkpointing/writer_factory.py:87
↓ 1 callers
Method
_setup_for_real_optimizer
(self)
deepspeed/runtime/bf16_optimizer.py:156
↓ 1 callers
Method
_setup_for_real_optimizer
(self)
deepspeed/runtime/zero/stage3.py:770
↓ 1 callers
Function
_sgd_baseline_config
(zero_stage=0)
tests/unit/v1/moe/test_autoep_autotp_grad_parity.py:513
↓ 1 callers
Method
_shape_numel
(shape)
accelerator/abstract_accelerator.py:310
↓ 1 callers
Method
_shapes_match
(self, position, kwargs)
deepspeed/runtime/hybrid_engine_graph.py:132
↓ 1 callers
Function
_shards_tile
Prove each rank's pieces partition its shard by address, not merely by element count. This is the premise the rest of the proof borrows, and it d
deepspeed/checkpoint/affine_transfer.py:333
↓ 1 callers
Function
_should_free
(node: Node)
deepspeed/compile/fx.py:151
↓ 1 callers
Method
_should_skip
(self, tensor: torch.Tensor)
deepspeed/runtime/activation_checkpointing/offload_activations.py:123
↓ 1 callers
Function
_simulate_path_stats
Return this candidate's peak and ending residency without mutating the prefix. The committed tracker keeps a cumulative diagnostic peak, but an e
deepspeed/compile/list_schedule.py:449
↓ 1 callers
Function
_skip_bytes
Bytes a rejected candidate would have carried, for the skip breakdown.
deepspeed/compile/passes/offload_activation.py:278
↓ 1 callers
Function
_snapshot_dynamo_stats
()
tests/unit/v1/moe/test_autoep_grad_parity.py:250
↓ 1 callers
Function
_snapshot_fp32_parameters
(engine)
tests/unit/v1/moe/test_autoep_deepep_parity.py:176
↓ 1 callers
Function
_snapshot_parameter_data
(engine)
tests/unit/v1/moe/test_autoep_grad_parity.py:258
↓ 1 callers
Function
_source_data
(param: torch.Tensor | nn.Parameter)
deepspeed/moe/ep_repack.py:35
↓ 1 callers
Function
_sources
(plans)
tests/unit/checkpoint/test_affine_replica_policy.py:181
↓ 1 callers
Function
_sources
Keep the validated holders of each disjoint source region. Every rank holding a replicated piece lists the same region in its own shard at its ow
deepspeed/checkpoint/affine_transfer.py:389
↓ 1 callers
Function
_spec
(layer_index)
tests/unit/runtime/zero/test_autoep_zero3_init.py:42
↓ 1 callers
Method
_splice_visual_into_text
Replace inner placeholder tokens between vision_start/end pairs with visual embeddings.
deepspeed/sequence/autosp_fusion.py:340
↓ 1 callers
Method
_split_buffer
(self)
deepspeed/io/double_io_buffer.py:71
↓ 1 callers
Function
_split_by_holders
Break runs wherever the set of ranks holding the data changes. Merging across such a boundary would produce a piece whose own `locations` is wron
tests/unit/checkpoint/test_affine_shard_map.py:80
↓ 1 callers
Method
_split_flat_tensor
(self, flat_tensor, num_elem_list)
deepspeed/runtime/bf16_optimizer.py:368
↓ 1 callers
Method
_split_global_input
Partition an input tensor along the last dimension, aligned with given splits. Subclasses should override this method to account for new inpu
deepspeed/runtime/zero/tiling.py:156
↓ 1 callers
Method
_split_tensor_along_last_dim
Split a tensor along its last dimension. Args: tensor: ([`torch.tensor`], *required*): input tensor to split
deepspeed/ops/transformer/inference/ds_attention.py:200
↓ 1 callers
Function
_ssm_output_key
(run_identity: str, phase: str, command_id: str, instance_id: str, stream: str)
ci/torch_latest.py:1299
↓ 1 callers
Function
_stable_remove_duplicates
(data)
deepspeed/launcher/runner.py:257
↓ 1 callers
Function
_stable_schedule_target
(target)
deepspeed/compile/passes/zero3_compile.py:116
↓ 1 callers
Function
_stack_routes
Turn a [s, k] per-route tensor into the contiguous [k, s] block the dispatch uses. Transposing and casting the whole block once keeps the cost in
deepspeed/moe/sharded_moe.py:165
↓ 1 callers
Function
_stage
(arg, pairs, group)
deepspeed/comm/torch.py:198
↓ 1 callers
Function
_standard_head_dim
`head_dim`, or the value it is defined as when a config leaves it out.
deepspeed/__init__.py:161
↓ 1 callers
Method
_start_async_split_plan
(self, num_tokens_per_expert: torch.Tensor)
deepspeed/module_inject/auto_ep_layer.py:727
↓ 1 callers
Function
_start_async_split_plan_from_expert_counts
Prepare counts on the caller stream, then start a pinned-memory D2H copy.
deepspeed/module_inject/auto_ep_layer.py:229
↓ 1 callers
Method
_start_offload
(self, tensor_id: int, tensor: torch.Tensor, reap_id: int | None = None)
deepspeed/runtime/activation_checkpointing/offload_activations.py:183
↓ 1 callers
Method
_start_timer
(self, name)
deepspeed/runtime/swap_tensor/async_swapper.py:164
↓ 1 callers
Function
_static_tensor_size
Size of the tensor a node produces, or None if it is not a tensor of known size. A host buffer is allocated once per value id and reused every st
deepspeed/compile/passes/offload_activation.py:225
↓ 1 callers
Method
_step_to_micro_batch
(self, step_id)
deepspeed/runtime/pipe/schedule.py:258
↓ 1 callers
Method
_step_with_clipping
Clipping path: no async steps were done during backward, so we unscale+clip first, then step all sub-groups.
deepspeed/runtime/superoffload/superoffload_stage3.py:253
↓ 1 callers
Function
_step_with_fixed_grads_and_read_norm
(expert_weight_scale)
tests/unit/v1/moe/test_moe.py:64
↓ 1 callers
Method
_step_without_clipping
Fast path: async CPU steps already completed during backward.
deepspeed/runtime/superoffload/superoffload_stage3.py:244
↓ 1 callers
Method
_stop_timer
(self, name)
deepspeed/runtime/swap_tensor/async_swapper.py:168
↓ 1 callers
Function
_storage_intervals
(inner)
deepspeed/checkpoint/affine.py:866
↓ 1 callers
Function
_storage_keeper_counts
How many values that outlive the forward pass hold each storage. Moving a saved value to the host releases its memory only if nothing else still
deepspeed/compile/passes/offload_activation.py:337
↓ 1 callers
Function
_storage_partition_numel
(partition_numel_by_ep_rank, ep_rank, num_holders, packed_numel)
deepspeed/checkpoint/autoep_affine.py:316
↓ 1 callers
Method
_storages_held_by_params
(self, model)
tests/unit/v1/zero/test_zero.py:2369
↓ 1 callers
Method
_store_value
Recursively store a value, converting tensors to metadata and keeping non-tensors as-is
deepspeed/compile/input_storage.py:66
↓ 1 callers
Function
_stored_dtype
(tensor)
deepspeed/runtime/keep_in_fp32.py:79
↓ 1 callers
Method
_strip_tensor_paddings
(self, sd)
deepspeed/checkpoint/zero_checkpoint.py:95
↓ 1 callers
Method
_subparam_shape_spec
(self, logical_shape)
deepspeed/module_inject/layers.py:1360
↓ 1 callers
Function
_subtract
Return the disjoint parts of a box outside another box.
deepspeed/checkpoint/affine_transfer.py:433
↓ 1 callers
Method
_sum_replicated_kv_gradients
Sum the gradient of the key/value block that GPTBigCode gives every rank whole. Each rank attends with only its own query heads, so the gradi
deepspeed/module_inject/layers.py:1495
↓ 1 callers
Method
_swap_in_fp16_params
(self, aio_handle, fp16_num_elems, fp16_partitions_info, fp16_swap_buffers)
deepspeed/runtime/swap_tensor/optimizer_utils.py:336
↓ 1 callers
Method
_swap_in_gradients
(self, aio_handle, parameter, dest_buffer)
deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py:209
↓ 1 callers
Method
_swap_in_optimizer_state
(self, aio_handle, parameter)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:242
↓ 1 callers
Method
_swap_in_parameter
(self, aio_handle, parameter, dest_buffers)
deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py:159
↓ 1 callers
Method
_swap_in_pinned_gradients
(self, aio_handle, parameter, gradient_tensor)
deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py:192
↓ 1 callers
Method
_swap_in_sub_group_to_flat_buffer
(self, flat_buffer, sub_group_id)
deepspeed/runtime/zero/stage3.py:1051
↓ 1 callers
Method
_swap_out
(self, params, async_op=True)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:259
↓ 1 callers
Method
_swap_out_fp16_params
(self, aio_handle, fp32_swap_paths, fp32_swap_buffers, fp16_pinned_tensors)
deepspeed/runtime/swap_tensor/optimizer_utils.py:384
↓ 1 callers
Method
_swap_out_if_offloaded
Persist an updated partition back to NVMe and free its compute buffer.
deepspeed/ops/adam/zenflow_torch_adam.py:437
↓ 1 callers
Method
_swap_out_ready_buffers
(self)
deepspeed/runtime/swap_tensor/async_swapper.py:127
↓ 1 callers
Method
_swap_out_tensor
(self, tensor, swap_path)
deepspeed/runtime/swap_tensor/async_swapper.py:77
↓ 1 callers
Function
_swiglu_experts_group_gemm
Same SwiGLU expert MLP as _run_experts_grouped_mm, but via Triton group_gemm_triton.
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:347
↓ 1 callers
Method
_sync_and_clear
(self)
deepspeed/runtime/activation_checkpointing/offload_activations.py:305
↓ 1 callers
Method
_sync_and_clear
(self)
deepspeed/runtime/activation_checkpointing/offload_activations.py:453
↓ 1 callers
Function
_sync_memory_profile_complete
(profile_complete: bool, process_group=None)
deepspeed/compile/backend.py:161
↓ 1 callers
Function
_sync_profile_complete
Require every rank to have a complete profile before using it for scheduling.
deepspeed/compile/passes/zero3_compile.py:57
↓ 1 callers
Function
_take
(payload: RoutedAssignmentPayload, indices: torch.Tensor)
deepspeed/moe/ep_tp_dispatch.py:58
↓ 1 callers
Function
_take_lr_scheduler_step
Take a step on the learning rate scheduler.
deepspeed/runtime/zenflow/engine.py:123
↓ 1 callers
Function
_take_selective_parameter_step
Trigger a step on the selective optimizer.
deepspeed/runtime/zenflow/engine.py:116
↓ 1 callers
Function
_test_cpu_activation_checkpoint
Stack several checkpointed layers so the shared offload engine flushes keep-last to real D2H/H2D, then compare outputs and grads to a plain run.
tests/unit/runtime/activation_checkpointing/test_activation_checkpointing.py:141
↓ 1 callers
Function
_test_perf
(param, optimizer_func)
tests/perf/adam_test.py:13
↓ 1 callers
Function
_test_perf
(param, optimizer_func)
tests/perf/adagrad_test.py:13
↓ 1 callers
Function
_time_copy
(accelerator, copy_fn, stream, warmup, iters)
benchmarks/pin_memory/h2d_d2h_bench.py:41
↓ 1 callers
Function
_time_ms
(fn, iters=50, warmup=10)
tests/benchmarks/group_gemm_bench.py:55
↓ 1 callers
Function
_time_per_byte
(ds_id_to_time: Dict[int, float], ds_id_to_size: Dict[int, int], ds_id: int)
deepspeed/compile/passes/selective_gather.py:39
↓ 1 callers
Function
_tiny_llama_config
(tied)
tests/unit/v1/moe/test_autoep_autotp_sharded_attention.py:689
↓ 1 callers
Method
_tiny_model
(self, std)
tests/unit/v1/moe/test_autoep_expert_activation.py:644
↓ 1 callers
Function
_to
Recursively move to the current device.
deepspeed/runtime/pipe/p2p.py:138
↓ 1 callers
Method
_to_cpu
(self, v)
deepspeed/compile/util.py:196
↓ 1 callers
Function
_top_k_gating_testing_helper
(n_tokens: int, n_experts: int, n_top_k: int, seed: int = 0xC0FFEE)
tests/unit/inference/v2/kernels/ragged_ops/test_top_k_gating.py:17
↓ 1 callers
Method
_torch_empty_pinned
(self, tensor, shape)
accelerator/abstract_accelerator.py:287
↓ 1 callers
Method
_torch_is_pinned
(self, tensor)
accelerator/xpu_accelerator.py:397
↓ 1 callers
Method
_torch_is_pinned
(self, tensor)
accelerator/abstract_accelerator.py:290
↓ 1 callers
Method
_torch_pin_memory
(self, tensor)
accelerator/xpu_accelerator.py:389
↓ 1 callers
Method
_torch_pin_memory
(self, tensor)
accelerator/abstract_accelerator.py:284
↓ 1 callers
Function
_torch_reduce_scatter_fn
(input_tensor: Tensor, output_tensor: Tensor, group=None, async_op=False, prof=False)
deepspeed/runtime/comm/coalesced_collectives.py:22
↓ 1 callers
Method
_tp_partition
(self, params_list)
deepspeed/module_inject/layers.py:925
↓ 1 callers
Method
_tp_partition
(self, params_list)
deepspeed/module_inject/layers.py:1211
↓ 1 callers
Method
_tp_partition
(self, params_list)
deepspeed/module_inject/layers.py:1312
↓ 1 callers
Method
_tp_partition
(self, params_list)
deepspeed/module_inject/layers.py:2251
↓ 1 callers
Method
_tp_partition_unsupported_layout
Cut a fused layout that has no per-sub-parameter description.
deepspeed/module_inject/layers.py:1389
← previous
next →
4,101–4,200 of 14,579, ranked by callers