MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions12,000 in github.com/deepspeedai/DeepSpeed

↓ 9 callersFunction_flatten_dense_tensors
Flatten dense tensors into a contiguous 1D buffer. Assume tensors are of same dense type. Since inputs are dense, the resulting tensor will b
deepspeed/runtime/zenflow/zenflow_utils.py:19
↓ 9 callersMethod_freeze_partition_sizes
(self, total_size)
deepspeed/module_inject/layers.py:1091
↓ 9 callersFunction_initialize_zero3
(model, *, gradient_accumulation_steps=1, dtype=torch.float32, module_granularity_threshold=0)
tests/unit/v1/zero/test_zero_activation_checkpoint_lifecycle.py:88
↓ 9 callersFunction_runtime_config
(**kwargs)
tests/unit/v1/moe/test_autoep_unit.py:64
↓ 9 callersFunction_synchronize
()
tests/unit/v1/zero/test_zero_activation_checkpoint_lifecycle.py:99
↓ 9 callersMethod_validate_buffer_index
(self, index)
deepspeed/io/double_io_buffer.py:75
↓ 9 callersFunction_write_tp_states
(base_dir, param_name, tp_idx, fp32_tensor)
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:396
↓ 9 callersMethodbatch_metadata_buffer
Buffer associated with the batch metadata tensor that can be populated in preparation for passing a new input to the device.
deepspeed/inference/v2/ragged/ragged_wrapper.py:230
↓ 9 callersFunctionbwc_tensor_model_parallel_rank
Backwards-compatible way of querying the tensor model parallel rank from an ``mpu`` object. *Tensor* model parallelism means that tensors are
deepspeed/utils/bwc.py:7
↓ 9 callersMethodcapture_to_graph
(self, graph, pool=None, stream=None)
accelerator/hpu_accelerator.py:198
↓ 9 callersFunctionclose_mmap_dataset_builder
(builder, fname)
deepspeed/runtime/data_pipeline/data_sampling/utils.py:49
↓ 9 callersMethodcompressed_allreduce
(self, buffer_m: torch.tensor, worker_error, server_error, local_rank)
deepspeed/runtime/comm/mpi.py:133
↓ 9 callersMethodcreate_graph
(self)
accelerator/hpu_accelerator.py:195
↓ 9 callersMethoddeepspeed_src_path
(self, code_path)
op_builder/builder.py:532
↓ 9 callersMethoddequantize
(self, quantized_param, scale, dtype=None)
deepspeed/runtime/zero/partition_parameters.py:885
↓ 9 callersMethoddump
csrc/aio/common/deepspeed_aio_types.cpp:41
↓ 9 callersMethodencode
(self, *inputs, **kwargs)
deepspeed/model_implementations/diffusers/vae.py:99
↓ 9 callersMethodep_parser
Traverse model and detect MoE layers. Returns list of MoELayerSpec.
deepspeed/module_inject/auto_ep.py:283
↓ 9 callersFunctionexpected_folding_group_tables
Derive TP, dense-DP, EP, and EDP rank tables without process groups.
deepspeed/module_inject/auto_ep_folding.py:130
↓ 9 callersMethodgenerate
(self, request: RolloutRequest, sampling: SamplingConfig)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:50
↓ 9 callersFunctionget_active_native_pinned_memory
()
deepspeed/utils/pin_memory.py:165
↓ 9 callersMethodget_alignment
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:82
↓ 9 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
↓ 9 callersFunctionget_local_heads
Helper to determine the number of local heads of a given shard. Args: shard_rank (int): The rank of the shard. num_shards (i
deepspeed/inference/v2/model_implementations/sharding/attn.py:9
↓ 9 callersMethodget_lora_params
Return a list of all parameters that would have LoRA for the module.
deepspeed/module_inject/containers/features/hybrid_engine.py:176
↓ 9 callersMethodget_param_coordinator
(self)
deepspeed/runtime/zero/parameter_offload.py:246
↓ 9 callersMethodget_tensor_model_parallel_world_size
(self)
deepspeed/runtime/pipe/topology.py:468
↓ 9 callersMethodgradient_clipping
(self)
deepspeed/runtime/engine.py:1550
↓ 9 callersMethodinflight_seq_descriptors
Buffer associated with the metadata of each sequence in the ragged batch. If the device Tensor is requested, the Tensor is truncated
deepspeed/inference/v2/ragged/ragged_wrapper.py:250
↓ 9 callersMethodinstalled_rocm_version
()
op_builder/builder.py:241
↓ 9 callersMethodis_gradient_accumulation_boundary
Query whether the current micro-batch is at the boundary of gradient accumulation, and thus will trigger gradient reductions and
deepspeed/runtime/engine.py:3373
↓ 9 callersMethodis_last_stage
True if this process is in the last stage in the pipeline.
deepspeed/runtime/pipe/engine.py:537
↓ 9 callersFunctionmake_param
(Opt, shape, selected_indices=None)
tests/unit/ops/adam/test_zf_torch_adam.py:13
↓ 9 callersMethodmark
(self, tensor: torch.Tensor)
deepspeed/runtime/activation_checkpointing/offload_activations.py:420
↓ 9 callersFunctionpartition_data
(data_list, num_partitions)
deepspeed/checkpoint/reshape_utils.py:68
↓ 9 callersMethodquery
Determine the number of tokens and KV blocks to reserve for a given request. Given a UID (this UID may not be recognized by the model
deepspeed/inference/v2/engine_v2.py:158
↓ 9 callersMethodreplay_graph
(self, graph)
accelerator/hpu_accelerator.py:201
↓ 9 callersMethodreset
(self)
tests/unit/compile/test_backend.py:44
↓ 9 callersMethodscale
csrc/aio/common/deepspeed_aio_types.cpp:53
↓ 9 callersFunctionsequence_dataloader
(model, total_samples, hidden_dim, device, seq_len: int = 32, dtype=preferred_dtype())
tests/unit/simple_model.py:282
↓ 9 callersMethodset_residual_tile
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:796
↓ 9 callersMethodset_rng_state
(self, new_state, device_index=None)
accelerator/hpu_accelerator.py:82
↓ 9 callersFunctionsetup_serial_env
()
tests/unit/runtime/zero/utils.py:10
↓ 9 callersFunctionshard_qkv_param
Utility method for sharding a QKV parameter. Both biases and weights are supported. It is assumed that the layout of the parameter is such th
deepspeed/inference/v2/model_implementations/sharding/qkv.py:14
↓ 9 callersMethodunpin_device_tensor
csrc/gds/py_lib/deepspeed_py_gds_handle.cpp:98
↓ 8 callersMethod__init__
(self)
tests/unit/compile/test_tp_compile.py:32
↓ 8 callersMethod__init__
(self, hidden_dim)
tests/unit/model_parallelism/test_autotp_custom_patterns.py:103
↓ 8 callersMethod__init__
(self, hidden_dim)
tests/unit/runtime/zero/test_zero_leaf_module.py:99
↓ 8 callersFunction_expect_error
(function, *args, exception=ValueError, **kwargs)
ci/test_torch_latest.py:25
↓ 8 callersMethod_io_aligned_numel
(self, numel)
deepspeed/runtime/swap_tensor/optimizer_utils.py:531
↓ 8 callersFunction_node_by_name
(graph, name)
tests/unit/v1/compile/test_offload_activation.py:138
↓ 8 callersFunction_prod
(dims)
deepspeed/profiling/flops_profiler/profiler.py:516
↓ 8 callersFunction_selection_file
(content: str)
ci/test_torch_latest.py:33
↓ 8 callersFunction_skip_for_invalid_environment
(use_cuda_pinned_tensor=True)
tests/unit/v1/nvme/test_aio.py:26
↓ 8 callersMethod_test
( self, param_persistence_threshold: int = 0, fp16_enabled: bool = False, cont
tests/unit/v1/zero/test_zero.py:927
↓ 8 callersMethod_validate_zero3_moe_compatibility
(self)
deepspeed/runtime/engine.py:1958
↓ 8 callersMethodamp_enabled
(self)
deepspeed/runtime/engine.py:1453
↓ 8 callersMethodasync_pwrite
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:350
↓ 8 callersMethodattention
Returns attention qkv and dense parameters weight: (3*hidden, hidden) and (hidden, hidden) bias: (3*hidden) and (hidden)
deepspeed/module_inject/policy.py:34
↓ 8 callersMethodclear
(self)
deepspeed/runtime/zero/stage_1_and_2.py:128
↓ 8 callersMethodclose
Shutdown the worker process gracefully. Sends termination signal to worker and waits for clean shutdown. If the process does
deepspeed/runtime/superoffload/superoffload_utils.py:287
↓ 8 callersFunctioncompare_loss
(self, config, dtype, iteration=5, hidden_dim_override=None, rtol=None, atol=None, model_cls=None)
tests/unit/v1/compile/util.py:22
↓ 8 callersMethoddata_ptr
csrc/aio/py_lib/deepspeed_cpu_op.cpp:35
↓ 8 callersMethodempty_partition_cache
Release GPU memory consumed by offloaded model parameters.
deepspeed/runtime/engine.py:5728
↓ 8 callersFunctionengine_input_dtype
(engine)
tests/unit/v1/moe/autoep_test_utils.py:229
↓ 8 callersFunctionfn
(x)
tests/unit/runtime/activation_checkpointing/test_offload_activations.py:38
↓ 8 callersFunctionget_config_dict
Build a config dict. force_fp32 keeps the engine in fp32: the frozen-param non-reentrant CheckpointError only reproduces in fp32 (bf16 recomp
tests/unit/v1/zero/test_zero_user_backward.py:55
↓ 8 callersMethodget_param_gradient_attribute
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1152
↓ 8 callersFunctionget_preset_adapter
Return a registered AutoEP preset adapter by name.
deepspeed/module_inject/auto_ep_presets/registry.py:76
↓ 8 callersMethodis_initialized
()
tests/unit/v1/compile/test_offload_activation.py:309
↓ 8 callersMethodmanaged_gradient_accumulation
(self)
deepspeed/runtime/engine.py:1478
↓ 8 callersFunctionmaybe_copy
(module, sd, weight_quantizer, mp_replace, dst_nam
deepspeed/module_inject/policy.py:131
↓ 8 callersFunctionmaybe_get_lora
(p)
deepspeed/module_inject/policy.py:210
↓ 8 callersFunctionmerge_tp_slices
(uc_info, dir, slice_dir, tp_degree, name_and_shapes)
deepspeed/checkpoint/ds_to_universal.py:289
↓ 8 callersFunctionnumber_to_string
(num, units=None, precision=DEFAULT_PRECISION)
deepspeed/profiling/flops_profiler/profiler.py:1130
↓ 8 callersFunctionpartition_assignments
Partition routed assignments across TP peers by stable per-expert ordinal. Each peer keeps only ``assignment_index % tp_size == tp_rank`` of the
deepspeed/moe/ep_tp_dispatch.py:230
↓ 8 callersFunctionpartition_balanced
use dynamic programming solve `The Linear Partition Problem`. see https://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK2/NODE45.HTM
deepspeed/runtime/utils.py:635
↓ 8 callersMethodrecord_gathered_param
(self, param)
deepspeed/compile/z3_eager_fallback.py:111
↓ 8 callersFunctionregister_pass_contract
(name: str, contract: Optional[PassContract])
deepspeed/compile/passes/contract.py:47
↓ 8 callersFunctionreplace_autoep_layers
(model, preset_model, expected_count=1, **config_overrides)
tests/unit/v1/moe/autoep_test_utils.py:276
↓ 8 callersMethodrun
csrc/gds/py_lib/deepspeed_gds_op.cpp:122
↓ 8 callersFunctionskip_unless_h100_tests_enabled
(reason)
tests/unit/v1/moe/autoep_test_utils.py:31
↓ 8 callersMethodstep
(self, closure=None)
tests/unit/simple_model.py:209
↓ 8 callersMethodstep_subgroup
Update the model parameters in a single subgroup (by index).
deepspeed/ops/adam/cpu_adam.py:166
↓ 8 callersMethodstore
Stores a fragment to memory
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_atomic.h:419
↓ 8 callersFunctionswiglu
Fused SwiGLU activation: ``silu(gate) * up``. Args: gate: Gate projection output, any shape, float16/bfloat16/float32. up: Up pro
deepspeed/ops/triton_ops/swiglu_triton.py:116
↓ 8 callersMethodterminate
(self)
ci/test_torch_latest.py:121
↓ 8 callersFunctionto_string
csrc/includes/deepcompile.h:39
↓ 8 callersMethodtotal_memory
(self, device_index=None)
accelerator/hpu_accelerator.py:153
↓ 8 callersMethodunpin
(self, tensor)
deepspeed/utils/pin_memory.py:85
↓ 8 callersMethodupdate_linear_policies
(self)
deepspeed/module_inject/auto_tp.py:676
↓ 8 callersFunctionupdate_lr
(param_groups, lrs)
deepspeed/runtime/lr_schedules.py:251
↓ 8 callersFunctionvalidate_kv_cache
Given a QKV tensor and a KV cache, validate that the cache contains the correct values.
tests/unit/inference/v2/kernels/ragged_ops/ragged_testing_utils.py:247
↓ 7 callersMethodEvent
(self, enable_timing=True)
tests/unit/v1/compile/test_graph_profile.py:42
↓ 7 callersFunction_allgather
(graph, arg, ds_id, name, tensor_size=1, device_time=1)
tests/unit/v1/compile/test_list_schedule.py:115
↓ 7 callersMethod_assert_same_partition_group
(self, params)
deepspeed/runtime/zero/stage3.py:655
↓ 7 callersFunction_assert_topology_load_matches_universal
(tmpdir, *, target_ep_
tests/unit/v1/moe/test_autoep_checkpoint.py:330
↓ 7 callersFunction_blocked_flash_testing_helper
Helper function for testing blocked flash attention. This implementation is based on the implemnentation in ``unit.inference.kernels.ragged_o
tests/unit/inference/v2/modules/test_blocked_attn.py:28
↓ 7 callersFunction_build_engine
(stage, gas=1)
tests/unit/v1/zero/test_zero_torch_func.py:57
↓ 7 callersFunction_do_ref_write
(tmpdir, index=0, file_size=IO_SIZE)
tests/unit/v1/nvme/test_gds.py:32
← previousnext →301–400 of 12,000, ranked by callers