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
split_index
(start_idx, end_idx, num_partitions)
deepspeed/runtime/data_pipeline/data_sampling/utils.py:33
↓ 2 callers
Function
split_kv
Split a KV cache instance into its key and value components. Parameters: kv_cache (torch.Tensor): The KV-cache to split. This should
deepspeed/inference/v2/ragged/kv_cache.py:22
↓ 2 callers
Function
split_params_grads_into_shared_and_expert_params
Split grad of parameters into grads of non-expert params and grads of expert params. This is useful while computing grad-norms for clipping an
deepspeed/moe/utils.py:46
↓ 2 callers
Method
start_event
(self, name)
deepspeed/runtime/zero/partitioned_param_profiler.py:34
↓ 2 callers
Function
start_optimizer_process
Start ZenFlow's overlapped optimizer (ZeRO stage 1/2/3) in a dedicated process, coordinated through a shared-memory semaphore control block. A sep
deepspeed/runtime/zenflow/zenflow_utils.py:138
↓ 2 callers
Method
start_profiling_comms
(self)
deepspeed/utils/comms_logging.py:90
↓ 2 callers
Function
state_matched_models
(model_cls, config)
tests/unit/v1/moe/autoep_test_utils.py:294
↓ 2 callers
Function
step
Not supporting closure.
deepspeed/runtime/zenflow/engine_stage3.py:612
↓ 2 callers
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
deepspeed/ops/adam/fused_adam.py:107
↓ 2 callers
Method
step
Not supporting closure.
deepspeed/runtime/zero/stage_1_and_2.py:3135
↓ 2 callers
Method
step
(self, closure=None)
deepspeed/runtime/zero/muon/original_muon.py:313
↓ 2 callers
Method
step
Not supporting closure.
deepspeed/runtime/fp16/fused_optimizer.py:256
↓ 2 callers
Method
step
Not supporting closure.
deepspeed/runtime/fp16/unfused_optimizer.py:197
↓ 2 callers
Method
step_state_halfgrad
Optimizer-state-only Adam step from half-precision gradients: update exp_avg/exp_avg_sq and skip the param store. Runs on a background worker
deepspeed/runtime/reflow/reflow_cpu_adam.py:146
↓ 2 callers
Method
stop_event
(self, name, num_elem)
deepspeed/runtime/zero/partitioned_param_profiler.py:42
↓ 2 callers
Method
store
csrc/includes/quantization_utils.h:83
↓ 2 callers
Method
supported
()
deepspeed/runtime/engine.py:456
↓ 2 callers
Method
swap_in_optimizer_state
(self, parameter, async_parameter)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:102
↓ 2 callers
Method
swap_out
(self, aio_handle, async_op=False)
deepspeed/runtime/swap_tensor/utils.py:153
↓ 2 callers
Method
swap_out_and_release
(self, params, async_op=False, force_buffer_release=False)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:274
↓ 2 callers
Method
swap_out_gradients
(self, parameter, gradient_offsets, gradient_tensors)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:155
↓ 2 callers
Method
swap_out_optimizer_state
(self, parameter, async_swap)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:129
↓ 2 callers
Function
sweep_main
(args)
deepspeed/nvme/perf_run_sweep.py:291
↓ 2 callers
Function
sync_all
()
deepspeed/compile/profilers/comm_profile.py:20
↓ 2 callers
Method
synchronize_writes
(self)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:204
↓ 2 callers
Method
temp_copy_param
(self, group_to_paramlist)
deepspeed/ops/adam/zenflow_torch_adam.py:66
↓ 2 callers
Function
time_intervals
(timer, run_matmuls, matmuls_per_interval)
tests/unit/utils/test_timer.py:31
↓ 2 callers
Method
to_layers
(self)
tests/unit/alexnet_model.py:51
↓ 2 callers
Function
to_padded
Pad to a backend friendly granularity.
deepspeed/inference/v2/ragged/ragged_wrapper.py:17
↓ 2 callers
Function
torch_assert_dicts_of_tensors_equal
Compare two dicts of tensors or non-tensor numbers for their equality. Add msg=blah to add an additional comment to when assert fails.
tests/unit/util.py:149
↓ 2 callers
Method
torch_autocast_dtype
(self)
deepspeed/runtime/engine.py:1777
↓ 2 callers
Method
torch_autocast_enabled
(self)
deepspeed/runtime/engine.py:1774
↓ 2 callers
Function
tp_group_world_size
(tp_group, dist_module)
deepspeed/runtime/tensor_parallel/init_utils.py:63
↓ 2 callers
Method
tp_parser
(model)
deepspeed/module_inject/auto_tp.py:370
↓ 2 callers
Method
trace_prologue
(self, sub_module: Module)
deepspeed/runtime/zero/partitioned_param_coordinator.py:219
↓ 2 callers
Method
train
(buffer_bytes)
tests/unit/v1/ops/muon/test_muon.py:237
↓ 2 callers
Function
train_cifar
(model, config, num_steps=400, average_dp_losses=True, fp16=True, seed=123)
tests/unit/alexnet_model.py:126
↓ 2 callers
Function
train_independent_loss
(num_models, config_dict, dtype)
tests/unit/runtime/test_multiple_models.py:50
↓ 2 callers
Function
train_shared_loss
(num_models, config_dict, dtype)
tests/unit/runtime/test_multiple_models.py:22
↓ 2 callers
Function
train_with_offload
(model, config, batches)
tests/unit/v1/zero/test_reflow.py:367
↓ 2 callers
Method
transform_for_inference
If the views on certain parameters are largely incompatible, it may be necessary to do more substantial transformations to the parame
deepspeed/module_inject/containers/features/hybrid_engine.py:41
↓ 2 callers
Method
transform_for_training
If the views on certain parameters are largely incompatible, it may be necessary to do more substantial transformations to the parame
deepspeed/module_inject/containers/features/hybrid_engine.py:33
↓ 2 callers
Method
transform_moe_mlp_1_param
(self, param: torch.Tensor)
tests/unit/inference/v2/model_implementations/parameters/test_parameter_list.py:33
↓ 2 callers
Method
transform_moe_mlp_1_param
Shards the first MoE param and passes it to the underlying implementation. Since it's possible for an architecture to have both MoE a
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:663
↓ 2 callers
Method
transform_moe_mlp_2_param
Perform any necessary transformations of the parameter. The specified component being transformed should be inferred from the shape o
deepspeed/inference/v2/modules/interfaces/moe_base.py:56
↓ 2 callers
Method
transpose_attention
(self)
deepspeed/module_inject/containers/base.py:287
↓ 2 callers
Method
trim_left
Shift all cache layers left to reclaim an unused prefix span.
deepspeed/utils/static_cache.py:366
↓ 2 callers
Method
tune
Tunes Zero stages, micro batch size per GPU, and other Zero configurations. Performance metrics of different tuning spaces are recorded in self.recor
deepspeed/autotuning/autotuner.py:404
↓ 2 callers
Method
uncovered_offsets
Return the offsets of the full tensor that no rank holds. A non-empty result means the parameter cannot be rebuilt from its shards, so this
deepspeed/checkpoint/affine.py:210
↓ 2 callers
Method
unfuse_lora_weight
(self)
deepspeed/runtime/hybrid_engine.py:171
↓ 2 callers
Method
unpatch_init_and_builtins
(self)
deepspeed/runtime/zero/partition_parameters.py:612
↓ 2 callers
Function
unpin_offloaded_optimizer_states
Release host buffers that offloading page-locked in the optimizer state. Offload pins these regardless of the ZeRO CPU-offload config, so destroy
deepspeed/runtime/zero/offload_states.py:44
↓ 2 callers
Method
unscale_and_clip_grads
(self, total_norm, apply_scale=True)
deepspeed/runtime/fp16/unfused_optimizer.py:243
↓ 2 callers
Function
unwrap_model_for_generation
For ZeRO-3 models, we gather the weights once to speed up generation.
deepspeed/runtime/zero/stage3.py:94
↓ 2 callers
Function
update_gathered_stage3_optimizer
(optimizer_state, param_shapes, world_size)
tests/unit/checkpoint/test_universal_checkpoint.py:185
↓ 2 callers
Method
update_hp_grads
(self, clear_lp_grads=False)
deepspeed/runtime/bf16_optimizer.py:537
↓ 2 callers
Method
update_lp_params
(self)
deepspeed/runtime/bf16_optimizer.py:598
↓ 2 callers
Method
update_offload_overflow_tracker_for_param_grad
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1914
↓ 2 callers
Function
update_out_and_lse
( out: Optional[torch.Tensor], lse: Optional[torch.Tensor], block_out: torch.Tensor, block_lse
deepspeed/sequence/fpdt_layer.py:59
↓ 2 callers
Method
update_selected_channels
(self, tensor, total_size, communication_data_type)
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:178
↓ 2 callers
Method
update_seq
(self, global_steps)
deepspeed/runtime/data_pipeline/data_routing/scheduler.py:83
↓ 2 callers
Function
validate_device
(tensor: torch.Tensor)
tests/unit/inference/v2/model_implementations/parameters/utils.py:59
↓ 2 callers
Function
validate_folding_global
Validate global folding policy before any process group is created. ``offload_optimizer_device`` and ``offload_param_device`` are the ZeRO offloa
deepspeed/module_inject/auto_ep_folding.py:184
↓ 2 callers
Function
validate_repository
(value: str)
ci/torch_latest.py:308
↓ 2 callers
Function
validate_sha
(value: str)
ci/torch_latest.py:314
↓ 2 callers
Function
validate_tensor
(model, api_type, opt_states)
tests/unit/runtime/zero/test_zero_tensor_fragment.py:103
↓ 2 callers
Function
validate_vocab_parallel_loss
Check hook replacement before partitioning weights, then restore the original loss.
deepspeed/sequence/cross_entropy.py:451
↓ 2 callers
Function
vocab_sequence_parallel_cross_entropy
Sequence-parallel wrapper preserving the legacy local-slice gradient.
deepspeed/sequence/cross_entropy.py:276
↓ 2 callers
Method
wait
(self)
deepspeed/module_inject/auto_ep_layer.py:81
↓ 2 callers
Function
wait_buffer_state_until_2
csrc/cpu/comm/shm.cpp:114
↓ 2 callers
Function
wait_for_ssm_command
( instance: AwsInstance, command_id: str, phase: str, timeout_seconds: int, run_command: A
ci/torch_latest.py:1476
↓ 2 callers
Method
wait_last_update_and_copy
(self)
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:710
↓ 2 callers
Function
within_range
(val, target, tolerance)
tests/unit/profiling/flops_profiler/test_flops_profiler.py:21
↓ 2 callers
Method
world_size
(self)
deepspeed/runtime/pipe/topology.py:210
↓ 2 callers
Function
wrap_if_ds_param
(t)
deepspeed/compile/patch_fake_tensor.py:23
↓ 2 callers
Function
wrapped_fn
(*args, **kwargs)
deepspeed/utils/nvtx.py:30
↓ 2 callers
Function
wrapper
(requests)
tests/unit/checkpoint/test_affine_replica_policy.py:128
↓ 2 callers
Method
zeMemFree
(self, context, address)
tests/unit/v1/pin_memory/test_pin_memory.py:233
↓ 2 callers
Function
zero3_partitioned_param_info
(unpartitioned_numel, world_size)
deepspeed/utils/zero_to_fp32.py:421
↓ 2 callers
Method
zero_allgather_bucket_size
(self)
deepspeed/runtime/engine.py:1693
↓ 2 callers
Method
zero_compute_grad_norm
(self)
deepspeed/runtime/engine.py:1696
↓ 2 callers
Method
zero_elastic_checkpoint
(self)
deepspeed/runtime/engine.py:1717
↓ 2 callers
Function
zero_optimizer_storage_affine_maps
Describe where ZeRO keeps the fp32 master copy and optimizer states of each of ``params``. Returns one map per parameter, in order, or ``None`` f
deepspeed/checkpoint/zero_affine.py:165
↓ 2 callers
Function
zero_optimizer_storage_shard
This rank's shard of the fp32 master copy of ``param``, or of its ``optim_state_key`` state. The shard is a flat view of ZeRO's storage, laid out
deepspeed/checkpoint/zero_affine.py:219
↓ 2 callers
Method
zero_overlap_comm
(self)
deepspeed/runtime/engine.py:1637
↓ 2 callers
Method
zero_quantized_gradients
(self)
deepspeed/runtime/engine.py:1850
↓ 2 callers
Method
zero_quantized_weights
(self)
deepspeed/runtime/engine.py:1844
↓ 2 callers
Method
zero_reduce_bucket_size
(self)
deepspeed/runtime/engine.py:1687
↓ 1 callers
Function
Assign_32_FP6_To_4_Thread
dealing with 4 1*8 blocks of FP6
deepspeed/inference/v2/kernels/core_ops/cuda_linear/include/weight_prepacking.h:49
↓ 1 callers
Method
Backward
csrc/transformer/ds_transformer_cuda.cpp:302
↓ 1 callers
Method
BackwardFusedAdd
csrc/includes/normalize_layer.h:138
↓ 1 callers
Function
BitInterleaving_2bit
deepspeed/inference/v2/kernels/core_ops/cuda_linear/include/weight_prepacking.h:98
↓ 1 callers
Function
BitInterleaving_4bit
deepspeed/inference/v2/kernels/core_ops/cuda_linear/include/weight_prepacking.h:117
↓ 1 callers
Function
Extract_2_Bits_From_4_PaddedFP6
deepspeed/inference/v2/kernels/core_ops/cuda_linear/include/weight_prepacking.h:28
↓ 1 callers
Function
Extract_4_Bits_From_2_PaddedFP6
deepspeed/inference/v2/kernels/core_ops/cuda_linear/include/weight_prepacking.h:38
↓ 1 callers
Method
ForwardCheckpoint
csrc/includes/normalize_layer.h:49
↓ 1 callers
Method
ForwardWithBias
csrc/includes/dropout.h:36
↓ 1 callers
Method
GenWorkSpace
csrc/transformer/inference/includes/inference_context.h:102
↓ 1 callers
Method
GetAttentionUnfusedWorkspace
csrc/transformer/inference/includes/inference_context.h:201
↓ 1 callers
Function
GetCuErrorString
cuda driver error description
csrc/gds/deepspeed_gds_utils.h:61
← previous
next →
3,201–3,300 of 15,468, ranked by callers