Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ functions
Functions
10,922 in github.com/deepspeedai/DeepSpeed
⨍
Functions
10,922
◇
Types & classes
1,850
↳
Endpoints
34
↓ 3 callers
Method
memory_allocated
(self)
tests/unit/v1/compile/test_graph_profile.py:33
↓ 3 callers
Method
memory_cached
(self, device_index=None)
accelerator/hpu_accelerator.py:132
↓ 3 callers
Method
memory_stats
(self, device_index=None)
accelerator/hpu_accelerator.py:141
↓ 3 callers
Method
module_state_dict
(self, destination=None, prefix="", keep_vars=False, exclude_frozen_parameters=False)
deepspeed/runtime/engine.py:3693
↓ 3 callers
Function
moe_test_helper
Helper function for validating the GEMM kernel for a single expert.
tests/unit/inference/v2/kernels/cutlass_ops/test_moe_gemm.py:48
↓ 3 callers
Method
num_tensors
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:74
↓ 3 callers
Function
offload_adam_states_sync
()
deepspeed/compile/passes/offload_adam_states.py:118
↓ 3 callers
Method
operand_B_ref
Returns a TensorRef to the B operand
csrc/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h:214
↓ 3 callers
Method
overlapping_partition_gradients_reduce_epilogue
(self)
deepspeed/runtime/zero/stage3.py:1352
↓ 3 callers
Function
prepare_tp_model
(hidden_dim, nlayers, linear_indices, allreduce_indices, group, return_global_copy=False)
tests/unit/model_parallelism/test_autotp_training.py:598
↓ 3 callers
Function
preset_name_for_hf_model_type
Return the AutoEP preset name for a supported HF model_type.
deepspeed/module_inject/auto_ep_presets/registry.py:84
↓ 3 callers
Method
print_allocation
(self, resolution=200)
deepspeed/runtime/zero/contiguous_memory_allocator.py:121
↓ 3 callers
Method
print_model_profile
Prints the model graph with the measured profile attached to each module. Args: profile_step (int, optional): The global training
deepspeed/profiling/flops_profiler/profiler.py:286
↓ 3 callers
Function
pytest_hack
This is an ugly hack to get the unittest suites to play nicely with pytest. Otherwise failed tests are not reported by pytest for some reason.
tests/model/run_sanity_check.py:20
↓ 3 callers
Function
qtorch_quantize
(input, exp_bits=4, man_bits=3, rounding="nearest", group_size=1024)
tests/unit/ops/fp_quantizer/test_fp_quant.py:23
↓ 3 callers
Method
quantize
(self, tensor: Tensor)
deepspeed/inference/quantization/utils.py:51
↓ 3 callers
Method
random
(self)
tests/unit/v1/compile/test_graph_profile.py:50
↓ 3 callers
Function
random_dataset
(total_samples, hidden_dim, device, dtype=preferred_dtype())
tests/unit/simple_model.py:268
↓ 3 callers
Method
range_pop
(self)
tests/unit/utils/test_nvtx.py:122
↓ 3 callers
Method
range_push
(self, msg)
tests/unit/utils/test_nvtx.py:118
↓ 3 callers
Method
reenter_backward_if_needed
Re-enter backward context for subsequent phases in reentrant checkpointing.
deepspeed/runtime/base_optimizer.py:455
↓ 3 callers
Method
registerGatheredParam
csrc/includes/deepcompile.h:418
↓ 3 callers
Function
register_grad_hook
(param, hook)
deepspeed/utils/torch.py:40
↓ 3 callers
Method
release_memory
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:36
↓ 3 callers
Method
release_swap_buffers
(self, parameter)
deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py:64
↓ 3 callers
Method
release_workspace
(self)
deepspeed/ops/transformer/inference/op_binding/workspace.py:184
↓ 3 callers
Function
remove_random_ltd_state_dict
(state_dict)
deepspeed/runtime/data_pipeline/data_routing/helper.py:38
↓ 3 callers
Function
replace_dict
Replaces values in dict d with values in dict u. Args: d (dict): the target dict to overwrite u (dict): the dict containing the v
deepspeed/autotuning/utils.py:110
↓ 3 callers
Function
replace_reduce_outputs_with_none
(graph: Graph)
deepspeed/compile/fx.py:38
↓ 3 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:189
↓ 3 callers
Method
reset
csrc/includes/deepcompile.h:170
↓ 3 callers
Method
reset_rss
(self)
accelerator/cpu_accelerator.py:147
↓ 3 callers
Method
restore_slots
(self, slots: list)
deepspeed/autotuning/scheduler.py:270
↓ 3 callers
Function
run_forward
(ds_config, seq_len, atol=1e-2, verbose=False, test_bsz=None)
tests/unit/ops/accelerators/test_accelerator_forward.py:165
↓ 3 callers
Function
safe_get_local_fp32_param
Get the local partition of a ZeRO-3 partitioned parameter in fp32 precision. Args: param (``torch.nn.Parameter``): A model parame
deepspeed/utils/tensor_fragment.py:284
↓ 3 callers
Function
safe_get_local_grad
Get the local gradient partition of a ZeRO-3 partitioned parameter. The return data type is that used for gradient accumulation. This
deepspeed/utils/tensor_fragment.py:254
↓ 3 callers
Function
safe_get_local_optimizer_state
Get the local optimizer state partition of ZeRO-3 partitioned parameter in fp32 precision. Args: param (``torch.nn.Parameter``):
deepspeed/utils/tensor_fragment.py:297
↓ 3 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:151
↓ 3 callers
Function
set_autotp_mode
Set the DEEPSPEED_AUTOTP_MODE based on the training flag
deepspeed/module_inject/layers.py:117
↓ 3 callers
Method
set_dataiterator
Store an iterator to sample for training data.
deepspeed/runtime/pipe/engine.py:664
↓ 3 callers
Method
set_module
(self, sd, module)
deepspeed/runtime/state_dict_factory.py:157
↓ 3 callers
Function
set_z3_leaf_modules_by_name
Sets a leaf flag for modules referenced by their names in ``model.named_modules()``. Args: model (torch.nn.Module): The model cont
deepspeed/utils/z3_leaf_module.py:89
↓ 3 callers
Function
set_z3_leaf_modules_by_suffix
Sets a leaf flag for modules referenced by suffixes of ``model.named_modules()`` names.
deepspeed/utils/z3_leaf_module.py:120
↓ 3 callers
Function
should_log_le
Args: max_log_level_str: maximum log level as a string Returns ``True`` if the current log_level is less or equal to the specified l
deepspeed/utils/logging.py:215
↓ 3 callers
Method
should_refresh_expected_hook_count
Return True when count_used_parameters_in_backward() should be re-evaluated.
deepspeed/runtime/base_optimizer.py:451
↓ 3 callers
Method
skip_autotune
(self)
deepspeed/ops/transformer/inference/triton/matmul_ext.py:224
↓ 3 callers
Function
skip_on_device
()
tests/unit/model_parallelism/test_tp_plan_e2e.py:15
↓ 3 callers
Function
sort_dtypes
(dtypes: List[torch.dtype])
deepspeed/runtime/torch_autocast.py:89
↓ 3 callers
Method
start_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
↓ 3 callers
Method
step
Update the model parameters. .. note:: This method will be called internally by ZeRO-Offload. DeepSpeed users should
deepspeed/ops/adagrad/cpu_adagrad.py:37
↓ 3 callers
Method
step
(self)
deepspeed/runtime/quantize.py:75
↓ 3 callers
Method
store_with_byte_offset
Store a fragment to memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:837
↓ 3 callers
Method
sync_pread
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:319
↓ 3 callers
Method
synchronize_reads
(self)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:213
↓ 3 callers
Method
to_meta
Returns a torch.LongTensor that encodes partitioning information. Can be used along with ``data()`` to serialize a ``PartitionedTensor`` for
deepspeed/runtime/utils.py:734
↓ 3 callers
Function
torch_assert_equal
Compare two tensors or non-tensor numbers for their equality. Add msg=blah to add an additional comment to when assert fails.
tests/unit/util.py:129
↓ 3 callers
Method
tp_parser
(model)
deepspeed/module_inject/auto_tp.py:288
↓ 3 callers
Method
train
r
deepspeed/runtime/engine.py:2546
↓ 3 callers
Method
transform_gate_param
Perform any necessary transformations of the gate parameter. Args: param (torch.Tensor): gate_w (shape: [num_experts, mo
deepspeed/inference/v2/modules/interfaces/moe_base.py:35
↓ 3 callers
Method
transform_mlp_1_param
Shards the first MLP parameter and passes it to the underlying implementation for any necessary transformations. Args:
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:454
↓ 3 callers
Function
trim_mean
Compute the trimmed mean of a list of numbers. Args: data (list): List of numbers. trim_percent (float): Percentage of data to tr
deepspeed/utils/timer.py:296
↓ 3 callers
Method
unpack
(self, buffer, size, dtype)
deepspeed/runtime/comm/compressed.py:53
↓ 3 callers
Method
unregisterGatheredParam
csrc/includes/deepcompile.h:423
↓ 3 callers
Method
unscale_and_clip_grads
(self, sub_group_id, total_norm)
deepspeed/runtime/zero/stage3.py:2636
↓ 3 callers
Function
unsupported_preset_for_hf_model_type
Return a preset carrying an actionable diagnostic for an unsupported HF model_type.
deepspeed/module_inject/auto_ep_presets/registry.py:92
↓ 3 callers
Method
update
( self, key_states: torch.Tensor, value_states: torch.Tensor, *args, *
deepspeed/utils/static_cache.py:77
↓ 3 callers
Method
update_hook_state_and_maybe_run_epilogue
Update hook state after a gradient hook fires and run epilogue if all hooks have fired.
deepspeed/runtime/base_optimizer.py:459
↓ 3 callers
Method
update_linear_policies
(self)
deepspeed/module_inject/auto_tp.py:534
↓ 3 callers
Method
update_records
(self, space_name, exp, metric_val, num_exps)
deepspeed/autotuning/autotuner.py:708
↓ 3 callers
Method
use_node_local_storage
(self)
deepspeed/runtime/engine.py:1283
↓ 3 callers
Method
validate_args
(self)
deepspeed/launcher/multinode_runner.py:274
↓ 3 callers
Method
visible_devices_envs
(self)
accelerator/hpu_accelerator.py:308
↓ 3 callers
Function
wrapFunc
(func, funcFlopCompute)
deepspeed/profiling/flops_profiler/profiler.py:875
↓ 3 callers
Function
wrapper
(*args, **kwargs)
deepspeed/runtime/compiler.py:68
↓ 3 callers
Function
wrapper
( w1: torch.Tensor, w2: torch.Tensor, w3: torch.Tensor, x: torch.Tensor,
deepspeed/moe/ep_kernels.py:313
↓ 3 callers
Method
zenflow_cpu_optimizer_step
(self, now_state, scaled_global_grad_norm)
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:729
↓ 3 callers
Function
zero3_post_init_quantization_test_helper
(cpu_offload: bool, nvme_offload: bool, bits: int, nvme_path=None)
tests/unit/inference/quantization/test_intX_quantization.py:57
↓ 3 callers
Function
zero3_quantized_initialization_test_helper
(cpu_offload: bool, nvme_offload: bool, bits: int, nvme_path=None)
tests/unit/inference/quantization/test_intX_quantization.py:177
↓ 3 callers
Method
zero_grad
Zero FP16 parameter grads.
deepspeed/runtime/zero/stage3.py:2138
↓ 3 callers
Method
zero_nvme_offload_optimizer
(self)
deepspeed/runtime/engine.py:1198
↓ 3 callers
Method
zero_offload_optimizer
(self)
deepspeed/runtime/engine.py:1125
↓ 3 callers
Method
zero_use_cpu_optimizer
(self)
deepspeed/runtime/engine.py:1131
↓ 2 callers
Function
CreateLossScaler
(dtype, static_loss_scale, dynamic_scaling, dynamic_loss_args)
deepspeed/runtime/fp16/loss_scaler.py:305
↓ 2 callers
Function
DS4Sci_EvoformerAttention
(Q, K, V, biases)
deepspeed/ops/deepspeed4science/evoformer_attn.py:88
↓ 2 callers
Method
Forward
csrc/transformer/ds_transformer_cuda.cpp:154
↓ 2 callers
Method
ForwardWithBiasAdd
csrc/includes/gelu.h:25
↓ 2 callers
Method
GeluCheckpoint
csrc/includes/ds_transformer_cuda.h:145
↓ 2 callers
Method
GetHiddenSize
csrc/includes/ds_transformer_cuda.h:142
↓ 2 callers
Method
GetIntermediateSize
csrc/includes/ds_transformer_cuda.h:139
↓ 2 callers
Method
GetNumHeads
csrc/includes/softmax.h:57
↓ 2 callers
Method
GetSeqLength
csrc/includes/softmax.h:59
↓ 2 callers
Method
GetTimeInSeconds
csrc/includes/StopWatch.h:45
↓ 2 callers
Method
IsTrainingMode
csrc/includes/ds_transformer_cuda.h:144
↓ 2 callers
Method
Restart
csrc/includes/StopWatch.h:29
↓ 2 callers
Method
SetIntermediateBuffers
csrc/transformer/ds_transformer_cuda.cpp:566
↓ 2 callers
Method
SetSeqLength
csrc/transformer/ds_transformer_cuda.cpp:585
↓ 2 callers
Method
SetWorkSpace
csrc/includes/context.h:76
↓ 2 callers
Method
Softmax
csrc/includes/softmax.h:38
↓ 2 callers
Method
Stop
csrc/includes/StopWatch.h:35
↓ 2 callers
Method
UseMean
csrc/includes/normalize_layer.h:188
← previous
next →
1,101–1,200 of 10,922, ranked by callers