MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions14,579 in github.com/deepspeedai/DeepSpeed

Methodtest_gpt2_checkpointable_layers
(self)
tests/unit/runtime/activation_checkpointing/test_activation_checkpointing.py:413
Methodtest_gpt2_mp2_no_resize
(self, tmpdir, inputs)
tests/unit/v1/autotp/test_configurable_parallel_mp.py:91
Methodtest_gpu1_fp16
(self)
tests/model/BingBertSquad/BingBertSquad_run_func_test.py:74
Methodtest_gpu1_fp32
(self)
tests/model/BingBertSquad/BingBertSquad_run_func_test.py:100
Methodtest_gpu4_fp16
(self)
tests/model/BingBertSquad/BingBertSquad_run_func_test.py:48
Methodtest_gpu4_fp16_zero2
(self)
tests/model/BingBertSquad/BingBertSquad_run_func_test.py:61
Methodtest_gpu4_fp32
(self)
tests/model/BingBertSquad/BingBertSquad_run_func_test.py:87
Functiontest_gqa
(head_config: Tuple[int, int])
tests/unit/inference/v2/modules/test_blocked_attn.py:177
Functiontest_gqa
(head_config: Tuple[int, int])
tests/unit/inference/v2/kernels/ragged_ops/test_blocked_flash.py:179
Methodtest_gqa_backward_matches_reference
(self, num_kv_heads: int)
tests/unit/v1/sequence_parallelism/test_ulysses.py:392
Functiontest_gqa_even_sharding
Test GQA sharding when the KV heads are evenly divisible by the number of shards.
tests/unit/inference/v2/model_implementations/sharding/test_qkv_sharding.py:115
Functiontest_gqa_input_shape_error
()
tests/unit/inference/v2/model_implementations/sharding/test_qkv_sharding.py:241
Methodtest_gqa_partitions_by_kv_groups
(self, batch_dim_idx)
tests/unit/v1/sequence_parallelism/test_ulysses.py:592
Methodtest_gqa_uneven_qkv_fused_forward
(self)
tests/unit/v1/autotp/test_autotp_custom_patterns.py:968
Methodtest_gqa_uneven_qkv_fused_weight_partition
(self)
tests/unit/v1/autotp/test_autotp_custom_patterns.py:841
Functiontest_gqa_uneven_sharding
We only test the uneven GQA test case because even GQA shards the attention output in the exact same manner as MHA. Args: n_head
tests/unit/inference/v2/model_implementations/sharding/test_attn_out_sharding.py:94
Functiontest_gqa_uneven_sharding
Test GQA sharding when there are more shards than KV heads.
tests/unit/inference/v2/model_implementations/sharding/test_qkv_sharding.py:149
Methodtest_grad_accumulation
Test that gradient accumulation works correctly with loss.backward() by comparing with DDP
tests/unit/v1/zero/test_zero_user_backward.py:440
Methodtest_grad_accumulation_scale_wrt_gas_false
Test that scale_wrt_gas=False disables gradient scaling by accumulation steps. When scale_wrt_gas=False is passed to engine.backward(), gradi
tests/unit/v1/zero/test_zero_user_backward.py:481
Methodtest_grad_and_value_over_patched_functional_linear
(self)
tests/unit/v1/zero/test_zero_functorch_linear.py:58
Methodtest_grad_and_value_through_engine
(self, stage)
tests/unit/v1/zero/test_zero_torch_func.py:80
Methodtest_grad_clip_and_norm_update
Test custom gradient clipping with configurations and to check if the norm_groups are updated correctly
tests/unit/runtime/zero/test_zero_grad_clip.py:93
Methodtest_grad_not_scaled_by_gas
(self, stage)
tests/unit/v1/zero/test_zero_torch_func.py:102
Methodtest_grad_through_engine
(self, stage)
tests/unit/v1/zero/test_zero_torch_func.py:74
Functiontest_gradcheck_fp32
fp32 grad parity vs the pure-torch reference (Triton default tl.dot precision).
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:290
Methodtest_gradient_accumulation
(self, h_dim: int, n_layers: int, zpg: int)
tests/unit/runtime/zero/test_zeropp.py:261
Methodtest_gradient_accumulation_matches_one_large_micro_batch
Same samples per step either way, so only half-precision Newton-Schulz noise may differ.
tests/unit/v1/ops/muon/test_muon_zero3_grad_accum.py:130
Functiontest_gradient_allreduce_op
(value, expected)
tests/unit/runtime/test_ds_config_dict.py:139
Functiontest_gradient_allreduce_op_default
()
tests/unit/runtime/test_ds_config_dict.py:147
Functiontest_gradient_checkpointing_layer_signature_contract
Pin the HF signature _checkpoint_offload_call depends on. GradientCheckpointingLayer itself does not define forward(); the contract lives on
tests/unit/runtime/activation_checkpointing/test_offload_activations.py:63
Methodtest_gradient_clipping
(self, zero_stage)
tests/unit/v1/zero/test_zero_coalesce_grad_reduction.py:211
Methodtest_gradient_clipping_rejects_disabled_norm
(self)
tests/unit/runtime/zero/test_zero1_optimizer_fastpath.py:149
Methodtest_gradient_reaches_the_input
The exchange is a permutation, so d/dx of ``sum(exchange(x) ** 2)`` is ``2 * x`` on every rank. A collective that fills a caller-allocated bu
tests/unit/ulysses_alst/test_dim_zero_all_to_all.py:22
Methodtest_gradients_are_reduced_across_dp_group
(self)
tests/unit/compile/test_tp_compile.py:509
Methodtest_gradients_are_scaled_once
(self)
tests/unit/runtime/pipe/test_pipe.py:56
Methodtest_gradients_match_ddp
(self, bf16_optimizer_states, use_cpu_offload, zero_stage)
tests/unit/v1/half_precision/test_bf16.py:368
Methodtest_gradients_match_ddp_with_autocast
Test BF16 with torch_autocast by comparing gradients with DDP baseline.
tests/unit/v1/half_precision/test_with_autocast.py:26
Methodtest_grads_and_norm_match_reference
(self, world_size, tp_size, ep_size, zero_stage, zero_init)
tests/unit/v1/moe/test_autoep_autotp_sharded_attention.py:353
Functiontest_grain_quantized_shards_tile_the_dimension
(total_size, tp_size)
tests/unit/module_inject/test_tp_shard.py:14
Functiontest_gram_normalization_preserves_large_finite_gradient_direction
(monkeypatch, shape, scale)
tests/unit/v1/ops/muon/test_muon_gram_normalization.py:32
Functiontest_graph_capture_replay_roundtrip
()
tests/unit/accelerator/test_accelerator_graph.py:11
Methodtest_graph_generation_matches_eager
(self)
tests/unit/hybrid_engine/test_he_graph.py:202
Functiontest_graph_harvesting_config_is_rejected
(value)
tests/unit/runtime/test_ds_config_dict.py:257
Functiontest_graph_ops_run_eagerly_without_graph_support
()
tests/unit/accelerator/test_accelerator_graph.py:47
Functiontest_graphsafe_rng_state_outputs_are_registered_no_reuse
()
tests/unit/v1/compile/test_list_schedule.py:537
Methodtest_grid_pipe_data
(self)
tests/unit/runtime/pipe/test_topology.py:167
Functiontest_group_handle_container_carries_explicit_groups_and_rank_tables
()
tests/unit/v1/moe/test_autoep_autotp_folding_groups.py:55
Functiontest_group_meta_large_E_spans_multiple_blocks
E larger than the fixed BLOCK exercises the multi-block grid path.
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:148
Functiontest_group_meta_matches_reference
(cumulative)
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:133
Functiontest_group_names_stay_distinct_across_groups
MoE regrouping keys its buckets by name, so two groups must not collide on one.
tests/unit/runtime/zero/test_muon_param_groups.py:97
Functiontest_group_per_tp_shapes_handles_pp_local_params
()
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:837
Functiontest_group_per_tp_shapes_rejects_disagreeing_pipeline_replicas
()
tests/unit/checkpoint/test_autotp_uc_checkpoint.py:869
Functiontest_group_step_nvme_offloaded_partition
()
tests/unit/ops/adam/test_zf_torch_adam.py:237
Functiontest_group_step_with_offload
(Opt)
tests/unit/ops/adam/test_zf_torch_adam.py:113
Functiontest_group_step_without_offload
(Opt)
tests/unit/ops/adam/test_zf_torch_adam.py:104
Methodtest_grouped_experts
(self)
tests/unit/v1/moe/test_autoep_unit.py:1469
Functiontest_grouped_experts_auto_selects_triton_on_ampere
On sm < 9.0 the module auto-selects Triton; disable_triton_grouped_mm opts out.
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:446
Functiontest_grouped_experts_triton_path_parity
The GroupedExperts module's Triton path matches its for-loop path (fwd + grads).
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:405
Methodtest_grouped_gemm_paths_match_the_for_loop
(self, activation, path)
tests/unit/v1/moe/test_autoep_expert_activation.py:238
Functiontest_grouped_kernel_launch_policy
(enabled)
tests/unit/runtime/test_custom_determinism.py:36
Methodtest_h100_folded_checkpoint_same_topology_resume
(self, tmpdir)
tests/unit/v1/moe/test_autoep_autotp_checkpoint.py:298
Methodtest_h100_folded_tp2_ep2_finite_loss_smoke
(self)
tests/unit/v1/moe/test_autoep_autotp_runtime.py:225
Methodtest_h100_folded_tp2_ep2_runtime
(self)
tests/unit/v1/moe/test_autoep_autotp_runtime.py:202
Methodtest_h100_folded_tp2_ep4_checkpoint_same_topology_resume
(self, tmpdir)
tests/unit/v1/moe/test_autoep_autotp_checkpoint.py:308
Methodtest_h100_folded_tp2_ep4_runtime
(self)
tests/unit/v1/moe/test_autoep_autotp_runtime.py:243
Methodtest_h100_zero12_per_family_optimizer_state
(self)
tests/unit/v1/moe/test_autoep_autotp_grad_parity.py:714
Methodtest_half_int4_quantization
(self)
tests/unit/inference/quantization/test_intX_quantization.py:373
Methodtest_half_int8_quantization
(self)
tests/unit/inference/quantization/test_intX_quantization.py:382
Functiontest_head_count_comes_from_the_shared_extractor
Head counts are read through AutoTPMeta, so alternative config spellings work.
tests/unit/runtime/zero/test_per_head_muon.py:432
Functiontest_head_counts_track_the_config
(q_heads, kv_heads)
tests/unit/runtime/zero/test_per_head_muon.py:260
Functiontest_head_dim_alone_would_reject_the_mla_q_proj
Guards the width source rather than the outcome: head_dim is present and wrong here.
tests/unit/runtime/zero/test_per_head_muon.py:393
Functiontest_head_dim_is_derived_when_the_config_omits_it
Configs that leave head_dim out still define it as hidden_size // num_attention_heads.
tests/unit/runtime/zero/test_per_head_muon.py:518
Methodtest_head_optimizer_updates_match_dense
(self)
tests/unit/v1/sequence_parallelism/test_vocab_parallel_ops.py:800
Methodtest_head_sharded_helper_freezes_the_models_split
(self)
tests/unit/v1/autotp/test_autotp_custom_patterns.py:687
Methodtest_head_sharded_helper_leaves_the_class_untouched
(self)
tests/unit/v1/autotp/test_autotp_custom_patterns.py:644
Functiontest_head_size
(head_size: int)
tests/unit/inference/v2/modules/test_blocked_attn.py:167
Functiontest_head_size
(head_size: int)
tests/unit/inference/v2/kernels/ragged_ops/test_blocked_flash.py:169
Methodtest_head_to_seq_parallel
(self, batch_dim_idx, seq_world_size)
tests/unit/v1/sequence_parallelism/test_ulysses.py:203
Methodtest_heads_second_layout_with_unsqueeze_dim_2
(self)
tests/unit/v1/ops/triton_ops/test_fused_rotary_pos_emb.py:130
Functiontest_healthy_rank_aborts_when_another_rank_failed
(monkeypatch)
tests/unit/v1/compile/test_graph_profile.py:259
Methodtest_held_out_module_is_not_pulled_into_the_optimizer
Only replacement parameters may be added. A caller who deliberately keeps a module out of this optimizer -- a second optimizer, a fro
tests/unit/v1/moe/test_autoep_unit.py:2722
Methodtest_hf_clone
(self)
tests/unit/linear/test_quant_param.py:50
Methodtest_hf_minimax_m3_causal_lm_matches_autoep_with_router_logits
(self)
tests/unit/v1/moe/test_autoep_unit.py:2241
Methodtest_hf_mixtral_causal_lm_matches_autoep_with_router_logits
(self)
tests/unit/v1/moe/test_autoep_unit.py:2222
Functiontest_hi
()
deepspeed/module_inject/inject.py:74
Functiontest_hidden_gradient_sums_many_vocab_entries_exactly
()
tests/unit/v1/sequence_parallelism/test_vocab_parallel_linear_cross_entropy.py:147
Functiontest_hidden_parallel_embedding_keeps_gemma3_scaled_lookup
()
tests/unit/module_inject/test_tp_partition_config_path.py:623
Methodtest_hjson
(self, base_config, tmpdir)
tests/unit/runtime/test_ds_config_dict.py:443
Functiontest_host_tensors_keep_the_reference_path
()
tests/unit/v1/moe/test_autoep_permute_rows.py:161
Functiontest_host_timers_default_on_and_event_timer_opt_in
(monkeypatch)
tests/unit/v1/accelerator/test_klxpu_accelerator.py:33
Functiontest_hostfile_good
()
tests/unit/launcher/test_run.py:250
Functiontest_hostfiles_bad
()
tests/unit/launcher/test_run.py:275
Methodtest_hybrid_adam_equal
(self, dtype, model_size)
tests/unit/ops/adam/test_hybrid_adam.py:48
Functiontest_hybrid_engine_import_does_not_resolve_transformers_opt
(monkeypatch)
tests/unit/hybrid_engine/test_he_policy.py:37
Functiontest_hybrid_engine_max_out_tokens_accepts_positive_values
(value)
tests/unit/runtime/test_ds_config_model.py:73
Functiontest_hybrid_engine_max_out_tokens_default
()
tests/unit/runtime/test_ds_config_model.py:84
Functiontest_hybrid_engine_max_out_tokens_must_be_positive
(value)
tests/unit/runtime/test_ds_config_model.py:61
Methodtest_hybrid_optimizer_state
(self, tmpdir, zero_stage)
tests/unit/checkpoint/test_zero_optimizer.py:170
Methodtest_hysteresis
(self, optimizer_class)
tests/unit/runtime/half_precision/test_dynamic_loss_scale.py:317
Methodtest_hysteresis_survives_a_checkpoint
(self, optimizer_class)
tests/unit/runtime/half_precision/test_dynamic_loss_scale.py:334
← previousnext →12,501–12,600 of 14,579, ranked by callers