MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions14,579 in github.com/deepspeedai/DeepSpeed

↓ 7 callersMethodfree
(self, buffers)
deepspeed/runtime/swap_tensor/utils.py:220
↓ 7 callersMethodgetSize
csrc/includes/deepcompile.h:144
↓ 7 callersMethodget_all_ranks_from_group
(self, group)
deepspeed/comm/ccl.py:166
↓ 7 callersFunctionget_comm_dtype
(param: torch.nn.Parameter)
deepspeed/runtime/torch_autocast.py:81
↓ 7 callersMethodget_dim
Return the number of processes along the given axis. For example: >>> X = ProcessTopology(axes=['x', 'y'], dims=[2,3])
deepspeed/runtime/pipe/topology.py:98
↓ 7 callersFunctionget_files_with_prefix
(all_files, prefix)
deepspeed/checkpoint/reshape_utils.py:18
↓ 7 callersMethodget_global_rank
(self, group, group_rank)
deepspeed/comm/torch.py:585
↓ 7 callersMethodget_mask
Gets the mask
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_access_iterator_residual_last.h:822
↓ 7 callersMethodget_mask
Gets the mask
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:808
↓ 7 callersMethodget_model_parallel_rank
(self)
deepspeed/runtime/engine.py:1484
↓ 7 callersFunctionget_norm_dtype
Gradient norms accumulate in fp64 for accuracy, except on devices without fp64 (e.g. MPS).
deepspeed/runtime/zero/utils.py:59
↓ 7 callersMethodget_rss
(self)
accelerator/cpu_accelerator.py:280
↓ 7 callersFunctionget_shard_endpoints
Given a dimension to shard with size dim_size, return the start and end indices of the slice that belong to the given rank. The typical
deepspeed/inference/v2/model_implementations/sharding/utils.py:13
↓ 7 callersMethodget_total_flops
Returns the total flops of the model. Args: as_string (bool, optional): whether to output the flops as string. Defaults to False.
deepspeed/profiling/flops_profiler/profiler.py:232
↓ 7 callersMethodhas_function
Test for existence of a function within a tuple of libraries. This is used as a smoke test to check whether a certain library is ava
op_builder/builder.py:334
↓ 7 callersMethodinclude_paths
(self)
op_builder/evoformer_attn.py:196
↓ 7 callersFunctioninference_logger
Create the inference logger. NOTE: Logging is not cost free. On a 3960X, there is a cost of about 6 us per call to a no-op logger, so this sh
deepspeed/inference/v2/logging.py:13
↓ 7 callersFunctioninitialize
Initialize the DeepSpeed Engine. Arguments: args: an object containing local_rank and deepspeed_config fields. This is option
deepspeed/__init__.py:433
↓ 7 callersMethodinstalled_rocm_version
()
op_builder/builder.py:238
↓ 7 callersMethodirecv
(self, tensor, src=None, group=None, tag=0)
deepspeed/comm/torch.py:528
↓ 7 callersMethodis_compatible
(self, verbose=False)
op_builder/gds.py:38
↓ 7 callersFunctionis_compiling
()
deepspeed/runtime/compiler.py:100
↓ 7 callersFunctionis_optimized_parameter
Whether an optimizer wrapper should own ``param``: trainable, with at least one element. Frozen parameters have always been left out of the optim
deepspeed/runtime/utils.py:890
↓ 7 callersFunctionis_triton_available
Return True if Triton is importable and its kernels can be used.
deepspeed/ops/triton_ops/_triton.py:24
↓ 7 callersFunctionkeep_in_fp32_pattern
Compiled pattern for the tensor names of ``module`` to keep in fp32, or None when there are none. ``dtype`` is the training dtype. Under fp32 tra
deepspeed/runtime/keep_in_fp32.py:39
↓ 7 callersMethodnew_cpu_locked_tensor
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:403
↓ 7 callersFunctionparse_args
(args=None)
deepspeed/launcher/runner.py:46
↓ 7 callersFunctionpermute_by_local_expert
Reorder tokens so they are grouped contiguously by local expert ID. Uses TorchTitan's Triton kernel for permutation index generation. ``local
deepspeed/module_inject/auto_ep_layer.py:373
↓ 7 callersMethodpin_empty
(self, example, shape)
deepspeed/utils/pin_memory.py:48
↓ 7 callersMethodpin_empty_like
(self, tensor, device="cpu", dtype=None)
accelerator/abstract_accelerator.py:365
↓ 7 callersFunctionprint_rank_0
(message)
deepspeed/compile/passes/offload_activation.py:95
↓ 7 callersMethodrandom_ltd_enabled
(self)
deepspeed/runtime/engine.py:1452
↓ 7 callersMethodreset
(self)
deepspeed/runtime/swap_tensor/utils.py:43
↓ 7 callersFunctionresolve_per_head_muon_after_sharding
Re-derive head counts from the shapes the parameters actually have. `set_optimizer_flags` runs before the engine partitions the model, so the cou
deepspeed/__init__.py:391
↓ 7 callersFunctionrun_model_step
(model, gradient_list)
tests/unit/runtime/half_precision/test_dynamic_loss_scale.py:20
↓ 7 callersMethodrun_partition_activations_test
(self, test_config, r_tol)
tests/model/Megatron_GPT2/run_func_test.py:440
↓ 7 callersFunctionsafe_set_full_grad
Update the partitioned gradient of a low-precision (e.g., fp16) parameter. To avoid precision issues, the update value should have th
deepspeed/utils/tensor_fragment.py:238
↓ 7 callersFunctionset_autotp_mode
Set the DEEPSPEED_AUTOTP_MODE based on the training flag
deepspeed/module_inject/layers.py:181
↓ 7 callersMethodset_mask
Sets the predicate mask, overriding value stored in predicate iterator
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_access_iterator_residual_last.h:818
↓ 7 callersMethodset_mask
Sets the predicate mask, overriding value stored in predicate iterator
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:804
↓ 7 callersMethodset_write_position
(self, pos: torch.Tensor)
deepspeed/utils/static_cache.py:53
↓ 7 callersMethodset_write_position
Set the write position shared by all layers. Must be called before each graph replay. A scalar tensor preserves the fixed-batch path;
deepspeed/utils/static_cache.py:246
↓ 7 callersFunctionsetup_models_and_engines
(model_class, zero_stage, seed=42, lr=1e-3, gradient_accumulation_steps=1, **model_kwargs)
tests/unit/v1/zero/test_zero_user_backward.py:141
↓ 7 callersFunctionsharded_intermediate_dim
Utility method for getting the size of the intermediate dimension of a sharded MLP. Args: intermediate_size (int): The size of the i
deepspeed/inference/v2/model_implementations/sharding/mlp.py:65
↓ 7 callersFunctionshared_qk_value_head_ids
Which value heads a rank holds under shared-QK attention. A rank takes the value head paired with each of its query heads, then the matching
deepspeed/module_inject/fusedqkv_utils.py:218
↓ 7 callersMethodsimd_width
(self)
op_builder/builder.py:529
↓ 7 callersFunctionsingle_all_to_all
(input, scatter_idx, gather_idx, batch_dim_i
deepspeed/sequence/layer.py:270
↓ 7 callersFunctionskip_on_device
()
tests/unit/v1/autotp/test_tp_plan_real_models.py:17
↓ 7 callersMethodstart_profile
Starts profiling. Extra attributes are added recursively to all the modules and the profiled torch.nn.functionals are monkey patched.
deepspeed/profiling/flops_profiler/profiler.py:74
↓ 7 callersMethodstrided_copy
(self, dst: Optional[torch.Tensor], src: Optional[torch.Tensor],
deepspeed/module_inject/auto_tp.py:56
↓ 7 callersFunctionsub_param_map
A parameter that is several sub-parameters concatenated, each split across ranks. Fused QKV is the motivating case: the full parameter is Q then
deepspeed/checkpoint/affine.py:626
↓ 7 callersFunctionswap_in_tensors
(swap_handle, tensor_buffers, swap_paths)
deepspeed/runtime/swap_tensor/utils.py:19
↓ 7 callersFunctionswap_out_tensors
(swap_handle, tensor_buffers, swap_paths)
deepspeed/runtime/swap_tensor/utils.py:24
↓ 7 callersFunctionunpermute_by_local_expert
Reverse permute_by_local_expert: restore original token order and strip padding. Args: expert_output: [N_padded, H] from expert computati
deepspeed/module_inject/auto_ep_layer.py:441
↓ 7 callersFunctionvalidate_graph_capture_support
Return the reason graph capture cannot be used, or ``None`` if it can.
deepspeed/runtime/hybrid_engine_graph.py:198
↓ 7 callersFunctionzero3_linear_wrap
(input, weight, bias=None)
deepspeed/runtime/zero/linear.py:158
↓ 7 callersMethodzero_optimization_partition_gradients
(self)
deepspeed/runtime/engine.py:1649
↓ 6 callersMethodLongTensor
(self)
accelerator/hpu_accelerator.py:231
↓ 6 callersFunctionParamList
Helper to create a subclass of ParametrizedList with the desired `count_attr`. In this manner, we can annotate the type of a Parameter depen
deepspeed/inference/v2/model_implementations/parameter_base.py:240
↓ 6 callersMethod__init__
(self, start, numel)
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:40
↓ 6 callersMethod__init__
(self, tp_world_size=1)
tests/unit/v1/autotp/test_autotp_training.py:110
↓ 6 callersMethod__init__
(self, hidden=64, q_heads=8, kv_heads=2, head_dim=8, fused=False)
tests/unit/runtime/zero/test_per_head_muon.py:151
↓ 6 callersFunction_apply_plan
Execute a plan over plain buffers. Test scaffolding, never a production path.
tests/unit/checkpoint/test_affine_transfer_plan.py:45
↓ 6 callersFunction_as_list
(tensors)
deepspeed/runtime/pipe/dualpipev.py:26
↓ 6 callersMethod_assert_compiled_if_deferred
Fail loudly if a deferred layer is executed outside a compiled region. defer_collectives_to_compiler switches this layer's collectives off be
deepspeed/module_inject/layers.py:426
↓ 6 callersFunction_blocked_flash_testing_helper
Helper function for testing blocked flash attention. Used to enable parametrize to only set up a subset of parameters before being passed to
tests/unit/inference/v2/kernels/ragged_ops/test_blocked_flash.py:40
↓ 6 callersFunction_build_legacy_lm_head_autotp
(model, training_mode=False)
tests/unit/module_inject/test_tp_partition_config_path.py:201
↓ 6 callersFunction_build_row_output_head_autotp
(model, head="lm_head", training_mode=False, mp_size=1, embedding_spec=False)
tests/unit/module_inject/test_tp_partition_config_path.py:217
↓ 6 callersMethod_build_tied_model
(self, seed, vocab_size, model_type="llama", padding_idx=None, tie_word_embeddings=True)
tests/unit/v1/autotp/test_autotp_training.py:525
↓ 6 callersMethod_cast_module_mixed_precision
Cast params to param_dtype; cast buffers only when buffer_dtype is set. Buffers whose names match keep_pattern stay in fp32, and so do matchi
deepspeed/runtime/engine.py:1885
↓ 6 callersFunction_check_storage
(affine_map, full, stored)
tests/unit/checkpoint/test_zero_affine.py:111
↓ 6 callersFunction_clamped_eager
The two forms as the model code writes them (GptOssExperts / DeepseekV4Experts._apply_gate).
tests/unit/v1/ops/triton_ops/test_swiglu_triton.py:221
↓ 6 callersFunction_conform_rows
Trim or zero-extend ``tensor`` to ``shape``'s row count. DeepEP returns whole buffers sized for the worst case, but autograd checks a gradien
deepspeed/module_inject/auto_ep_comm.py:443
↓ 6 callersMethod_continuous_next_tokens
(cls, logits, request_ids, request_by_id, responses, module, select_next_tokens)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1186
↓ 6 callersFunction_contradicting_single_rank_pg_error
Detect the silent single-rank fallback described in #8084. When a multi-process launcher (``deepspeed``, ``torchrun``, accelerate, ...) sets ``WO
deepspeed/runtime/zero/partition_parameters.py:912
↓ 6 callersMethod_deepep_route
Dispatch, run the experts, and combine through DeepEP. ``tokens`` is [T, H] before top-k expansion. DeepEP replicates each token to t
deepspeed/module_inject/auto_ep_layer.py:943
↓ 6 callersFunction_ensure_dc_ops
()
tests/unit/v1/compile/test_offload_opt_states.py:40
↓ 6 callersFunction_ensure_divisibility
Ensure that numerator is divisible by the denominator.
deepspeed/utils/groups.py:73
↓ 6 callersFunction_full
Identical markers that stay distinct after fp16 or bf16 conversion.
tests/unit/checkpoint/test_affine_transfer_executor.py:37
↓ 6 callersFunction_full
(rows, cols, seed)
tests/unit/checkpoint/test_affine_transfer_plan.py:71
↓ 6 callersMethod_get_param_swap_info
(self, parameter)
deepspeed/runtime/swap_tensor/optimizer_utils.py:536
↓ 6 callersMethod_get_zero_param_shapes
Returns a dict of name to shape mapping, only for the flattened fp32 weights saved by the optimizer. the names are exactly as in state_dict. T
deepspeed/runtime/engine.py:5551
↓ 6 callersFunction_has_moments
(engine)
tests/unit/checkpoint/test_fp32_master_only.py:86
↓ 6 callersMethod_is_vocab_parallel_lm_head
(self, child, name)
deepspeed/module_inject/auto_tp.py:697
↓ 6 callersFunction_load_consolidated
(output_dir, param_name, state_name='fp32')
tests/unit/checkpoint/test_autoep_affine_universal.py:38
↓ 6 callersFunction_log_softmax
(logits, global_max, log_sum_exp)
deepspeed/sequence/vocab_parallel_ops.py:172
↓ 6 callersMethod_log_timers
(self, name_list, force=False)
deepspeed/runtime/swap_tensor/optimizer_utils.py:553
↓ 6 callersMethod_maybe_reduce_autoep_folding_tp_gradient
(self, param, grad)
deepspeed/runtime/zero/stage_1_and_2.py:1262
↓ 6 callersFunction_mock_accelerator
Dress a patched accelerator as graph-capable or not, independent of the real device.
tests/unit/hybrid_engine/test_he_graph.py:54
↓ 6 callersMethod_prepare_sub_group
(self, sub_group_id, timer_names)
deepspeed/runtime/zero/stage3.py:2780
↓ 6 callersMethod_reduce_op
Helper function. If the op provided is not a torch.dist.ReduceOp, convert it and return
deepspeed/comm/torch.py:598
↓ 6 callersFunction_ref_swiglu
(gate, up)
tests/unit/v1/ops/triton_ops/test_swiglu_triton.py:51
↓ 6 callersFunction_register_zero3_and_prefetch
()
tests/unit/compile/test_pass_contract.py:47
↓ 6 callersMethod_release_sub_group
(self, sub_group_id, timer_names)
deepspeed/runtime/zero/stage3.py:2809
↓ 6 callersMethod_replace_last_linear_module
(self, r_module)
deepspeed/module_inject/auto_tp.py:1127
↓ 6 callersFunction_resolve_autoep_partition
(current_param, ckpt_dict, full_hp_param, ep_rank)
deepspeed/checkpoint/universal_checkpoint.py:39
↓ 6 callersFunction_save_checkpoint
(file_path, chkpt_sd)
deepspeed/checkpoint/ds_to_universal.py:126
↓ 6 callersFunction_scheduled_names
(graph, scheduler_budget=None)
tests/unit/v1/compile/test_list_schedule.py:227
↓ 6 callersMethod_should_materialize_tp_partition
(self)
deepspeed/module_inject/layers.py:566
↓ 6 callersFunction_tiny_qwen3
()
tests/unit/v1/ops/triton_ops/test_fused_rotary_pos_emb.py:230
← previousnext →601–700 of 14,579, ranked by callers