MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions15,468 in github.com/deepspeedai/DeepSpeed

↓ 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
↓ 8 callersMethodwait
(self)
tests/unit/comm/test_dist.py:168
↓ 7 callersMethod__init__
(self)
tests/unit/compile/test_zero3_grad_dtype.py:110
↓ 7 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:153
↓ 7 callersFunction_all_gather_cat_dim0
Plain all_gather of uneven shards along dim 0, auto-discovering per-rank widths. Independent of AutoTP's gather_params: a bug in the gather under
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:1343
↓ 7 callersFunction_assert_cleanup_results_close
(actual, expected, *, compare_score_gradients, extra_route_recomputes=0)
tests/unit/v1/moe/test_autoep_deepep_parity.py:396
↓ 7 callersFunction_assert_equal
(actual, expected, label)
tests/unit/v1/ops/triton_ops/test_fused_rotary_pos_emb.py:54
↓ 7 callersFunction_assert_params_match
(ref, test, label, tol=5e-5)
tests/unit/v1/zero/test_zero2_offload_multi_backward.py:66
↓ 7 callersMethod_assert_same_partition_group
(self, params)
deepspeed/runtime/zero/stage3.py:709
↓ 7 callersFunction_assert_topology_load_matches_universal
(tmpdir, *, target_ep_
tests/unit/v1/moe/test_autoep_checkpoint.py:355
↓ 7 callersMethod_backward_inputs
Per backward: rows, their output gradient, rows per group, and valid rows per group when padded. Padded groups are laid out as the AutoEP lay
tests/unit/v1/moe/test_autoep_expert_activation.py:790
↓ 7 callersFunction_base_config
(zero_stage, gradient_accumulation_steps=1, cpu_offload=False)
tests/unit/v1/zero/test_zero2_offload_multi_backward.py:25
↓ 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_build_map
Derive the affine map of a layout by probing the real partition function.
tests/unit/checkpoint/test_affine_shard_map.py:128
↓ 7 callersFunction_config
(*, compute_grad_norm, gradient_clipping=0.0, stage=1, offload_optimizer=None, zenflow=None)
tests/unit/runtime/zero/test_zero1_optimizer_fastpath.py:18
↓ 7 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:1027
↓ 7 callersFunction_device
()
tests/unit/checkpoint/test_affine_transfer_executor.py:33
↓ 7 callersFunction_device
()
tests/unit/v1/ops/triton_ops/test_autoep_fused_token_ops.py:24
↓ 7 callersFunction_device
()
tests/unit/v1/moe/test_autoep_permute_rows.py:14
↓ 7 callersMethod_device_and_dtype
(self)
tests/unit/v1/moe/test_autoep_expert_activation.py:763
↓ 7 callersFunction_do_ref_write
(tmpdir, index=0, file_size=IO_SIZE)
tests/unit/v1/nvme/test_gds.py:32
↓ 7 callersMethod_experts_pair
(self, device, dtype, gate_up_impl, trainable=(True, True, True))
tests/unit/v1/moe/test_autoep_expert_activation.py:772
↓ 7 callersFunction_fused_qkv_shard_fn
(layout_name, mp_size, meta)
tests/unit/checkpoint/test_affine_shard_map.py:148
↓ 7 callersMethod_git
(self, *args: str)
ci/test_tests_fetcher.py:94
↓ 7 callersFunction_init_engine
(*, load_universal=False, world_size=1)
tests/unit/checkpoint/test_fp32_master_only.py:59
↓ 7 callersMethod_is_lm_head_name
(self, name)
deepspeed/module_inject/auto_tp.py:735
↓ 7 callersFunction_make_bwd_graph
A backward graph that reads the saved activations late, leaving room to start copies early.
tests/unit/v1/compile/test_offload_activation.py:793
↓ 7 callersFunction_make_bwd_profile
(graph, peak=0, node_time_ms=1.0)
tests/unit/v1/compile/test_offload_activation.py:817
↓ 7 callersFunction_make_offload_state_key
(key)
deepspeed/runtime/zero/offload_states.py:13
↓ 7 callersFunction_make_offs
(counts, device)
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:104
↓ 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:18
↓ 7 callersFunction_nested
(layout, holders_by_layout_rank, partition_by_layout_rank=None)
tests/unit/checkpoint/test_zero_affine.py:102
↓ 7 callersFunction_num_rows
(logits)
deepspeed/ops/triton_ops/vocab_parallel_softmax.py:359
↓ 7 callersMethod_op
Return torch.ops.deepspeed.<name>, raising clearly if not registered.
op_builder/supa/quantizer.py:23
↓ 7 callersMethod_optimizer_states_and_gradient_swap_out
(self, sub_group_id, timer_names=None)
deepspeed/runtime/zero/stage3.py:3009
↓ 7 callersFunction_oracle_shards
(full_tensor, experts_by_rank)
tests/unit/checkpoint/test_autoep_affine.py:20
↓ 7 callersMethod_partition_world_size
(self, param)
deepspeed/runtime/zero/partition_parameters.py:1712
↓ 7 callersFunction_skip_without_avx
(builder)
tests/unit/v1/ops/test_reflow_cpu_optimizers.py:48
↓ 7 callersFunction_split
(total, degree)
tests/unit/checkpoint/test_affine_transfer_plan.py:70
↓ 7 callersFunction_stored_by_rank
What each process stores, by slicing each flattened layout shard with ZeRO's rule.
tests/unit/checkpoint/test_zero_affine.py:88
↓ 7 callersFunction_synthetic_calibration
A calibration result whose times follow known alpha and bandwidth per path exactly.
tests/unit/checkpoint/test_affine_transfer_calibration.py:24
↓ 7 callersFunction_tiny_config
A 2-layer GLM-5.2 config. ``dense_mlps`` gives every layer a dense MLP, for tests of the attention alone: the MoE backward can hang in torch 2.8's
tests/unit/v1/models/test_glm_moe_dsa.py:107
↓ 7 callersMethod_token_selector
Return a function that picks the next tokens ``[B, 1]`` from last-position logits ``[B, V]``. Tokens are picked after each forward or graph r
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1782
↓ 7 callersFunction_train
(engine, steps, first_step=0)
tests/unit/v1/zero/test_zero_partial_offload.py:77
↓ 7 callersMethod_validate_zero3_moe_compatibility
(self)
deepspeed/runtime/engine.py:2323
↓ 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 callersFunctionallclose_on_all_ranks
Compare two tensors across all ranks. We want to make sure that all ranks succeed or fail together.
tests/unit/common.py:602
↓ 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 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:131
↓ 7 callersFunctionapply_segment_ki
Install segment kernels on ``model`` (post-AutoTP, pre-generate). Uses the native CUDA op when a non-cpu accelerator backend is active; falls
deepspeed/module_inject/segment_ki.py:809
↓ 7 callersFunctionautoep_metadata_to_affine_map
Load a persisted AutoEP affine map, falling back to legacy placement lowering.
deepspeed/checkpoint/autoep_affine.py:210
↓ 7 callersFunctionautoep_storage_affine_map
Lower one expert parameter to the storage each global rank actually holds. ``holders_by_ep_rank`` maps every rank ID of ``descriptor`` to the glo
deepspeed/checkpoint/autoep_affine.py:176
↓ 7 callersFunctionavailable_physical_cpus
()
tests/unit/v1/zero/test_reflow.py:109
↓ 7 callersFunctionboxes_disjoint
Whether no two boxes share an element. Sweeps along the axis whose box origins are most varied, so a box is compared only with the boxes stil
deepspeed/checkpoint/affine_geometry.py:154
↓ 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 callersFunctionconsolidate_autoep_zero12_expert_states
Consolidate AutoEP expert FP32 and Adam states from ZeRO-1/2 fragments.
deepspeed/checkpoint/autoep_universal.py:288
↓ 7 callersFunctioncores
(monkeypatch)
tests/unit/ops/adam/test_cpu_adam_threads.py:15
↓ 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:110
↓ 7 callersFunctioncreate_deepspeed_model
(config_dict, model, base_optimizer)
tests/unit/checkpoint/common.py:156
↓ 7 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:231
↓ 7 callersMethodcreate_op_builder
(self, class_name)
accelerator/hpu_accelerator.py:288
↓ 7 callersMethoddefault_stream
(self, device_index=None)
accelerator/hpu_accelerator.py:111
↓ 7 callersMethoddevice_count
(self)
tests/unit/launcher/test_run.py:134
↓ 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 callersMethodend_profile
Ends profiling. The added attributes and handles are removed recursively on all the modules.
deepspeed/profiling/flops_profiler/profiler.py:203
↓ 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 callersFunctionget_input_id_node
(gm: GraphModule)
deepspeed/compile/util.py:551
↓ 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:1537
↓ 7 callersMethodget_param_comm_dtype
(self, param)
deepspeed/runtime/zero/stage3.py:1767
↓ 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 callersMethodinclude_paths
(self)
op_builder/evoformer_attn.py:162
↓ 7 callersMethodinference_all_reduce
(self, tensor, op=ReduceOp.SUM, group=None)
deepspeed/comm/ccl.py:87
↓ 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:440
↓ 7 callersMethodinstalled_rocm_version
()
op_builder/builder.py:590
↓ 7 callersMethodirecv
(self, tensor, src=None, group=None, tag=0)
deepspeed/comm/torch.py:561
↓ 7 callersFunctionis_compiling
()
deepspeed/runtime/compiler.py:100
↓ 7 callersMethodis_graph_capture_supported
(self)
accelerator/npu_accelerator.py:250
↓ 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 callersMethodjit_load
(self, verbose=True)
op_builder/builder.py:513
↓ 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 callersMethodlog_timers
(self)
deepspeed/runtime/swap_tensor/optimizer_utils.py:237
↓ 7 callersFunctionnest_affine_maps
Compose a layout map with a description of how each of its shards is stored. ``outer`` describes the parameter's layout: the shard each layout ra
deepspeed/checkpoint/affine.py:770
↓ 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:411
↓ 7 callersMethodpin_empty_like
(self, tensor, device="cpu", dtype=None)
accelerator/abstract_accelerator.py:365
← previousnext →601–700 of 15,468, ranked by callers