Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ functions
Functions
15,767 in github.com/deepspeedai/DeepSpeed
⨍
Functions
15,767
◇
Types & classes
2,543
↳
Endpoints
107
↓ 2 callers
Function
_relative
(a, b)
tests/unit/v1/ops/muon/test_per_head_muon_accelerator.py:51
↓ 2 callers
Method
_release_deepcompile_compiled_backward_state
(self)
deepspeed/runtime/engine.py:6286
↓ 2 callers
Method
_release_deepcompile_dynamo_config
(self)
deepspeed/runtime/engine.py:6292
↓ 2 callers
Method
_release_gathered_params
(self)
deepspeed/compile/z3_eager_fallback.py:211
↓ 2 callers
Method
_release_ipg_buffers
(self)
deepspeed/runtime/zero/stage_1_and_2.py:946
↓ 2 callers
Function
_release_n_users
(node: Node)
deepspeed/compile/list_schedule.py:388
↓ 2 callers
Method
_release_swap_buffers
(self, sub_group_id)
deepspeed/runtime/zero/stage3.py:3032
↓ 2 callers
Method
_release_unclaimed_tracked_params
(self)
deepspeed/compile/z3_eager_fallback.py:195
↓ 2 callers
Function
_remap_param_groups_after_module_replacement
Replace stale parameters in optimizer-style groups and return remap counts.
deepspeed/runtime/engine.py:314
↓ 2 callers
Method
_remove_module_hooks
(self)
deepspeed/runtime/zero/parameter_offload.py:294
↓ 2 callers
Method
_replace
(self, child, name, conv_linear_layer)
deepspeed/module_inject/auto_tp.py:457
↓ 2 callers
Function
_replace_module
(module, policy)
deepspeed/module_inject/replace_module.py:165
↓ 2 callers
Function
_replaced_model
(transformers, attn_implementation)
tests/unit/v1/models/test_glm_moe_dsa.py:209
↓ 2 callers
Function
_report_aio_statistics
csrc/aio/common/deepspeed_aio_common.cpp:48
↓ 2 callers
Method
_report_progress
(self, step)
deepspeed/runtime/engine.py:3999
↓ 2 callers
Method
_request
Send a command to the worker process and wait for its reply. Call it with no step in flight.
deepspeed/runtime/superoffload/superoffload_utils.py:309
↓ 2 callers
Method
_require_empty
(self, what_changed: str, buffers_only: bool = False)
deepspeed/moe/ep_experts.py:627
↓ 2 callers
Method
_require_host_device
(device)
accelerator/abstract_accelerator.py:323
↓ 2 callers
Function
_require_placed
Refuse a shard that its pieces leave partly unplaced, which a self-overlapping piece can do.
deepspeed/checkpoint/affine.py:509
↓ 2 callers
Function
_resolve_attention_head_count
As above, with the reason, so callers can report why a parameter was not tagged.
deepspeed/__init__.py:301
↓ 2 callers
Function
_resolve_execution_inputs
(env: Mapping[str, str])
ci/torch_latest.py:1652
↓ 2 callers
Function
_resolve_kv_heads
KV head count this all-to-all partitions against, or None when the caller has none. Only the scatter direction can read a count off the tensor; t
deepspeed/sequence/layer.py:19
↓ 2 callers
Function
_resolve_output_dtype
(dtype)
deepspeed/utils/zero_to_fp32.py:66
↓ 2 callers
Function
_resolve_route_scale
Resolve the single scale applied by TokenChoiceTopKRouter.
deepspeed/module_inject/auto_ep.py:147
↓ 2 callers
Function
_resolve_visible_devices
Run main() as far as parse_inclusion_exclusion() and return what it was handed. Stopping there rather than launching keeps this CPU-only; the res
tests/unit/launcher/test_run.py:139
↓ 2 callers
Method
_resolve_vocab_parallel_lm_head
(self)
deepspeed/module_inject/auto_tp.py:832
↓ 2 callers
Function
_resolve_zero3_guarded_value
(builder, guard, value)
deepspeed/compile/patch_fake_tensor.py:66
↓ 2 callers
Method
_resolve_zero3_param_placement
(self)
deepspeed/runtime/engine.py:2396
↓ 2 callers
Method
_restore_base_optimizer_state
(self, base_optimizer_group_states, base_optimizer_state_step, group_paddings)
deepspeed/runtime/zero/stage_1_and_2.py:3719
↓ 2 callers
Method
_restore_elastic_base_optimizer_state
(self, all_state_dict, unpadded_layout=False)
deepspeed/runtime/zero/stage_1_and_2.py:3758
↓ 2 callers
Method
_restore_from_bit16_weights
(self)
deepspeed/runtime/bf16_optimizer.py:651
↓ 2 callers
Method
_restore_from_bit16_weights
(self)
deepspeed/runtime/zero/stage_1_and_2.py:3681
↓ 2 callers
Method
_restore_tensor
(self, tensor_id: int, cache: bool = True)
deepspeed/runtime/activation_checkpointing/offload_activations.py:236
↓ 2 callers
Method
_retarget_transformers_output_recorders
(self, spec: MoELayerSpec, replacement: nn.Module)
deepspeed/module_inject/auto_ep.py:671
↓ 2 callers
Function
_retarget_transformers_output_recorders_for_modules
( *, model: nn.Module, display_name: str, recorder_key: str, retargeted_keys: set[str],
deepspeed/module_inject/auto_ep_presets/base.py:352
↓ 2 callers
Method
_retrieve_unswapped_grad_partitions
(self, swap_info, dest_buffer)
deepspeed/runtime/swap_tensor/optimizer_utils.py:491
↓ 2 callers
Method
_reverse_graph
Map each file -> the set of files that import it (directly).
ci/tests_fetcher.py:434
↓ 2 callers
Function
_rms_norm_testing_helper
(rows: int, channels: int, do_residual: bool, dtype: DtypeEnum)
tests/unit/inference/v2/kernels/core_ops/test_rms_norm.py:38
↓ 2 callers
Function
_rnn_flops
(flops, rnn_module, w_ih, w_hh, input_size)
deepspeed/profiling/flops_profiler/profiler.py:1041
↓ 2 callers
Method
_rocminfo_output
()
op_builder/builder.py:626
↓ 2 callers
Method
_rollback_cpu_sub_group
(self, sub_group_id)
deepspeed/runtime/superoffload/superoffload_stage3.py:459
↓ 2 callers
Method
_rollback_submitted_cpu_sub_groups
Undo the CPU steps taken during backward, for a skipped step or before redoing them with clipping.
deepspeed/runtime/superoffload/superoffload_stage3.py:454
↓ 2 callers
Function
_rotate_half
change sign so the last dimension becomes [-odd, +even]
deepspeed/sequence/layer.py:122
↓ 2 callers
Function
_route_slots
Map every (token, route) pair onto its flat slot in the [e * c] expert buffer. Routes evicted by the capacity limit are parked on one extra scrat
deepspeed/moe/sharded_moe.py:177
↓ 2 callers
Function
_row_markers
(rows, cols)
tests/unit/checkpoint/test_affine_shard_map.py:44
↓ 2 callers
Function
_row_scaled_tile
(m: int, n: int)
deepspeed/ops/triton_ops/subchannel_quant.py:708
↓ 2 callers
Function
_row_tile_group
Map row tile ``pid_m`` to ``(group, first row, group's row end)``. Tiles are numbered group by group and every group starts a new tile, so no
deepspeed/ops/triton_ops/subchannel_quant.py:200
↓ 2 callers
Function
_row_weighting_block_hidden
Choose a power-of-two hidden tile for row-local products.
deepspeed/ops/triton_ops/autoep_fused_token_ops.py:256
↓ 2 callers
Function
_rows_mm
``out[m] = a[m] b[e]^T`` for the rows ``m`` of group ``e``; ``a`` is ``[M, K]``, ``b`` ``[E, N, K]``. Rows past the last group's end are zero. ``
deepspeed/runtime/quantization/subchannel.py:208
↓ 2 callers
Method
_run_experts
Run the expert MLP; ``valid_counts`` are the rows per expert before alignment padding, when it differs.
deepspeed/module_inject/auto_ep_layer.py:786
↓ 2 callers
Function
_run_experts_grouped_mm
Compute SwiGLU expert MLP via torch._grouped_mm (grouped GEMM). Uses input dtype for casting instead of hardcoded bfloat16. Args: w1
deepspeed/moe/ep_experts.py:334
↓ 2 callers
Method
_run_forward_backward
Run zero3_linear_wrap forward+backward, optionally inside autocast.
tests/unit/v1/zero/test_zero_functorch_linear.py:108
↓ 2 callers
Function
_run_kernels
(hidden: torch.Tensor, weight: torch.Tensor, eps: float)
deepspeed/ops/triton_ops/fused_rms_norm.py:380
↓ 2 callers
Function
_run_kernels
(q, k, cos, sin, unsqueeze_dim)
deepspeed/ops/triton_ops/fused_rotary_pos_emb.py:238
↓ 2 callers
Function
_run_layout_all_to_all
single_all_to_all's layout math, driven by the emulated all2all above.
tests/unit/v1/sequence_parallelism/test_ulysses.py:164
↓ 2 callers
Function
_run_local
(argv: Sequence[str], *, cwd: Path | None = None)
ci/torch_latest.py:419
↓ 2 callers
Function
_run_stacked
(ckpt_fn, layers, x, do_checkpoint)
tests/unit/runtime/activation_checkpointing/test_activation_checkpointing.py:134
↓ 2 callers
Function
_same_on_every_rank
(tensor)
tests/unit/v1/test_hybrid_engine_rollout_v1.py:282
↓ 2 callers
Function
_sanitize_ssm_output_line
( value: object, instance: AwsInstance, command_id: str, run_identity: str, )
ci/torch_latest.py:1274
↓ 2 callers
Function
_save_combine_context
(ctx, exchange: DeepEPExchange, rows: torch.Tensor, handle)
deepspeed/module_inject/auto_ep_comm.py:538
↓ 2 callers
Function
_saved_dp2_masters
(tmpdir)
tests/unit/checkpoint/test_fp32_master_only.py:136
↓ 2 callers
Method
_scale_loss_by_gas
(self, prescaled_loss, eval_micro_batches=None)
deepspeed/runtime/engine.py:3070
↓ 2 callers
Function
_scaled
Undo the shard's scaling, giving the block as it appears in the full tensor.
deepspeed/checkpoint/affine.py:481
↓ 2 callers
Function
_scaled_replicated_meta
(scale)
tests/unit/runtime/tensor_parallel/test_autotp_universal_checkpoint.py:577
↓ 2 callers
Function
_scheduled_graph
(graph, scheduler_budget=None)
tests/unit/v1/compile/test_list_schedule.py:223
↓ 2 callers
Function
_scheduler_budget_from_operator_profile
Derive a rank-consistent budget and explain why a non-constraining gate is disabled.
deepspeed/compile/passes/zero3_compile.py:213
↓ 2 callers
Method
_send_tensor_meta
Communicate metadata about upcoming p2p transfers. Metadata is communicated in this order: * type (0: tensor, 1: list)
deepspeed/runtime/pipe/engine.py:930
↓ 2 callers
Method
_set_bounds
Manually define the range of layers that will be built on this process. These boundaries are treated as list slices and so start is inclusive
deepspeed/runtime/pipe/module.py:540
↓ 2 callers
Method
_set_client_model
(self, model)
deepspeed/runtime/engine.py:2220
↓ 2 callers
Method
_set_ep_group
(self, ep_group)
deepspeed/moe/sharded_moe.py:555
↓ 2 callers
Method
_set_fp16_partitioned_groups_flat
(self)
deepspeed/runtime/zero/stage3.py:1402
↓ 2 callers
Method
_set_zero_group_parallelism
(self)
deepspeed/runtime/zero/stage3.py:794
↓ 2 callers
Function
_shape_numel
(shape)
deepspeed/checkpoint/ds_to_universal.py:618
↓ 2 callers
Method
_shards
(self, batch_dim_idx, seq_world_size)
tests/unit/v1/sequence_parallelism/test_ulysses.py:181
↓ 2 callers
Function
_shared_params
(engine)
tests/unit/v1/moe/test_autoep_checkpoint.py:150
↓ 2 callers
Function
_shared_qk_affine_map
Describe a shared-QK layout, where a rank's value heads sit in two runs. Returns None where the layout cannot be described honestly: without the
deepspeed/module_inject/layers.py:1720
↓ 2 callers
Function
_simulate_zero3_partition
Make ``module``'s parameters look the way ZeRO-3 leaves them. ZeRO-3 empties each partitioned parameter's local data and records the pre-part
tests/unit/runtime/tensor_parallel/test_autotp_universal_checkpoint.py:77
↓ 2 callers
Function
_single_line
Render untrusted repository text without controls or extra log lines.
ci/tests_fetcher.py:637
↓ 2 callers
Method
_skip_if_nvme_unsupported
(self)
tests/unit/v1/zero/test_zero_user_backward.py:2200
↓ 2 callers
Method
_skip_invalid_grad_norm
(self)
deepspeed/runtime/fp16/fused_optimizer.py:151
↓ 2 callers
Method
_skip_invalid_grad_norm
(self)
deepspeed/runtime/fp16/unfused_optimizer.py:125
↓ 2 callers
Function
_skip_without_device_sub_groups
()
tests/unit/v1/zero/test_zero_partial_offload.py:96
↓ 2 callers
Function
_small_async_split_result
(scale=1.0)
tests/unit/v1/moe/test_autoep_grad_parity.py:707
↓ 2 callers
Function
_source_indices
Recover which row (or column) of the full tensor each row of the shard came from.
tests/unit/checkpoint/test_affine_shard_map.py:67
↓ 2 callers
Function
_source_param_ndim
(param: torch.Tensor | nn.Parameter)
deepspeed/module_inject/auto_ep.py:108
↓ 2 callers
Function
_sparse_decode
Gather each token's expert results back and weight them by the gate values.
deepspeed/moe/sharded_moe.py:204
↓ 2 callers
Function
_sparse_encode
Place every routed token in its expert slot, returning the [e, c, m] buffer. Inverting the routing map first turns the copy into a single gather.
deepspeed/moe/sharded_moe.py:188
↓ 2 callers
Method
_splice_visual_into_text
Replace image placeholder positions in *text_embeds* with *visual_embeds*. This is intentionally architecture-specific. The default raises
deepspeed/sequence/autosp_fusion.py:155
↓ 2 callers
Function
_split_affinity
Split a rank's core list into (zf_affinity, pt_affinity): reserve the first ceil(pt_reserved_cores_perc * n) cores for the training thread and giv
deepspeed/runtime/zenflow/zenflow_utils.py:73
↓ 2 callers
Method
_split_by_partition_dtype
(self, params_group)
deepspeed/runtime/zero/stage3.py:1283
↓ 2 callers
Function
_split_plan_from_expert_counts
Build a SplitPlan from a global per-expert token histogram (ep_size > 1). A single all-to-all exchanges the whole ``[ep_size, E_local]`` count ma
deepspeed/module_inject/auto_ep_layer.py:223
↓ 2 callers
Function
_split_plan_received
Rows of the matrix rank ``ep_rank`` receives from the counts all-to-all.
tests/unit/v1/moe/test_autoep_unit.py:1887
↓ 2 callers
Function
_stale_wait_cycle
Drive the coordinator's registration pattern by hand. __all_gather_params_ stores ONE handle object under EVERY parameter of a gather group, and
tests/unit/runtime/zero/test_zero_stale_handle_wait.py:21
↓ 2 callers
Method
_start_continuous_profile
(self)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1586
↓ 2 callers
Function
_step
(engine, case)
tests/unit/runtime/zero/test_zero_numel_param_shape.py:111
↓ 2 callers
Function
_stochastic_round_fp8
Round the magnitude down to the format's grid, then up one grid step with probability equal to the remainder, so the expected result is ``y``.
deepspeed/ops/triton_ops/subchannel_quant.py:79
↓ 2 callers
Function
_storage_id
(tensor)
tests/unit/runtime/zero/test_zero_linear_direct_init.py:28
↓ 2 callers
Method
_stream_context
(self, stream)
deepspeed/runtime/activation_checkpointing/offload_activations.py:110
↓ 2 callers
Method
_submit_state_updates
(self, sub_group_ids, combined_scale)
deepspeed/runtime/reflow/reflow_stage3.py:947
↓ 2 callers
Function
_sum_replicated_kv_gradient
Sum the K/V gradient rows that every rank holds a copy of.
deepspeed/module_inject/layers.py:1507
← previous
next →
2,501–2,600 of 15,767, ranked by callers