MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions15,468 in github.com/deepspeedai/DeepSpeed

↓ 2 callersMethod_send_tensor_meta
Communicate metadata about upcoming p2p transfers. Metadata is communicated in this order: * type (0: tensor, 1: list)
deepspeed/runtime/pipe/engine.py:930
↓ 2 callersMethod_set_bounds
Manually define the range of layers that will be built on this process. These boundaries are treated as list slices and so start is inclusive
deepspeed/runtime/pipe/module.py:540
↓ 2 callersMethod_set_client_model
(self, model)
deepspeed/runtime/engine.py:2192
↓ 2 callersMethod_set_ep_group
(self, ep_group)
deepspeed/moe/sharded_moe.py:555
↓ 2 callersMethod_set_fp16_partitioned_groups_flat
(self)
deepspeed/runtime/zero/stage3.py:1401
↓ 2 callersMethod_set_zero_group_parallelism
(self)
deepspeed/runtime/zero/stage3.py:793
↓ 2 callersFunction_shape_numel
(shape)
deepspeed/checkpoint/ds_to_universal.py:614
↓ 2 callersMethod_shards
(self, batch_dim_idx, seq_world_size)
tests/unit/v1/sequence_parallelism/test_ulysses.py:181
↓ 2 callersFunction_shared_params
(engine)
tests/unit/v1/moe/test_autoep_checkpoint.py:150
↓ 2 callersFunction_shared_qk_affine_map
Describe a shared-QK layout, where a rank's value heads sit in two runs. Returns None where the layout cannot be described honestly: without the
deepspeed/module_inject/layers.py:1707
↓ 2 callersFunction_simulate_zero3_partition
Make ``module``'s parameters look the way ZeRO-3 leaves them. ZeRO-3 empties each partitioned parameter's local data and records the pre-part
tests/unit/runtime/tensor_parallel/test_autotp_universal_checkpoint.py:77
↓ 2 callersFunction_single_line
Render untrusted repository text without controls or extra log lines.
ci/tests_fetcher.py:637
↓ 2 callersMethod_skip_if_nvme_unsupported
(self)
tests/unit/v1/zero/test_zero_user_backward.py:2200
↓ 2 callersMethod_skip_invalid_grad_norm
(self)
deepspeed/runtime/fp16/fused_optimizer.py:151
↓ 2 callersMethod_skip_invalid_grad_norm
(self)
deepspeed/runtime/fp16/unfused_optimizer.py:125
↓ 2 callersFunction_skip_without_device_sub_groups
()
tests/unit/v1/zero/test_zero_partial_offload.py:96
↓ 2 callersFunction_small_async_split_result
(scale=1.0)
tests/unit/v1/moe/test_autoep_grad_parity.py:707
↓ 2 callersFunction_source_indices
Recover which row (or column) of the full tensor each row of the shard came from.
tests/unit/checkpoint/test_affine_shard_map.py:67
↓ 2 callersFunction_source_param_ndim
(param: torch.Tensor | nn.Parameter)
deepspeed/module_inject/auto_ep.py:108
↓ 2 callersFunction_sparse_decode
Gather each token's expert results back and weight them by the gate values.
deepspeed/moe/sharded_moe.py:204
↓ 2 callersFunction_sparse_encode
Place every routed token in its expert slot, returning the [e, c, m] buffer. Inverting the routing map first turns the copy into a single gather.
deepspeed/moe/sharded_moe.py:188
↓ 2 callersMethod_splice_visual_into_text
Replace image placeholder positions in *text_embeds* with *visual_embeds*. This is intentionally architecture-specific. The default raises
deepspeed/sequence/autosp_fusion.py:155
↓ 2 callersFunction_split_affinity
Split a rank's core list into (zf_affinity, pt_affinity): reserve the first ceil(pt_reserved_cores_perc * n) cores for the training thread and giv
deepspeed/runtime/zenflow/zenflow_utils.py:73
↓ 2 callersMethod_split_by_partition_dtype
(self, params_group)
deepspeed/runtime/zero/stage3.py:1282
↓ 2 callersFunction_split_plan_from_expert_counts
Build a SplitPlan from a global per-expert token histogram (ep_size > 1). A single all-to-all exchanges the whole ``[ep_size, E_local]`` count ma
deepspeed/module_inject/auto_ep_layer.py:223
↓ 2 callersFunction_split_plan_received
Rows of the matrix rank ``ep_rank`` receives from the counts all-to-all.
tests/unit/v1/moe/test_autoep_unit.py:1712
↓ 2 callersFunction_stale_wait_cycle
Drive the coordinator's registration pattern by hand. __all_gather_params_ stores ONE handle object under EVERY parameter of a gather group, and
tests/unit/runtime/zero/test_zero_stale_handle_wait.py:21
↓ 2 callersMethod_start_continuous_profile
(self)
deepspeed/runtime/rollout/hybrid_engine_rollout.py:1368
↓ 2 callersFunction_step
(engine, case)
tests/unit/runtime/zero/test_zero_numel_param_shape.py:111
↓ 2 callersFunction_storage_id
(tensor)
tests/unit/runtime/zero/test_zero_linear_direct_init.py:28
↓ 2 callersMethod_stream_context
(self, stream)
deepspeed/runtime/activation_checkpointing/offload_activations.py:110
↓ 2 callersMethod_submit_state_updates
(self, sub_group_ids, combined_scale)
deepspeed/runtime/reflow/reflow_stage3.py:947
↓ 2 callersFunction_sum_replicated_kv_gradient
Sum the K/V gradient rows that every rank holds a copy of.
deepspeed/module_inject/layers.py:1494
↓ 2 callersMethod_supported_optims
(self)
deepspeed/runtime/engine.py:2113
↓ 2 callersFunction_supported_sequence_length
(config: Any)
deepspeed/inference/v2/model_implementations/exaone4_5/model.py:72
↓ 2 callersMethod_swap_in_if_offloaded
Read an NVMe-offloaded partition back into memory. The swapper leaves ``ds_tensor.data`` as a 0-dim placeholder while a partition is on NVMe.
deepspeed/ops/adam/zenflow_torch_adam.py:426
↓ 2 callersMethod_swap_out_gradients
(self, parameter, gradient_offsets, gradient_tensors, gradient_swapper)
deepspeed/runtime/swap_tensor/optimizer_utils.py:256
↓ 2 callersMethod_swap_out_offload_fp32_gradients
(self, offload_fp32_gradients, offload_fp32_offsets)
deepspeed/runtime/zero/stage3.py:1578
↓ 2 callersMethod_swap_out_optimizer_state
(self, aio_handle, parameter, swap_in_op)
deepspeed/runtime/swap_tensor/pipelined_optimizer_swapper.py:205
↓ 2 callersMethod_swap_out_optimizer_state
(self, swap_info)
deepspeed/runtime/swap_tensor/partitioned_optimizer_swapper.py:100
↓ 2 callersMethod_swap_out_unpinned_tensors
(self, aio_handle, unpinned_tensors, dest_paths, pinned_buffers)
deepspeed/runtime/swap_tensor/optimizer_utils.py:441
↓ 2 callersFunction_swiglu_backward_triton
(grad_out: torch.Tensor, gate: torch.Tensor, up: torch.Tensor)
deepspeed/ops/triton_ops/swiglu_triton.py:101
↓ 2 callersFunction_swiglu_clamped_eager
Pure-PyTorch reference used as the non-Triton fallback.
deepspeed/ops/triton_ops/swiglu_triton.py:468
↓ 2 callersFunction_swiglu_packed_backward_triton
(grad_out: torch.Tensor, gate_up: torch.Tensor)
deepspeed/ops/triton_ops/swiglu_triton.py:191
↓ 2 callersMethod_sync_backup_optimizer_group
Copy the hyperparameters of a param group to the optimizer of the sub-groups kept on the device. LR, momentum and weight decay schedules, set
deepspeed/runtime/zero/stage3.py:1318
↓ 2 callersMethod_sync_copy_streams
(self)
deepspeed/runtime/activation_checkpointing/offload_activations.py:287
↓ 2 callersMethod_sync_selective_optimizer_lr
(self)
deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py:601
↓ 2 callersFunction_synchronize
()
deepspeed/checkpoint/affine_transfer_calibration.py:68
↓ 2 callersMethod_synchronize
(self)
deepspeed/utils/timer.py:249
↓ 2 callersMethod_synchronize_tied_weights
(self)
deepspeed/runtime/pipe/module.py:471
↓ 2 callersMethod_take_model_step
(self, lr_kwargs)
deepspeed/runtime/engine.py:3665
↓ 2 callersFunction_tensor_digest_words
(tensor: torch.Tensor)
deepspeed/moe/ep_tp_dispatch.py:89
↓ 2 callersFunction_tensor_kwargs
Names of the keyword arguments that hold a tensor.
deepspeed/runtime/hybrid_engine_graph.py:34
↓ 2 callersFunction_test_activation_checkpoint_ordering
(module, expected_ordering, *inputs)
tests/unit/runtime/activation_checkpointing/test_activation_checkpointing.py:87
↓ 2 callersFunction_test_single_mapping_helper
(n_tokens: int, n_experts: int, assigned_exper
tests/unit/inference/v2/kernels/ragged_ops/test_top_k_gating.py:65
↓ 2 callersFunction_to
(v, device)
deepspeed/compile/profilers/graph_profile.py:30
↓ 2 callersMethod_tp_partition
(self, params_list)
deepspeed/module_inject/layers.py:2451
↓ 2 callersFunction_tp_payload_for_backward_parity
()
tests/unit/v1/moe/test_autoep_autotp_dispatch.py:113
↓ 2 callersMethod_train_and_compare
(self, expected_tp, zero_stage)
tests/unit/v1/autotp/test_autotp_training.py:1388
↓ 2 callersMethod_train_and_compare
(self, engine, reference, zero_stage)
tests/unit/v1/autotp/test_autotp_training.py:2287
↓ 2 callersFunction_train_moe
(config, hidden_dim, num_chunks, num_steps, use_no_sync, ep_size=1, seed=42)
tests/unit/v1/zero/test_zero_coalesce_grad_reduction.py:277
↓ 2 callersFunction_triton_attention
(qkv, input_mask, layer_past, alibi,
deepspeed/ops/transformer/inference/triton/attention.py:184
↓ 2 callersFunction_triton_edge_case_logits
(dtype)
tests/unit/v1/sequence_parallelism/test_vocab_parallel_ops.py:525
↓ 2 callersFunction_triton_packed_flash
(qkv, head_size, mask, sm_scale, causal=False, add_mask=True)
deepspeed/ops/transformer/inference/triton/attention.py:319
↓ 2 callersFunction_triton_softmax_stats
(logits_2d_list, tp_group, local_stats=None)
deepspeed/sequence/vocab_parallel_ops.py:104
↓ 2 callersFunction_two_group_adam
()
tests/unit/runtime/test_lr_schedulers.py:820
↓ 2 callersMethod_under_sources
(self, rel_posix: str)
ci/tests_fetcher.py:322
↓ 2 callersFunction_uneven_handoff
8 elements, sources [4, 4] on processes 0-1, targets [2, 6] on processes 2-3. By hand: target 0 takes source 0[0:2]; target 1 takes source 0[2:4]
tests/unit/checkpoint/test_affine_transfer_analysis.py:26
↓ 2 callersFunction_uneven_vocab_engine
A vocabulary head split 101 ways over `tp_size` ranks, so the shards are uneven.
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:1923
↓ 2 callersMethod_unfuse_lora_layer
(self, layer_id)
deepspeed/runtime/hybrid_engine.py:168
↓ 2 callersMethod_unpack_int4
Unpack int8 bytes into int64 nibbles, sign-extending each one.
op_builder/npu/quantizer.py:100
↓ 2 callersMethod_unregister_device
(begin, device_registered)
deepspeed/utils/pin_memory.py:150
↓ 2 callersFunction_unsupported_cases
()
tests/unit/v1/ops/triton_ops/test_fused_rotary_pos_emb.py:205
↓ 2 callersMethod_unused_ipg_buffer
(bucket, dtype)
deepspeed/runtime/reflow/reflow_stage3.py:661
↓ 2 callersMethod_update_inflight_swap_in
(self, params, swap_in_buffers, inflight_numel)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:280
↓ 2 callersMethod_update_scale
(self, has_overflow=False)
deepspeed/runtime/zero/stage3.py:3701
↓ 2 callersMethod_upstream_stage
(self, phase)
deepspeed/runtime/pipe/dualpipev.py:171
↓ 2 callersMethod_valid_stage
(self, stage_id)
deepspeed/runtime/pipe/schedule.py:83
↓ 2 callersFunction_validate_accelerator
(accel_obj)
accelerator/real_accelerator.py:28
↓ 2 callersFunction_validate_block_rows
(block_rows: int | None)
deepspeed/runtime/chunked_cross_entropy.py:95
↓ 2 callersFunction_validate_config_values
(config_name, config_dict, valid_values)
deepspeed/runtime/model_checkpointing/config.py:22
↓ 2 callersFunction_validate_final_schedule_fingerprint
In scheduler debug mode, fail every rank when final graph order diverges.
deepspeed/compile/passes/zero3_compile.py:157
↓ 2 callersMethod_validate_indices
(self, pp_index, tp_index)
deepspeed/checkpoint/reshape_meg_2d.py:48
↓ 2 callersMethod_validate_rank
(self, rank)
deepspeed/checkpoint/affine.py:236
↓ 2 callersFunction_validate_segment
(segment: TransferSegment, ndim: int)
deepspeed/checkpoint/affine_transfer_executor.py:195
↓ 2 callersFunction_validate_tensor_cast_properties
(typed_tensor, byte_tensor)
tests/unit/utils/test_byte_cast.py:17
↓ 2 callersMethod_validate_vocab_parallel_layer
(self, child, name)
deepspeed/module_inject/auto_tp.py:791
↓ 2 callersFunction_validate_zero3_model_optim_rank_sets
(model_files, optim_files)
deepspeed/checkpoint/ds_to_universal.py:720
↓ 2 callersFunction_validate_zero3_partitioned_autoep_metadata
(autoep_metadata, require_partitioned=True)
deepspeed/checkpoint/ds_to_universal.py:671
↓ 2 callersMethod_wait_async_split_plan
(self, pending: _PendingSplitPlan)
deepspeed/module_inject/auto_ep_layer.py:822
↓ 2 callersMethod_wait_for_gradient_edits
(self, param_ids)
deepspeed/runtime/reflow/reflow_stage3.py:1891
↓ 2 callersFunction_warmup_mmap_file
(path)
deepspeed/runtime/data_pipeline/data_sampling/indexed_dataset.py:331
↓ 2 callersFunction_was_replaced
(param)
deepspeed/runtime/engine.py:323
↓ 2 callersFunction_weight_ndim
Number of dimensions of a layer's weight. A weight partitioned by ``deepspeed.zero.Init`` holds an empty 1-D placeholder, so its original shape, `
deepspeed/module_inject/auto_tp.py:216
↓ 2 callersFunction_weights
(engine, params=None)
tests/unit/v1/zero/test_zero3_unused_param_grads.py:109
↓ 2 callersMethod_window_grads
The expert gradients each of two accumulation windows hands to the optimizer, and the layers' stagings. The second window starts from the fir
tests/unit/v1/moe/test_autoep_grad_parity.py:814
↓ 2 callersMethod_write
(self, num_bytes)
deepspeed/io/mock_file_writer.py:46
↓ 2 callersFunction_write_checkpoint_layout
(tmpdir, parallel_dimensions, autoep_metadata=None)
tests/unit/checkpoint/test_reshape_checkpoint.py:22
↓ 2 callersMethod_write_from_tensor
(self, buffer_tensor)
deepspeed/io/fast_file_writer.py:188
↓ 2 callersMethod_write_gradient_partition
(self, param_id, gradient, rounded)
deepspeed/runtime/reflow/reflow_stage3.py:1905
← previousnext →2,501–2,600 of 15,468, ranked by callers