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
↓ 4 callers
Function
_require_native
()
tests/unit/v1/pin_memory/test_destroy_unpin.py:23
↓ 4 callers
Function
_require_native
(monkeypatch)
tests/unit/v1/pin_memory/test_offload_route.py:21
↓ 4 callers
Function
_resolve_expected_grad_dtype
(param)
deepspeed/compile/init_z3.py:75
↓ 4 callers
Function
_resolve_vocab_metadata
Infer (if needed) and collectively validate the vocabulary shard layout. This always re-runs the validation collective; it does not cache across
deepspeed/sequence/cross_entropy.py:170
↓ 4 callers
Method
_restore_fp16_params_from_master
Undo a discarded (overflow) step: re-cast the FP32 master weights to FP16/BF16 and scatter them back onto the GPU params, overwriting any FP16
deepspeed/runtime/reflow/reflow_stage3.py:1822
↓ 4 callers
Function
_row_to_column
(world_size, tp_size=2)
tests/unit/checkpoint/test_affine_transfer_executor.py:61
↓ 4 callers
Function
_run
(raw: str)
ci/test_classify_multirank_exit.py:32
↓ 4 callers
Function
_run_fwd_pass
(monkeypatch, graph, budget_gb="0")
tests/unit/v1/compile/test_offload_opt_states.py:71
↓ 4 callers
Method
_run_git
(self, args: list[str])
ci/tests_fetcher.py:208
↓ 4 callers
Function
_run_multi_backward
(config_dict, hidden_dim, num_chunks, num_steps=1, seed=42)
tests/unit/v1/zero/test_zero2_offload_multi_backward.py:72
↓ 4 callers
Function
_run_router_grad_boundary
(engine, *, logical_dp_world_size, logical_dp_rank, seed)
tests/unit/v1/moe/test_autoep_autotp_grad_parity.py:261
↓ 4 callers
Function
_run_unmanaged_vs_managed_offload
(zero_stage, gradient_accumulation_steps,
tests/unit/v1/zero/test_zero_user_backward.py:2105
↓ 4 callers
Function
_selected_experts_from_counts
Build a routing assignment list whose histogram is exactly ``counts``.
tests/unit/v1/moe/test_autoep_unit.py:1893
↓ 4 callers
Function
_set_cuda_rng_state
Sets the random number generator state of the current GPU. Arguments: new_state (torch.ByteTensor): The desired state This function i
deepspeed/runtime/activation_checkpointing/checkpointing.py:101
↓ 4 callers
Method
_set_deepcompile_active
Toggle DeepCompile runtime state and manage forward hooks accordingly.
deepspeed/runtime/engine.py:6262
↓ 4 callers
Function
_shape_prod
(values)
deepspeed/module_inject/layers.py:2010
↓ 4 callers
Function
_single_line
(value: object)
ci/torch_latest.py:779
↓ 4 callers
Function
_skip_if_unsupported
(offload)
tests/unit/v1/zero/test_zero3_unused_param_grads.py:67
↓ 4 callers
Function
_skip_if_unsupported
(dtype=torch.bfloat16)
tests/unit/v1/zero/test_zero3_nvme_offload.py:21
↓ 4 callers
Function
_softmax_stats
Global fp32 softmax statistics over the sharded vocabulary of each ``[rows, local_vocab]`` tensor. All tensors share one MAX and one SUM all-redu
deepspeed/sequence/vocab_parallel_ops.py:71
↓ 4 callers
Method
_start_timers
(self, timer_names)
deepspeed/runtime/engine.py:3892
↓ 4 callers
Function
_subparam_shard_widths
Per-rank width of each sub-parameter, as one list per sub-parameter. Sub-parameters follow the same deterministic split as ordinary layers, so a
deepspeed/module_inject/layers.py:2142
↓ 4 callers
Function
_surviving
The shards that ``ranks`` hold in ``layout``, at locations counted from ``first_location``.
tests/unit/checkpoint/test_affine_transfer_plan.py:1055
↓ 4 callers
Function
_swiglu_eager
Pure-PyTorch reference used as the non-Triton fallback.
deepspeed/ops/triton_ops/swiglu_triton.py:210
↓ 4 callers
Function
_take_one_step
(engine, seed, *, checkpoint_activations)
tests/unit/v1/moe/test_autoep_fused_parity.py:168
↓ 4 callers
Function
_tiny_causal_lm
(seed)
tests/unit/v1/runtime/test_chunked_cross_entropy.py:299
↓ 4 callers
Function
_tp_consistent_input
(engine, *, seed=1234)
tests/unit/v1/moe/test_autoep_autotp_runtime.py:148
↓ 4 callers
Function
_tp_group
Return this rank's group: a real 2-rank group, a single-rank group, or None (no TP).
tests/unit/module_inject/test_tp_autograd_reduce.py:15
↓ 4 callers
Function
_tp_rank_and_size
This rank's index and the size of the tensor-parallel group of ``module``'s collective. Only the ranks that all-reduce a layer's output hold the
deepspeed/module_inject/segment_ki.py:51
↓ 4 callers
Function
_train
(model, config, steps=6, hidden_dim=64, seed=1234)
tests/unit/v1/ops/muon/test_per_head_muon_accelerator.py:228
↓ 4 callers
Function
_train_and_detach_masters
(engine)
tests/unit/checkpoint/test_fp32_master_only.py:73
↓ 4 callers
Function
_train_zero3_cpu_offload
3 steps of ZeRO-3 with the optimizer offloaded to the CPU (sub-groups much smaller than the model); ``patch(optimizer)`` runs after initialization
tests/unit/v1/zero/test_zero.py:2254
↓ 4 callers
Function
_undefined_rows
(global_max)
deepspeed/sequence/vocab_parallel_ops.py:193
↓ 4 callers
Method
_unflatten_partitioned_parameters
(self, sub_group_id)
deepspeed/runtime/zero/stage3.py:3041
↓ 4 callers
Method
_validate_autoep_folding_checkpoint_metadata
(state, *,
deepspeed/runtime/engine.py:4301
↓ 4 callers
Function
_validate_autotp_conversion_support
(universal_checkpoint_info)
deepspeed/checkpoint/ds_to_universal.py:1108
↓ 4 callers
Function
_verify_continuous_increase
(values)
tests/unit/runtime/test_lr_schedulers.py:29
↓ 4 callers
Function
_write_stage3_checkpoint
(ckpt_dir, shards_by_param, dp_degree, uc_info)
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:699
↓ 4 callers
Method
_writeback_swap_state
(self, sub_group_id, write_opt_state, write_gradients)
deepspeed/runtime/zero/stage3.py:3036
↓ 4 callers
Function
_zero12_fragment_path
(temp_dir, param_name, state_name, dp_rank)
deepspeed/checkpoint/autoep_universal.py:240
↓ 4 callers
Function
_zero3_storage
ZeRO-3 partitions of the flattened parameter, described in the parameter's own shape.
tests/unit/checkpoint/test_affine_transfer_plan.py:1047
↓ 4 callers
Function
accumulate
()
tests/unit/v1/ops/test_reflow_cpu_optimizers.py:414
↓ 4 callers
Method
add_data
(self, pp_index, tp_index, data)
deepspeed/checkpoint/reshape_meg_2d.py:22
↓ 4 callers
Function
add_postprocess
(graph: Graph, node: Node, fn: Callable[..., Any],
deepspeed/compile/fx.py:96
↓ 4 callers
Function
align_up
csrc/deepspeed4science/evoformer_attn/gemm_kernel_utils.h:127
↓ 4 callers
Function
all_gather_dp_groups
(groups_flat, partitioned_param_groups, dp_process_group, start_alignment_factor, all
deepspeed/runtime/utils.py:1094
↓ 4 callers
Function
all_to_all_quant_reduce
(tensors: List[Tensor], groups: {})
deepspeed/runtime/comm/coalesced_collectives.py:31
↓ 4 callers
Method
allocate
(self, num_elems, count, dtype)
deepspeed/runtime/swap_tensor/utils.py:201
↓ 4 callers
Method
allocate_all
(self, num_elems, dtype)
deepspeed/runtime/swap_tensor/utils.py:217
↓ 4 callers
Method
allreduce_gradients
(self, bucket_size=MEMORY_OPT_ALLREDUCE_SIZE)
deepspeed/runtime/engine.py:3245
↓ 4 callers
Function
apply_packed_expert_activation
:func:`apply_expert_activation` for ``gate`` and ``up`` packed side by side in ``[..., 2 * I]``. Forms without a packed kernel run on views of th
deepspeed/moe/ep_experts.py:204
↓ 4 callers
Method
apply_rotary_pos_emb
(mixed_query, key_layer, rotary_dim, offset, num_heads, rotate_half, rope_theta)
op_builder/supa/inference.py:299
↓ 4 callers
Function
args_from_dict
(tmpdir, config_dict)
tests/unit/simple_model.py:286
↓ 4 callers
Function
assert_dtype_supported
Reject dtypes DeepEP's kernels cannot dispatch.
deepspeed/module_inject/auto_ep_comm.py:64
↓ 4 callers
Method
autotuning_profile_model_info
(self)
deepspeed/runtime/engine.py:1627
↓ 4 callers
Method
batch_isend_irecv
(self, p2p_op_list)
deepspeed/comm/torch.py:565
↓ 4 callers
Method
bind
Adopt a prefill cache's linear-attention slot (by reference).
deepspeed/utils/static_cache.py:227
↓ 4 callers
Method
builder
(self)
op_builder/builder.py:479
↓ 4 callers
Method
cancel
csrc/includes/reflow_ready.h:71
↓ 4 callers
Function
check_injection
(model)
tests/unit/inference/test_inference.py:249
↓ 4 callers
Method
check_using_norm
(self, norm_group, reduce_overflow=True)
deepspeed/runtime/utils.py:260
↓ 4 callers
Method
clear
Clear experiment queues, does not reset self.experiment_count
deepspeed/autotuning/scheduler.py:247
↓ 4 callers
Method
clear
csrc/deepspeed4science/evoformer_attn/kernel_backward.h:1009
↓ 4 callers
Method
clear_grad_attribute
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1463
↓ 4 callers
Method
clear_lp_grads
(self, set_to_none=False)
deepspeed/runtime/bf16_optimizer.py:617
↓ 4 callers
Function
codegen_block_layout
Which equal-sized blocks of a codegen fused-QKV weight each rank holds, in shard order. ``_codegen_type_transpose`` views the weight as ``codegen
deepspeed/module_inject/fusedqkv_utils.py:304
↓ 4 callers
Function
compare_loss
(model_cls, enable, zero_stage, model_dtype,
tests/unit/v1/zero/test_zero_autocast.py:67
↓ 4 callers
Method
compile_autotp
Determines if AutoTP is set in deepcompile's passes attributes.
deepspeed/runtime/engine.py:1707
↓ 4 callers
Function
configure_vocab_parallel_loss
Install the causal-LM loss required by a no-gather vocabulary projection. Leave ``sp_group`` as ``None`` when running under DeepSpeed's Ulysses
deepspeed/sequence/cross_entropy.py:460
↓ 4 callers
Function
convert_zero_checkpoint_to_state_dict
Convert ZeRO 2 or 3 checkpoint into a consolidated ``state_dict`` file that can be loaded with ``torch.load(file)`` + ``load_state_dict()`` a
deepspeed/utils/zero_to_fp32.py:679
↓ 4 callers
Function
copy
(tensor, source, *args, **kwargs)
tests/unit/v1/moe/test_autoep_unit.py:2088
↓ 4 callers
Method
copy_supported
Whether step(bf16_copy=...) can write a bfloat16 copy of the updated parameters (needs AVX512, NEON or the scalar kernel).
deepspeed/ops/adam/cpu_adam.py:227
↓ 4 callers
Function
counting_newton_schulz
Counts every Newton-Schulz call, whichever kernel the config selects. Patched inside the test body rather than in a fixture: `DistributedTest` ru
tests/unit/runtime/zero/test_muon_without_zero_optimizer.py:27
↓ 4 callers
Function
cpu_siblings
(cpu)
tests/unit/v1/zero/test_reflow.py:100
↓ 4 callers
Function
create_deepspeed_engine
(model_class, zero_stage, seed=42, gradient_accumulation_steps=1, **model_kwargs)
tests/unit/v1/zero/test_zero_user_backward.py:126
↓ 4 callers
Function
create_file
(filename, num_bytes)
deepspeed/nvme/test_ds_aio_utils.py:77
↓ 4 callers
Function
create_filename
(folder, read_op, size, tid)
deepspeed/nvme/test_ds_aio_utils.py:72
↓ 4 callers
Function
create_page_locked_tensor
(num_elem, use_accelerator, aio_handle=None)
deepspeed/nvme/test_ds_aio_utils.py:85
↓ 4 callers
Function
cuFileGetErrorString
csrc/gds/deepspeed_gds_utils.h:76
↓ 4 callers
Method
cuda_capability_major
Compute-capability major of CUDA device 0, or ``None`` when it cannot be read without side effects. ``torch.cuda.get_device_propertie
op_builder/builder.py:648
↓ 4 callers
Method
curriculum_learning_enabled
(self)
deepspeed/runtime/engine.py:1527
↓ 4 callers
Function
debug_clear_module_and_param_names
()
deepspeed/utils/debug.py:66
↓ 4 callers
Function
debug_extract_module_and_param_names
(model)
deepspeed/utils/debug.py:71
↓ 4 callers
Function
debug_module2name
(module)
deepspeed/utils/debug.py:81
↓ 4 callers
Method
delete
(self, rel: str)
ci/test_tests_fetcher.py:102
↓ 4 callers
Method
dequantize
(self, tensor: Tensor, quant_scale: Tensor, quant_min: Tensor)
deepspeed/inference/quantization/utils.py:110
↓ 4 callers
Method
dequantized
Return a tensor containing the dequantized weights of this parameter.
deepspeed/linear/quantization.py:67
↓ 4 callers
Function
dp_index_to_str
(dp_index)
deepspeed/checkpoint/ds_to_universal.py:214
↓ 4 callers
Function
duration_to_string
(duration, units=None, precision=DEFAULT_PRECISION)
deepspeed/profiling/flops_profiler/profiler.py:1174
↓ 4 callers
Method
expert_affine_maps
Return the affine map of each live expert parameter (``w1``, ``w2``, ``w3``). Map ranks are EP-local ranks; translate them with ``dist.get_gl
deepspeed/module_inject/auto_ep_layer.py:858
↓ 4 callers
Function
extract_tensors
Separate objects in list/tuple into tensors and non-tensors and create a mapping to enable re-aggregation. The order of tensors and non-tenso
deepspeed/runtime/activation_checkpointing/checkpointing.py:315
↓ 4 callers
Function
f
(size)
deepspeed/compile/profilers/comm_profile.py:146
↓ 4 callers
Method
flatten_dense_tensors_aligned
(self, tensor_list, alignment, use_cpu_data=False, param_padding=None)
deepspeed/runtime/zero/stage_1_and_2.py:1505
↓ 4 callers
Method
flops_profiler_profile_step
(self)
deepspeed/runtime/engine.py:1580
↓ 4 callers
Method
forward
(self, x, y)
tests/unit/v1/zero/test_zero.py:599
↓ 4 callers
Method
forward
(self, *_args)
tests/unit/module_inject/test_auto_ep_comm.py:600
↓ 4 callers
Method
free
Return a list of blocks to the free pool. If a single invalid block is provided (i.e., one that is out of range of the allocator or i
deepspeed/inference/v2/ragged/blocked_allocator.py:74
↓ 4 callers
Method
from_meta
(cls, meta, local_part, group, device=get_accelerator().device_name())
deepspeed/runtime/utils.py:758
↓ 4 callers
Method
gen_output_name
(self, test_config, prefix, baseline_config=False)
tests/model/Megatron_GPT2/test_common.py:21
↓ 4 callers
Method
getSendBuf
csrc/includes/deepcompile.h:128
← previous
next →
1,201–1,300 of 15,767, ranked by callers