MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions10,922 in github.com/deepspeedai/DeepSpeed

↓ 8 callersMethod__init__
(self, hidden_dim)
tests/unit/runtime/zero/test_zero_leaf_module.py:99
↓ 8 callersFunction_get_hf_tp_plan
Extract tp_plan from HuggingFace model. Prefer base_model_tp_plan (from model config) over _tp_plan (runtime attribute) because _tp_plan ofte
deepspeed/runtime/tensor_parallel/config.py:149
↓ 8 callersMethod_io_aligned_numel
(self, numel)
deepspeed/runtime/swap_tensor/optimizer_utils.py:526
↓ 8 callersFunction_make_param
(shape, meta=None)
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:43
↓ 8 callersFunction_prod
(dims)
deepspeed/profiling/flops_profiler/profiler.py:516
↓ 8 callersFunction_skip_for_invalid_environment
(use_cuda_pinned_tensor=True)
tests/unit/ops/aio/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:732
↓ 8 callersMethod_validate_zero3_moe_compatibility
(self)
deepspeed/runtime/engine.py:1747
↓ 8 callersMethodasync_pwrite
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:340
↓ 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 callersMethodcapture_to_graph
(self, graph, pool=None, stream=None)
accelerator/hpu_accelerator.py:198
↓ 8 callersMethodclear
(self)
deepspeed/runtime/zero/stage_1_and_2.py:126
↓ 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:268
↓ 8 callersFunctioncreate_gm_nodes
Load a tiny LlamaForCausalLM, tag inputs with AutoSP keys, mark the sequence dimension dynamic, and capture the torch-fx GraphModule via a cu
tests/unit/v1/compile/util.py:225
↓ 8 callersMethodcreate_graph
(self)
accelerator/hpu_accelerator.py:195
↓ 8 callersMethoddeepspeed_src_path
(self, code_path)
op_builder/builder.py:511
↓ 8 callersMethoddequantize
(self, quantized_param, scale)
deepspeed/runtime/zero/partition_parameters.py:865
↓ 8 callersMethodelapsed_time
(self, end_event)
tests/unit/v1/compile/test_graph_profile.py:75
↓ 8 callersMethodempty_partition_cache
Release GPU memory consumed by offloaded model parameters.
deepspeed/runtime/engine.py:5406
↓ 8 callersMethodencode
(self, *inputs, **kwargs)
deepspeed/model_implementations/diffusers/vae.py:99
↓ 8 callersFunctionengine_input_dtype
(engine)
tests/unit/v1/moe/autoep_test_utils.py:229
↓ 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:53
↓ 8 callersMethodget_lr
Calculates the learning rate at batch index. This function treats `self.last_batch_iteration` as the last batch index.
deepspeed/runtime/lr_schedules.py:588
↓ 8 callersFunctionget_output_node
(graph: Graph)
deepspeed/compile/fx.py:16
↓ 8 callersMethodget_param_gradient_attribute
(self, param)
deepspeed/runtime/zero/stage_1_and_2.py:1074
↓ 8 callersFunctionget_preset_adapter
Return a registered AutoEP preset adapter by name.
deepspeed/module_inject/auto_ep_presets/registry.py:76
↓ 8 callersMethodinstalled_rocm_version
()
op_builder/builder.py:220
↓ 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 callersFunctionnumber_to_string
(num, units=None, precision=DEFAULT_PRECISION)
deepspeed/profiling/flops_profiler/profiler.py:1127
↓ 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:627
↓ 8 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
↓ 8 callersFunctionreplace_autoep_layers
(model, preset_model, expected_count=1, **config_overrides)
tests/unit/v1/moe/autoep_test_utils.py:276
↓ 8 callersMethodreplay_graph
(self, graph)
accelerator/hpu_accelerator.py:201
↓ 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 callersFunctionto_string
csrc/includes/deepcompile.h:39
↓ 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 callersMethod__init__
(self, hidden_dim)
tests/unit/model_parallelism/test_autotp_custom_patterns.py:96
↓ 7 callersMethod_assert_same_partition_group
(self, params)
deepspeed/runtime/zero/stage3.py:619
↓ 7 callersFunction_assert_topology_load_matches_universal
(tmpdir, *, target_ep_
tests/unit/v1/moe/test_autoep_checkpoint.py:306
↓ 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/ops/aio/test_gds.py:32
↓ 7 callersFunction_do_ref_write
(tmpdir, index=0, num_bytes=IO_SIZE)
tests/unit/ops/aio/test_aio.py:43
↓ 7 callersFunction_module_with_fp32_buffer
Linear layer plus an fp32 buffer that mimics the rotary inv_freq.
tests/unit/v1/half_precision/test_mixed_precision_dtype.py:17
↓ 7 callersMethod_partition_all_parameters
(self)
deepspeed/runtime/zero/stage3.py:2996
↓ 7 callersMethod_partition_world_size
(self, param)
deepspeed/runtime/zero/partition_parameters.py:1607
↓ 7 callersMethodadd_item
(self, tensor)
deepspeed/runtime/data_pipeline/data_sampling/indexed_dataset.py:283
↓ 7 callersMethodadd_pointer_offset
Adds a pointer offset in units of Element
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:759
↓ 7 callersMethodallocate
Allocate a list of blocks from the associated KV-caches. This will return `num_blocks` blocks from the KV-cache if they are available
deepspeed/inference/v2/ragged/blocked_allocator.py:50
↓ 7 callersMethodamp_enabled
(self)
deepspeed/runtime/engine.py:1258
↓ 7 callersFunctionapply_rotary_pos_emb
input tensor t is of shape [seq_length, ..., dim] rotary positional embeding tensor freqs is of shape [seq_length, ..., dim] check https:
deepspeed/sequence/layer.py:99
↓ 7 callersFunctionclassify_fused_gate_up_layout
Classify fused gate/up expert weights from raw tensor shapes.
deepspeed/moe/fused_expert_layout.py:23
↓ 7 callersMethodclear
Clear the ragged batch. This will reset the number of tokens and sequences to 0.
deepspeed/inference/v2/ragged/ragged_wrapper.py:123
↓ 7 callersMethodclear_mask
Clears the predicate set efficiently
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:793
↓ 7 callersFunctioncollect_autotp_universal_checkpoint_info
Collect the model-level conversion schema for AutoTP universal checkpoints. The returned `UNIVERSAL_CHECKPOINT_INFO` is intentionally limited to
deepspeed/module_inject/layers.py:454
↓ 7 callersFunctioncreate_ddp_model
(model_class, device, rank, dtype, seed=42, lr=1e-3, **model_kwargs)
tests/unit/v1/zero/test_zero_user_backward.py:108
↓ 7 callersFunctioncreate_deepspeed_model
(config_dict, model, base_optimizer)
tests/unit/checkpoint/common.py:157
↓ 7 callersFunctiondebug_param2name
(param)
deepspeed/utils/debug.py:47
↓ 7 callersMethodeigenvalue_enabled
(self)
deepspeed/runtime/engine.py:923
↓ 7 callersFunctionelem_size
Return size in bytes of the given dtype.
deepspeed/inference/v2/inference_utils.py:91
↓ 7 callersMethodenable_mask
Clears the predicate set efficiently
csrc/deepspeed4science/evoformer_attn/iterators/predicated_tile_iterator_residual_last.h:800
↓ 7 callersMethodgetSize
csrc/includes/deepcompile.h:143
↓ 7 callersFunctionget_comm_dtype
(param: torch.nn.Parameter)
deepspeed/runtime/torch_autocast.py:81
↓ 7 callersMethodget_default_quant_dtype
()
op_builder/fp_quantizer.py:108
↓ 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_world_size
(self)
deepspeed/runtime/pipe/topology.py:449
↓ 7 callersMethodget_rss
(self)
accelerator/cpu_accelerator.py:140
↓ 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 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 callersMethodinit
(self)
tests/unit/compression/test_dequantization.py:18
↓ 7 callersMethodmlp
Returns mlp intermediate and output weight: (intermediate, hidden) and (hidden, intermediate) bias: (intermediate) and (hidde
deepspeed/module_inject/policy.py:95
↓ 7 callersFunctionmuon_update
(grad, momentum, beta=0.95, ns_steps=5, nesterov=True, ns_method="gram", is_expert_group=False)
deepspeed/runtime/zero/muon/original_muon.py:146
↓ 7 callersMethodno_sync
r""" Context manager to disable gradient reduction during backward pass. This context manager has the following effects on oth
deepspeed/runtime/engine.py:2897
↓ 7 callersMethodrandom_ltd_enabled
(self)
deepspeed/runtime/engine.py:971
↓ 7 callersMethodreduce
(self, tensor, dst, op=ReduceOp.SUM, group=None, async_op=False)
deepspeed/comm/ccl.py:151
↓ 7 callersMethodreplace_moe_layer
Replace a single MoE module with AutoEPMoELayer in-place on the model.
deepspeed/module_inject/auto_ep.py:528
↓ 7 callersMethodrun_partition_activations_test
(self, test_config, r_tol)
tests/model/Megatron_GPT2/run_func_test.py:440
↓ 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 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:132
↓ 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 callersFunctionskip_unless_h100_tests_enabled
(reason)
tests/unit/v1/moe/autoep_test_utils.py:31
↓ 7 callersMethodstage_to_global
(self, stage_id, **kwargs)
deepspeed/runtime/pipe/topology.py:398
↓ 7 callersMethodstrided_copy
(self, dst: Optional[torch.Tensor], src: Optional[torch.Tensor],
deepspeed/module_inject/auto_tp.py:50
↓ 7 callersFunctionswap_in_tensors
(swap_handle, tensor_buffers, swap_paths)
deepspeed/runtime/swap_tensor/utils.py:20
↓ 7 callersFunctionswap_out_tensors
(swap_handle, tensor_buffers, swap_paths)
deepspeed/runtime/swap_tensor/utils.py:25
↓ 7 callersFunctiontorch_assert_close
Compare two tensors or non-tensor numbers for their closeness. Add msg=blah to add an additional comment to when assert fails. For defa
tests/unit/util.py:137
↓ 7 callersFunctionupdate_lr
(param_groups, lrs)
deepspeed/runtime/lr_schedules.py:251
↓ 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__
Initialize the Sparsity Pattern Config. For usage example please see, TODO DeepSpeed Sparse Transformer Tutorial Arguments:
deepspeed/ops/sparse_attention/sparsity_config.py:15
↓ 6 callersFunction_allgather
(graph, arg, ds_id, name, tensor_size=1, device_time=1)
tests/unit/compile/test_list_schedule.py:95
↓ 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_ensure_divisibility
Ensure that numerator is divisible by the denominator.
deepspeed/utils/groups.py:68
← previousnext →301–400 of 10,922, ranked by callers