Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepspeedai/DeepSpeed
/ functions
Functions
14,579 in github.com/deepspeedai/DeepSpeed
⨍
Functions
14,579
◇
Types & classes
2,353
↳
Endpoints
92
Method
test_non_reentrant_checkpointing_replays_the_forward_dispatch_layout
A non-reentrant recompute keeps the forward's nodes and handle, so it must reuse that layout. DeepEP's received order depends on arrival timi
tests/unit/v1/moe/test_autoep_deepep_parity.py:629
Method
test_non_reentrant_recompute_reuses_the_handle_and_stops_before_combine
(self)
tests/unit/module_inject/test_auto_ep_comm.py:967
Method
test_non_reentrant_single_count_call
Non-reentrant backward should call count_used_parameters_in_backward exactly once.
tests/unit/v1/zero/test_zero_hook_count_regression.py:55
Method
test_non_scalar_backward
Test that tensor.backward(grad) works correctly by comparing with PyTorch DDP
tests/unit/v1/zero/test_zero_user_backward.py:394
Function
test_non_zero3_generation_uses_native_eos
()
tests/unit/runtime/rollout/test_hybrid_engine_rollout.py:1087
Function
test_noncontiguous_mat_b_is_rejected
A non-contiguous (transposed-view) mat_b must be rejected in favor of trans_b.
tests/unit/v1/ops/triton_ops/test_group_gemm_triton.py:314
Method
test_none_args
(self, base_config)
tests/unit/runtime/test_ds_config_dict.py:539
Function
test_none_contract_clears_previous
(clean_registry)
tests/unit/compile/test_pass_contract.py:59
Function
test_none_mode_creates_no_modal_resources
()
ci/test_torch_latest.py:775
Method
test_none_tp_plan
(self)
tests/unit/runtime/test_tp_plan_extraction.py:81
Method
test_none_tp_plan_falls_back_to_config
(self)
tests/unit/runtime/test_tp_plan_extraction.py:63
Function
test_nonempty_shard_needs_pieces
(side, pieces)
tests/unit/checkpoint/test_affine_transfer_plan.py:566
Method
test_noneven_patches
When num_patches % world_size != 0, the wrapper must still produce correct per-rank output. With 5 patches and world_size=2, rank 0 h
tests/unit/v1/sequence_parallelism/test_autosp_equivalence.py:101
Function
test_nonfolded_autoep_preserves_pipeline_parallel_compatibility
()
tests/unit/v1/moe/test_autoep_autotp_folding_config.py:102
Function
test_nonlong_class_indices_are_rejected_like_the_stock_loss
(backend, device, dtype)
tests/unit/v1/runtime/test_chunked_cross_entropy.py:166
Method
test_nonmember_destroy_preserves_cached_groups
(self)
tests/unit/utils/test_groups.py:199
Function
test_nonpositive_block_rows_are_rejected_at_all_public_entry_points
(backend, device, block_rows)
tests/unit/v1/runtime/test_chunked_cross_entropy.py:142
Method
test_nonreentrant_checkpoint_early_stop_unwinds_for_clean_retry
Non-reentrant early-stop must balance hooks and release replay params for reuse.
tests/unit/v1/zero/test_zero_activation_checkpoint_lifecycle.py:386
Function
test_nonzero_exit_classifies_as_test_and_propagates_the_code
()
ci/test_classify_multirank_exit.py:46
Method
test_noop_when_parameters_missing
Helper must not raise when ``_parameters`` is missing or None.
tests/unit/runtime/zero/test_zero_late_module_attach.py:126
Function
test_normalize_fqn_on_real_dynamo_strings
The deferred-layer comparison is only as good as this function. An unanchored prefix strip turns 'self_attn.q_proj' into '_attn.q_proj', which th
tests/unit/compile/test_tp_compile.py:738
Function
test_normalizes_by_num_items_in_batch_like_hugging_face
(backend, device)
tests/unit/v1/runtime/test_chunked_cross_entropy.py:98
Method
test_not_load_optimizer_state
(self, tmpdir, zero_stage, use_cpu_offload, adam_optimizer)
tests/unit/checkpoint/test_zero_optimizer.py:132
Method
test_not_load_optimizer_state
(self, tmpdir, zero_stage)
tests/unit/checkpoint/test_zero_optimizer.py:518
Method
test_nothing_to_keep
(self, keep, dtype)
tests/unit/v1/half_precision/test_keep_in_fp32_modules.py:110
Function
test_npu_declares_page_alignment
()
tests/unit/v1/pin_memory/test_pin_memory.py:484
Function
test_npu_device_registration_failure_returns_false
(monkeypatch)
tests/unit/v1/pin_memory/test_pin_memory.py:514
Function
test_npu_host_copy_lookup_gates
(monkeypatch)
tests/unit/v1/pin_memory/test_pin_memory.py:554
Function
test_npu_missing_npurt_is_noop
(monkeypatch)
tests/unit/v1/pin_memory/test_pin_memory.py:545
Function
test_npu_register_uses_mapped_flag
(monkeypatch)
tests/unit/v1/pin_memory/test_pin_memory.py:491
Function
test_npu_unregister_failure_raises
(monkeypatch)
tests/unit/v1/pin_memory/test_pin_memory.py:529
Method
test_ns_method_stage3
Verify ns_method works with ZeRO Stage 3.
tests/unit/v1/ops/muon/test_muon.py:146
Method
test_ns_method_training
Verify both ns_method values work end-to-end with DeepSpeed.
tests/unit/v1/ops/muon/test_muon.py:102
Function
test_num_plus_parser
Ensure we catch errors relating to num_nodes/num_gpus + -i/-e being mutually exclusive
tests/unit/launcher/test_run.py:230
Function
test_num_selected_columns_has_nonzero_floor
(num_columns, topk_ratio, expected)
tests/unit/runtime/zenflow/test_zf.py:23
Function
test_nvcc_args_deprecates_env_and_omits_gpu_arch_define
()
tests/unit/ops/deepspeed4science/test_evoformer_attn_builder.py:39
Function
test_nvcc_standard_tracks_torch_cxx_requirement
(torch_version, cuda_version, rocm, expected)
tests/unit/ops/test_op_builder.py:422
Method
test_nvme_checkpointing
(self, tmpdir, param_offload_device, optim_offload_device)
tests/unit/runtime/zero/test_nvme_checkpointing.py:31
Function
test_nvme_master_only_load_copies_only_fp32_swap_files
(tmpdir)
tests/unit/checkpoint/test_fp32_master_only.py:247
Method
test_odd_world_size
( self, model_w_task, query, inf_kwargs, assert_fn, dtype,
tests/unit/inference/test_inference.py:621
Method
test_offload_activation_correctness
(self, dtype, gradient_accumulation_steps)
tests/unit/v1/compile/test_offload_activation.py:929
Function
test_offload_adam_states_requires_for_init
(builtin_registry)
tests/unit/compile/test_pass_contract.py:186
Function
test_offload_adam_states_variants_conflict
(builtin_registry)
tests/unit/compile/test_pass_contract.py:196
Function
test_offload_and_zenflow_combined
offload_optimizer and zenflow can be used together under stage 2 without validation errors.
tests/unit/runtime/zenflow/test_zf_config.py:81
Function
test_offload_first_use_after_another_backward_starts_fresh
(monkeypatch, low_precision, first_boundary, overflow)
tests/unit/v1/zero/test_zero2_gradient_safety.py:453
Function
test_offload_helper_pin_pattern_native
Empty scratch pin used by offload_optimizer_states must be is_pinned under native.
tests/unit/v1/pin_memory/test_offload_route.py:36
Method
test_offload_loss_scale_equivalence
(self, zero_stage)
tests/unit/v1/ops/muon/test_muon.py:483
Function
test_offload_ops_registered_with_ordered_effects
()
tests/unit/v1/compile/test_offload_opt_states.py:128
Method
test_offload_opt_in_changes_the_update
If the offload path silently ignored `muon_num_heads`, every offloaded parameter would fall back to whole-matrix orthogonalization regardless
tests/unit/v1/ops/muon/test_per_head_muon_accelerator.py:284
Function
test_offload_opt_states_conflict_with_zero1_and_2
(builtin_registry)
tests/unit/compile/test_pass_contract.py:177
Method
test_offload_opt_states_correctness
(self, dtype)
tests/unit/v1/compile/test_offload_opt_states.py:288
Method
test_offload_optimizer
(self, offload_optimizer)
tests/unit/v1/zero/test_zero.py:984
Function
test_offload_optimizer_config_from_dict
A dict for offload_optimizer should be coerced into DeepSpeedZeroOffloadOptimizerConfig.
tests/unit/runtime/zenflow/test_zf_config.py:22
Function
test_offload_optimizer_states_native_is_pinned
offload_optimizer_states must route through accelerator pin_memory.
tests/unit/v1/pin_memory/test_offload_route.py:48
Function
test_offload_parameters_requires_zero3
(builtin_registry)
tests/unit/compile/test_pass_contract.py:203
Function
test_offload_targets_conflict
(builtin_registry)
tests/unit/compile/test_pass_contract.py:167
Method
test_offloaded_gradient_accumulation_matches_one_large_micro_batch
(self, save_muon_momentum_buffer_in_memory)
tests/unit/v1/ops/muon/test_muon_zero3_grad_accum.py:169
Method
test_offset_read
(self, tmpdir, file_partitions)
tests/unit/v1/nvme/test_gds.py:329
Method
test_offset_read
(self, tmpdir, file_partitions, use_cuda_pinned_tensor)
tests/unit/v1/nvme/test_aio.py:385
Method
test_offset_write
(self, tmpdir, use_fd, file_partitions)
tests/unit/v1/nvme/test_gds.py:283
Method
test_offset_write
(self, tmpdir, file_partitions, use_cuda_pinned_tensor, use_fd)
tests/unit/v1/nvme/test_aio.py:336
Method
test_old_torch_nccl_warns_but_does_not_block
(self)
tests/unit/module_inject/test_auto_ep_comm.py:271
Function
test_older_aot_restore_does_not_clobber_newer_patch
()
tests/unit/compile/test_backend.py:142
Method
test_omit_log_level_defaults_to_warning
(self)
tests/unit/v1/test_engine_log_level.py:70
Method
test_on_device
(self, device)
tests/unit/utils/test_init_on_device.py:19
Method
test_one
(self, number)
tests/unit/comm/test_dist.py:61
Function
test_one_answer_per_request_is_required
()
tests/unit/checkpoint/test_affine_replica_policy.py:289
Function
test_one_cycle_accepts_per_group_lr_and_momentum_lists
()
tests/unit/runtime/test_lr_schedulers.py:826
Function
test_one_cycle_allows_zero_second_step_size
()
tests/unit/runtime/test_lr_schedulers.py:800
Function
test_one_cycle_rejects_nonpositive_step_sizes
(first, second)
tests/unit/runtime/test_lr_schedulers.py:784
Function
test_one_cycle_rejects_wrong_length_per_group_lists
(kwargs)
tests/unit/runtime/test_lr_schedulers.py:870
Function
test_one_cycle_stair_count_handles_asymmetric_cycle
()
tests/unit/runtime/test_lr_schedulers.py:753
Function
test_one_cycle_stair_count_holds_lr_flat
()
tests/unit/runtime/test_lr_schedulers.py:734
Function
test_one_step_helper_keeps_original_learning_rate_for_default
(row_weighting_impl, expected_lr)
tests/unit/v1/moe/test_autoep_deepep_parity.py:323
Method
test_one_table_broadcast_over_the_batch
(self)
tests/unit/v1/ops/triton_ops/test_fused_rotary_pos_emb.py:142
Method
test_only_bfloat16_is_in_the_supported_set
(self)
tests/unit/module_inject/test_auto_ep_comm.py:115
Function
test_only_buffer_consumers_replace_reuse_event
(monkeypatch, bucket_size, elements)
tests/unit/v1/zero/test_zero2_gradient_safety.py:320
Method
test_only_first_projection_is_recorded
Multiple projection-like names → only the outermost is recorded.
deepspeed/sequence/test_autosp.py:143
Method
test_only_metadata_copy_uses_side_stream
(self, monkeypatch, async_split_layer)
tests/unit/v1/moe/test_autoep_unit.py:1896
Function
test_only_required_fields
Ensure that config containing only the required fields is accepted.
tests/unit/runtime/test_ds_config_model.py:29
Method
test_only_the_given_module_tree_is_released
(self)
tests/unit/module_inject/test_auto_ep_comm.py:240
Function
test_op_builder_resolves_from_klxpu_dir
()
tests/unit/v1/accelerator/test_klxpu_accelerator.py:48
Function
test_openmpi_runner
(runner_info)
tests/unit/launcher/test_multinode_runner.py:32
Method
test_opt_in_is_off_by_default
(self, zero_stage)
tests/unit/v1/ops/muon/test_per_head_muon_accelerator.py:260
Function
test_opt_in_is_required
()
tests/unit/runtime/zero/test_per_head_muon.py:237
Method
test_optimizer
(self, tmpdir, pipeline)
tests/unit/v1/zero/test_zero3_nvme_offload.py:101
Method
test_optimizer_offload_rejects_disabled_norm
(self)
tests/unit/runtime/zero/test_zero1_optimizer_fastpath.py:156
Method
test_optimizer_over_a_superset_of_the_model_is_untouched
AutoEP off, and the optimizer holds a parameter that is not in the model. "The optimizer holds something the module tree does not" is true he
tests/unit/v1/moe/test_autoep_unit.py:2705
Method
test_optimizer_scheduler
(self)
tests/model/Megatron_GPT2/run_func_test.py:421
Method
test_original_module_preserved_inside_wrapper
The wrapped module should still be accessible inside the wrapper.
deepspeed/sequence/test_autosp.py:265
Method
test_orthogonal_groups_match_torch
(self)
tests/unit/v1/sequence_parallelism/test_vocab_parallel_cross_entropy.py:298
Function
test_other_schedules_keep_their_config_params
()
tests/unit/runtime/test_lr_schedulers.py:942
Method
test_outgrowing_the_buffer_names_the_remedy
(self)
tests/unit/module_inject/test_auto_ep_comm.py:682
Function
test_output_dtype_conversion_preserves_shared_tensors
()
tests/unit/checkpoint/test_convert_checkpoint.py:26
Function
test_output_dtype_preserves_nonfloating_buffers
(dtype, return_empty_tensor)
tests/unit/checkpoint/test_convert_checkpoint.py:44
Method
test_output_equals_single_device
Each rank's local output slice must match the corresponding slice of the single-device output.
tests/unit/v1/sequence_parallelism/test_autosp_equivalence.py:54
Function
test_output_path_cannot_escape_or_replace_trusted_checkout
()
ci/test_tests_fetcher.py:617
Function
test_output_projection_is_left_alone
o_proj is `[hidden, num_heads * head_dim]` - its heads are on the input axis. The split is on dim 0, so tagging it would cut across the wrong axi
tests/unit/runtime/zero/test_per_head_muon.py:182
Method
test_output_shape
Output local_len must equal ceil(fused_len / world_size).
deepspeed/sequence/test_autosp.py:300
Method
test_output_shape_matches_input
Output shape must equal input shape for any padding scenario.
deepspeed/sequence/test_autosp.py:174
← previous
next →
13,101–13,200 of 14,579, ranked by callers