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
↓ 2 callers
Function
reflow_resolve_omp_threads
Non-positive thread counts use all cores available to this worker.
csrc/adam/reflow_cpu_adam_impl.cpp:54
↓ 2 callers
Method
refresh_fp32_params
(self)
deepspeed/runtime/bf16_optimizer.py:657
↓ 2 callers
Method
registerParam
csrc/includes/deepcompile.h:391
↓ 2 callers
Function
register_activation_offload_ops
Give the activation-offload ops a Meta kernel so the rewritten graph can be traced. The compiled extension registers CPU and CUDA kernels for the
deepspeed/compile/passes/offload_activation.py:102
↓ 2 callers
Function
register_backward_frame
Associate the next AOT compiled function with its DeepCompile frame.
deepspeed/compile/patch_compiled_func.py:96
↓ 2 callers
Function
register_expert_activation
Make ``name`` selectable as a preset's or the config's ``expert_activation``.
deepspeed/moe/ep_experts.py:76
↓ 2 callers
Function
register_fallback_no_reuse
(op_overload, never_reuse_input=False, n
deepspeed/compile/inductor.py:295
↓ 2 callers
Function
register_last_uses
(n: Node, user: Node)
deepspeed/compile/util.py:258
↓ 2 callers
Function
register_offload_ops
()
deepspeed/compile/passes/offload_adam_states.py:303
↓ 2 callers
Function
register_output_backward_hooks
Convenience function to register backward hooks on outputs. This function creates a hook manager that is automatically tied to the lifetime
deepspeed/runtime/utils.py:1469
↓ 2 callers
Function
rel_diff
(A, B)
tests/unit/runtime/pipe/test_pipe.py:49
↓ 2 callers
Method
release_available_params_for_next_forward
Restore the partitioned parameter state expected by Dynamo guards.
deepspeed/compile/z3_eager_fallback.py:180
↓ 2 callers
Method
release_sub_module
release the parameters of a sub module, assuming they meet conditions to be released.
deepspeed/runtime/zero/partitioned_param_coordinator.py:509
↓ 2 callers
Method
release_swap_buffers
(self, parameter)
deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py:63
↓ 2 callers
Function
reload_adam_states_sync
()
deepspeed/compile/passes/offload_adam_states.py:184
↓ 2 callers
Function
reload_optimizer_states
Move optimizer states back to ``device``. Returns the replaced host tensors. A non-blocking copy may still be reading them on return, so call
deepspeed/runtime/zero/offload_states.py:29
↓ 2 callers
Method
repeat_shared_prefill_cache
Expand the completed prompt cache for independent response branches.
deepspeed/runtime/hybrid_engine.py:232
↓ 2 callers
Function
replace_module
Scan the model for instances of ``orig_clas:`` to replace using ``replace_fn``. Arguments: model (torch.nn.Module): the model to augment
deepspeed/module_inject/replace_module.py:616
↓ 2 callers
Method
replace_moe_layers
Replace multiple MoE modules and batch post-replacement recorder retargeting. With ``collect_sources``, returns a ``ReplacementSourceMap``: t
deepspeed/module_inject/auto_ep.py:695
↓ 2 callers
Function
replace_transformer_layer
Replace bert-style transformer layers with DeepSpeed's transformer layer Arguments: orig_layer_impl (torch.nn.Module): the original trans
deepspeed/module_inject/replace_module.py:181
↓ 2 callers
Function
replace_wo_policy
(module, all_reduce_linears, prefix="", state_dict=None)
deepspeed/module_inject/replace_module.py:274
↓ 2 callers
Method
replay_dispatch
Repeat a forward dispatch in the layout its handle recorded. Used when activation checkpointing recomputes a forward dispatch. The ro
deepspeed/module_inject/auto_ep_comm.py:312
↓ 2 callers
Function
replicated_kv_row_start
First K/V row in ``rank``'s local replicated-K/V shard.
deepspeed/module_inject/fusedqkv_utils.py:103
↓ 2 callers
Function
replicates_kv_block
Whether this model's fused qkv layout keeps the whole K/V block on every rank. Uses class names instead of ``get_fused_qkv_type`` to avoid string
deepspeed/module_inject/fusedqkv_utils.py:62
↓ 2 callers
Function
require_tp_fused_qkvw
(name, mp_size)
deepspeed/module_inject/fusedqkv_utils.py:22
↓ 2 callers
Method
reset
(self)
tests/unit/runtime/rollout/test_hybrid_engine_rollout.py:367
↓ 2 callers
Method
reset
(self)
deepspeed/utils/timer.py:175
↓ 2 callers
Method
reset
(self)
deepspeed/sequence/linear_cross_entropy.py:343
↓ 2 callers
Method
reset
Set to the initial state (no tracker).
deepspeed/runtime/activation_checkpointing/checkpointing.py:149
↓ 2 callers
Method
reset_data
Clear all logged communication data.
deepspeed/utils/comms_logging.py:143
↓ 2 callers
Method
reset_tokens
(self, initial_tokens=1)
deepspeed/ops/transformer/inference/op_binding/workspace.py:126
↓ 2 callers
Method
reset_tokens
csrc/transformer/inference/includes/inference_context.h:212
↓ 2 callers
Function
reshape_meg_2d_parallel
(old_pp_degree, old_tp_degree, new_pp_degree, new_tp_degree, verbose=False)
deepspeed/checkpoint/reshape_meg_2d.py:80
↓ 2 callers
Function
resolve_row_weighting_impl
Resolve DeepEP row weighting implementation from config override.
deepspeed/module_inject/auto_ep_layer.py:118
↓ 2 callers
Function
resolve_score_apply_mode
Resolve score-application mode from config override or preset default.
deepspeed/module_inject/auto_ep_layer.py:99
↓ 2 callers
Function
restore_inference_model
Restore the model from the buffer and metadata. Arguments: buffer: Buffer containing the model parameters. metadata: Metadat
deepspeed/inference/v2/model_implementations/flat_model_helpers.py:225
↓ 2 callers
Function
restore_offloaded_activations
Restore async-offloaded inputs in place onto their saved tensors. Mutating ``t.data`` (not replacing the object) preserves autograd identity and
deepspeed/runtime/activation_checkpointing/checkpointing.py:550
↓ 2 callers
Method
retake_workspace
(self)
deepspeed/ops/transformer/inference/op_binding/workspace.py:196
↓ 2 callers
Method
rms_norm_fallback
(vals, gamma, epsilon)
deepspeed/ops/transformer/inference/op_binding/rms_norm.py:23
↓ 2 callers
Function
round_up_to_256
Round up to the nearest multiple of 256.
tests/unit/inference/v2/model_implementations/sharding/test_mlp_sharding.py:13
↓ 2 callers
Function
run
(num_matmuls)
tests/unit/utils/test_timer.py:24
↓ 2 callers
Function
run
(norms)
tests/unit/v1/ops/triton_ops/test_fused_rms_norm.py:677
↓ 2 callers
Function
run
(x, manager=None)
tests/unit/runtime/activation_checkpointing/test_offload_activations.py:263
↓ 2 callers
Method
run
(self, tmpdir)
tests/unit/v1/moe/test_autoep_checkpoint.py:888
↓ 2 callers
Method
run
(self)
deepspeed/moe/ep_experts.py:468
↓ 2 callers
Method
run_commands
(self, *commands)
ci/test_torch_latest.py:295
↓ 2 callers
Method
run_ds_config
(self, ds_config, exp_name)
deepspeed/autotuning/autotuner.py:1058
↓ 2 callers
Method
run_grad_acc_post_hooks
Run all registered post hooks if backward is active. Custom autograd Functions (e.g., TiledFusedLogitsLoss) can invoke `torch.autogra
deepspeed/runtime/base_optimizer.py:122
↓ 2 callers
Function
run_job
(job, verbose=False)
deepspeed/nvme/ds_aio_job.py:42
↓ 2 callers
Method
run_map
(self)
deepspeed/runtime/data_pipeline/data_sampling/data_analyzer.py:201
↓ 2 callers
Method
run_map_reduce
(self, comm_group=None)
deepspeed/runtime/data_pipeline/data_sampling/data_analyzer.py:447
↓ 2 callers
Function
run_model
(model, config_dict, hidden_dim, dtype, requires_grad)
tests/unit/runtime/zero/test_zero_leaf_module.py:276
↓ 2 callers
Function
run_opt_passes
Apply scheduled graph passes and retain only complete post-pass memory profiles.
deepspeed/compile/backend.py:257
↓ 2 callers
Function
run_sandbox_command
(sandbox: Any, modal_module: Any, command: RemoteCommand)
ci/torch_latest.py:783
↓ 2 callers
Function
run_step
(x)
tests/unit/runtime/activation_checkpointing/test_offload_activations.py:212
↓ 2 callers
Function
safe_set_full_optimizer_state
Update the partitioned fp32 optimizer state of a low-precision (e.g., fp16) parameter. Args: param (``torch.nn.Parameter``): A mo
deepspeed/utils/tensor_fragment.py:190
↓ 2 callers
Method
save_16bit_model
Save 16bit model weights This method saves the 16bit model weights at the desired destination. Arguments: save_
deepspeed/runtime/engine.py:5894
↓ 2 callers
Function
save_args_for_backward
keep this function to reduce the modification from original implementation
deepspeed/runtime/activation_checkpointing/checkpointing.py:807
↓ 2 callers
Method
save_state_dict
(self, save_dir, checkpoint_engine, exclude_frozen_params=False)
deepspeed/runtime/pipe/module.py:602
↓ 2 callers
Method
scale
r"""Apply loss scaler for manual backward pass. Use this method when calling loss.backward() directly instead of engine.backward(). T
deepspeed/runtime/engine.py:3498
↓ 2 callers
Method
scale_if_loss
Applies loss scaling to the input value if it is a loss tensor.
deepspeed/runtime/base_optimizer.py:444
↓ 2 callers
Method
scale_loss
Scales the loss by the current loss scale. We need this function to scale loss without calling backward on it.
deepspeed/runtime/fp16/loss_scaler.py:165
↓ 2 callers
Function
scatter
(tensor, scatter_list=None, src=0, group=None, async_op=False,
deepspeed/comm/comm.py:454
↓ 2 callers
Method
scheduler_name
(self)
deepspeed/runtime/engine.py:1619
↓ 2 callers
Function
search_error
(filename)
deepspeed/autotuning/utils.py:17
↓ 2 callers
Function
select
(request)
tests/unit/checkpoint/test_affine_transfer_plan.py:162
↓ 2 callers
Function
send_ssm_command
( instance: AwsInstance, run_identity: str, phase: str, script: str, timeout_seconds: int,
ci/torch_latest.py:1226
↓ 2 callers
Function
sequence_tiled_compute
This is a wrapper for SequenceTiledCompute which we need since torch.autograd.Function can't work with dicts of tensors (in backward it has to re
deepspeed/runtime/sequence_parallel/ulysses_sp.py:724
↓ 2 callers
Method
setPersistent
csrc/includes/deepcompile.h:303
↓ 2 callers
Method
setValid
csrc/includes/deepcompile.h:445
↓ 2 callers
Method
set_attention
(self, qkvw, qkvb, dense_w, dense_b)
deepspeed/module_inject/containers/base.py:192
↓ 2 callers
Method
set_dataloader
(self, loader)
deepspeed/runtime/pipe/engine.py:638
↓ 2 callers
Function
set_example_values_to_symints
(real_inputs, param_indices=None, real_zero_params=None)
deepspeed/compile/backend.py:181
↓ 2 callers
Method
set_full_hp_param
(self, value, param, optim_state_key=None)
deepspeed/runtime/zero/stage3.py:3557
↓ 2 callers
Method
set_hidden_heads
Args: hidden_size: embedding dimension of the model num_attention_heads: number of attention heads in the model
deepspeed/module_inject/containers/base.py:175
↓ 2 callers
Method
set_layernorm
(self, attn_nw, attn_nb, input_nw, input_nb)
deepspeed/module_inject/containers/base.py:204
↓ 2 callers
Method
set_local_hp_param
(self, value, param, optim_state_key=None)
deepspeed/runtime/zero/stage3.py:3619
↓ 2 callers
Method
set_lora_params
If available, set the LoRA parameters for the module. An implementation for this would iterate over all parameters of the model and
deepspeed/module_inject/containers/features/hybrid_engine.py:50
↓ 2 callers
Method
set_norm_for_param_grad_in_gpu
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1973
↓ 2 callers
Method
set_num_threads
csrc/includes/reflow_cpu_adam.h:136
↓ 2 callers
Function
set_sdpa_attn_mask
(attn_node: Node, attn_mask, as_kwarg: bool)
deepspeed/compile/passes/sp_compile.py:461
↓ 2 callers
Method
set_states
Set the rng states. For efficiency purposes, we do not check the size of seed for compatibility.
deepspeed/runtime/activation_checkpointing/checkpointing.py:159
↓ 2 callers
Method
set_swap_buffers
(self, buffers, aligned_numel)
deepspeed/runtime/swap_tensor/optimizer_utils.py:113
↓ 2 callers
Method
set_write_position
(self, pos: torch.Tensor)
deepspeed/utils/static_cache.py:240
↓ 2 callers
Method
shared
csrc/pin_memory/deepspeed_pin_tensor.cpp:27
↓ 2 callers
Function
shared_open
csrc/cpu/comm/shm.cpp:50
↓ 2 callers
Function
shm_initialize
csrc/cpu/comm/shm.cpp:340
↓ 2 callers
Function
should_release_reduce_buckets
(graph_order, graph_id: int)
deepspeed/compile/fx.py:35
↓ 2 callers
Method
shutdown
Release the captured continuous decode graph and its static cache. The rollout stays usable and captures again on the next graph rollout.
deepspeed/runtime/rollout/hybrid_engine_rollout.py:2159
↓ 2 callers
Method
simple_init
(self)
deepspeed/checkpoint/reshape_meg_2d.py:16
↓ 2 callers
Function
skip_unless_transformers_has
(transformers, *names, min_version=None, reason="AutoEP coverage")
tests/unit/v1/moe/autoep_test_utils.py:350
↓ 2 callers
Method
source_view
This piece's elements as a view of the full parameter, without copying.
deepspeed/checkpoint/affine.py:94
↓ 2 callers
Method
sources
(self)
op_builder/xpu/async_io.py:22
↓ 2 callers
Method
sparse_allreduce_no_retain
(self, bucket, dp_group, dp_world_size=None)
deepspeed/runtime/engine.py:4102
↓ 2 callers
Function
sparse_mla_bwd
Gradients of :func:`sparse_mla_fwd_interface` with respect to ``q`` and ``kv``.
deepspeed/models/glm_moe_dsa/kernels/sparse_mla_bwd.py:294
↓ 2 callers
Function
sparse_mla_fwd_interface
Run the forward kernel on token-major tensors. ``q`` is ``[tokens, heads, d_v + rope_dim]``, ``kv`` is ``[tokens_kv, 1, d_v + rope_dim]``, ``indi
deepspeed/models/glm_moe_dsa/kernels/sparse_mla_fwd.py:180
↓ 2 callers
Function
split_by_qkvlist_and_refuse
(qkv_list, split_size, split_dim=0, cat_dim=0)
deepspeed/module_inject/fusedqkv_utils.py:14
↓ 2 callers
Function
split_dataset
(dataset, num_workers, worker_id, num_threads)
deepspeed/runtime/data_pipeline/data_sampling/utils.py:38
↓ 2 callers
Function
split_half_float_double
(tensors)
deepspeed/runtime/zero/stage_1_and_2.py:66
↓ 2 callers
Function
split_half_float_double_sparse
(tensors)
deepspeed/runtime/engine.py:168
← previous
next →
3,101–3,200 of 15,468, ranked by callers