MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions10,922 in github.com/deepspeedai/DeepSpeed

↓ 3 callersMethodmemory_allocated
(self)
tests/unit/v1/compile/test_graph_profile.py:33
↓ 3 callersMethodmemory_cached
(self, device_index=None)
accelerator/hpu_accelerator.py:132
↓ 3 callersMethodmemory_stats
(self, device_index=None)
accelerator/hpu_accelerator.py:141
↓ 3 callersMethodmodule_state_dict
(self, destination=None, prefix="", keep_vars=False, exclude_frozen_parameters=False)
deepspeed/runtime/engine.py:3693
↓ 3 callersFunctionmoe_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 callersMethodnum_tensors
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:74
↓ 3 callersFunctionoffload_adam_states_sync
()
deepspeed/compile/passes/offload_adam_states.py:118
↓ 3 callersMethodoperand_B_ref
Returns a TensorRef to the B operand
csrc/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h:214
↓ 3 callersMethodoverlapping_partition_gradients_reduce_epilogue
(self)
deepspeed/runtime/zero/stage3.py:1352
↓ 3 callersFunctionprepare_tp_model
(hidden_dim, nlayers, linear_indices, allreduce_indices, group, return_global_copy=False)
tests/unit/model_parallelism/test_autotp_training.py:598
↓ 3 callersFunctionpreset_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 callersMethodprint_allocation
(self, resolution=200)
deepspeed/runtime/zero/contiguous_memory_allocator.py:121
↓ 3 callersMethodprint_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 callersFunctionpytest_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 callersFunctionqtorch_quantize
(input, exp_bits=4, man_bits=3, rounding="nearest", group_size=1024)
tests/unit/ops/fp_quantizer/test_fp_quant.py:23
↓ 3 callersMethodquantize
(self, tensor: Tensor)
deepspeed/inference/quantization/utils.py:51
↓ 3 callersMethodrandom
(self)
tests/unit/v1/compile/test_graph_profile.py:50
↓ 3 callersFunctionrandom_dataset
(total_samples, hidden_dim, device, dtype=preferred_dtype())
tests/unit/simple_model.py:268
↓ 3 callersMethodrange_pop
(self)
tests/unit/utils/test_nvtx.py:122
↓ 3 callersMethodrange_push
(self, msg)
tests/unit/utils/test_nvtx.py:118
↓ 3 callersMethodreenter_backward_if_needed
Re-enter backward context for subsequent phases in reentrant checkpointing.
deepspeed/runtime/base_optimizer.py:455
↓ 3 callersMethodregisterGatheredParam
csrc/includes/deepcompile.h:418
↓ 3 callersFunctionregister_grad_hook
(param, hook)
deepspeed/utils/torch.py:40
↓ 3 callersMethodrelease_memory
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:36
↓ 3 callersMethodrelease_swap_buffers
(self, parameter)
deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py:64
↓ 3 callersMethodrelease_workspace
(self)
deepspeed/ops/transformer/inference/op_binding/workspace.py:184
↓ 3 callersFunctionremove_random_ltd_state_dict
(state_dict)
deepspeed/runtime/data_pipeline/data_routing/helper.py:38
↓ 3 callersFunctionreplace_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 callersFunctionreplace_reduce_outputs_with_none
(graph: Graph)
deepspeed/compile/fx.py:38
↓ 3 callersFunctionreplace_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 callersMethodreset
csrc/includes/deepcompile.h:170
↓ 3 callersMethodreset_rss
(self)
accelerator/cpu_accelerator.py:147
↓ 3 callersMethodrestore_slots
(self, slots: list)
deepspeed/autotuning/scheduler.py:270
↓ 3 callersFunctionrun_forward
(ds_config, seq_len, atol=1e-2, verbose=False, test_bsz=None)
tests/unit/ops/accelerators/test_accelerator_forward.py:165
↓ 3 callersFunctionsafe_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 callersFunctionsafe_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 callersFunctionsafe_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 callersMethodscale_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 callersFunctionset_autotp_mode
Set the DEEPSPEED_AUTOTP_MODE based on the training flag
deepspeed/module_inject/layers.py:117
↓ 3 callersMethodset_dataiterator
Store an iterator to sample for training data.
deepspeed/runtime/pipe/engine.py:664
↓ 3 callersMethodset_module
(self, sd, module)
deepspeed/runtime/state_dict_factory.py:157
↓ 3 callersFunctionset_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 callersFunctionset_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 callersFunctionshould_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 callersMethodshould_refresh_expected_hook_count
Return True when count_used_parameters_in_backward() should be re-evaluated.
deepspeed/runtime/base_optimizer.py:451
↓ 3 callersMethodskip_autotune
(self)
deepspeed/ops/transformer/inference/triton/matmul_ext.py:224
↓ 3 callersFunctionskip_on_device
()
tests/unit/model_parallelism/test_tp_plan_e2e.py:15
↓ 3 callersFunctionsort_dtypes
(dtypes: List[torch.dtype])
deepspeed/runtime/torch_autocast.py:89
↓ 3 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
↓ 3 callersMethodstep
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 callersMethodstep
(self)
deepspeed/runtime/quantize.py:75
↓ 3 callersMethodstore_with_byte_offset
Store a fragment to memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:837
↓ 3 callersMethodsync_pread
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:319
↓ 3 callersMethodsynchronize_reads
(self)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:213
↓ 3 callersMethodto_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 callersFunctiontorch_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 callersMethodtp_parser
(model)
deepspeed/module_inject/auto_tp.py:288
↓ 3 callersMethodtrain
r
deepspeed/runtime/engine.py:2546
↓ 3 callersMethodtransform_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 callersMethodtransform_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 callersFunctiontrim_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 callersMethodunpack
(self, buffer, size, dtype)
deepspeed/runtime/comm/compressed.py:53
↓ 3 callersMethodunregisterGatheredParam
csrc/includes/deepcompile.h:423
↓ 3 callersMethodunscale_and_clip_grads
(self, sub_group_id, total_norm)
deepspeed/runtime/zero/stage3.py:2636
↓ 3 callersFunctionunsupported_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 callersMethodupdate
( self, key_states: torch.Tensor, value_states: torch.Tensor, *args, *
deepspeed/utils/static_cache.py:77
↓ 3 callersMethodupdate_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 callersMethodupdate_linear_policies
(self)
deepspeed/module_inject/auto_tp.py:534
↓ 3 callersMethodupdate_records
(self, space_name, exp, metric_val, num_exps)
deepspeed/autotuning/autotuner.py:708
↓ 3 callersMethoduse_node_local_storage
(self)
deepspeed/runtime/engine.py:1283
↓ 3 callersMethodvalidate_args
(self)
deepspeed/launcher/multinode_runner.py:274
↓ 3 callersMethodvisible_devices_envs
(self)
accelerator/hpu_accelerator.py:308
↓ 3 callersFunctionwrapFunc
(func, funcFlopCompute)
deepspeed/profiling/flops_profiler/profiler.py:875
↓ 3 callersFunctionwrapper
(*args, **kwargs)
deepspeed/runtime/compiler.py:68
↓ 3 callersFunctionwrapper
( w1: torch.Tensor, w2: torch.Tensor, w3: torch.Tensor, x: torch.Tensor,
deepspeed/moe/ep_kernels.py:313
↓ 3 callersMethodzenflow_cpu_optimizer_step
(self, now_state, scaled_global_grad_norm)
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:729
↓ 3 callersFunctionzero3_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 callersFunctionzero3_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 callersMethodzero_grad
Zero FP16 parameter grads.
deepspeed/runtime/zero/stage3.py:2138
↓ 3 callersMethodzero_nvme_offload_optimizer
(self)
deepspeed/runtime/engine.py:1198
↓ 3 callersMethodzero_offload_optimizer
(self)
deepspeed/runtime/engine.py:1125
↓ 3 callersMethodzero_use_cpu_optimizer
(self)
deepspeed/runtime/engine.py:1131
↓ 2 callersFunctionCreateLossScaler
(dtype, static_loss_scale, dynamic_scaling, dynamic_loss_args)
deepspeed/runtime/fp16/loss_scaler.py:305
↓ 2 callersFunctionDS4Sci_EvoformerAttention
(Q, K, V, biases)
deepspeed/ops/deepspeed4science/evoformer_attn.py:88
↓ 2 callersMethodForward
csrc/transformer/ds_transformer_cuda.cpp:154
↓ 2 callersMethodForwardWithBiasAdd
csrc/includes/gelu.h:25
↓ 2 callersMethodGeluCheckpoint
csrc/includes/ds_transformer_cuda.h:145
↓ 2 callersMethodGetHiddenSize
csrc/includes/ds_transformer_cuda.h:142
↓ 2 callersMethodGetIntermediateSize
csrc/includes/ds_transformer_cuda.h:139
↓ 2 callersMethodGetNumHeads
csrc/includes/softmax.h:57
↓ 2 callersMethodGetSeqLength
csrc/includes/softmax.h:59
↓ 2 callersMethodGetTimeInSeconds
csrc/includes/StopWatch.h:45
↓ 2 callersMethodIsTrainingMode
csrc/includes/ds_transformer_cuda.h:144
↓ 2 callersMethodRestart
csrc/includes/StopWatch.h:29
↓ 2 callersMethodSetIntermediateBuffers
csrc/transformer/ds_transformer_cuda.cpp:566
↓ 2 callersMethodSetSeqLength
csrc/transformer/ds_transformer_cuda.cpp:585
↓ 2 callersMethodSetWorkSpace
csrc/includes/context.h:76
↓ 2 callersMethodSoftmax
csrc/includes/softmax.h:38
↓ 2 callersMethodStop
csrc/includes/StopWatch.h:35
↓ 2 callersMethodUseMean
csrc/includes/normalize_layer.h:188
← previousnext →1,101–1,200 of 10,922, ranked by callers