MCPcopy Create free account

hub / github.com/deepspeedai/DeepSpeed / functions

Functions11,258 in github.com/deepspeedai/DeepSpeed

↓ 4 callersFunctionmaybe_loss_for_backward
Check if the value is a loss tensor. Conditions: - The value must be a tensor. - The tensor must have exactly one element. - The tenso
deepspeed/runtime/utils.py:1250
↓ 4 callersFunctionmerge_state
(state_a, state_b, key_list=[])
deepspeed/checkpoint/reshape_utils.py:100
↓ 4 callersMethodmetric
(self)
deepspeed/autotuning/autotuner.py:238
↓ 4 callersFunctionmove_to_device
Move tensor on to specified device by changing the storage. Works on individual tensors, and tensors contained/nested in lists, tuples, and d
deepspeed/runtime/utils.py:188
↓ 4 callersMethodnan_to_num
(self, x)
deepspeed/runtime/eigenvalue.py:40
↓ 4 callersFunctionnhwc_bias_add
(activation: torch.Tensor, bias: torch.Tensor, other: Optional[torch.Tenso
deepspeed/ops/transformer/inference/bias_add.py:13
↓ 4 callersMethodpack
(self, buffer, size)
deepspeed/runtime/comm/compressed.py:48
↓ 4 callersMethodparallel_for
Split [0, total) into one chunk per thread. Chunk boundaries are rounded up to a multiple of `align` so each slice's AVX/scalar split lines up with th
csrc/adam/cpu_adam_impl.cpp:406
↓ 4 callersFunctionparse_args
(args=None)
deepspeed/launcher/runner.py:48
↓ 4 callersFunctionpartition_uniform
(num_items, num_parts)
deepspeed/runtime/utils.py:606
↓ 4 callersMethodpostscale_gradients
(self)
deepspeed/runtime/engine.py:1367
↓ 4 callersFunctionprint_object
(obj, name, exclude_list=[])
deepspeed/runtime/swap_tensor/utils.py:29
↓ 4 callersFunctionprint_rank_0
(message)
deepspeed/runtime/zero/contiguous_memory_allocator.py:11
↓ 4 callersFunctionprint_rank_0
(message, debug=False, force=False)
deepspeed/runtime/swap_tensor/partitioned_param_swapper.py:21
↓ 4 callersMethodpwrite
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:313
↓ 4 callersFunctionquantization_test_helper
(pre_quant_type: torch.dtype, num_bits: int)
tests/unit/inference/quantization/test_intX_quantization.py:36
↓ 4 callersMethodquantize
(self, input, q_bits=8, q_mantisa_bits=3,
deepspeed/ops/fp_quantizer/quantize.py:58
↓ 4 callersMethodrecord_forward_graph
Record a grad-bearing forward whose fallback gathers must survive until backward.
deepspeed/compile/z3_eager_fallback.py:163
↓ 4 callersFunctionrecursive_setattr
Recursively set the attribute of a module. Args: model (`torch.nn.Module`) The model to set the attribute in. mod
deepspeed/compression/helper.py:33
↓ 4 callersMethodreduce_ready_partitions_and_remove_grads
(self, param)
deepspeed/runtime/zero/stage3.py:1934
↓ 4 callersFunctionreference_geglu_implementation
(input: torch.Tensor, bias: Optional[torch.Tensor] = None,
tests/unit/inference/v2/kernels/core_ops/test_gated_activation.py:17
↓ 4 callersFunctionregister_external_parameter
Instruct DeepSpeed to coordinate ``parameter``'s collection and partitioning in the forward and backward passes of ``module``. This is used w
deepspeed/runtime/zero/partition_parameters.py:144
↓ 4 callersFunctionreport_file_error
csrc/aio/common/deepspeed_aio_common.cpp:260
↓ 4 callersMethodreport_ipg_memory_usage
(self, tag, param_elems, dtype=None)
deepspeed/runtime/base_optimizer.py:365
↓ 4 callersMethodreset_cpu_buffers
(self)
deepspeed/runtime/zero/stage3.py:2308
↓ 4 callersFunctionrotary_pos_embs
(q: torch.Tensor, k: torch.Tensor, seq_descs: List[DSSequenceDescripto
tests/unit/inference/v2/kernels/ragged_ops/test_blocked_rotary_emb.py:24
↓ 4 callersMethodrun
Run the graph with profiling enabled. args: inputs to the graph. Tensors in the inpusts must be real tensors, not fake tensors. args can cont
deepspeed/compile/profilers/graph_profile.py:152
↓ 4 callersMethodrun
(self, *args)
deepspeed/compile/profilers/graph_profile.py:322
↓ 4 callersFunctionrun_fragmented_model
(model, config_dict, hidden_dim, dtype, validate_after_bwd, validate_after_step)
tests/unit/runtime/zero/test_zero_tensor_fragment.py:73
↓ 4 callersFunctionrun_frozen_checkpoint_comparison
Shared driver for the frozen-param + checkpoint regression tests. Each iteration checks: (1) backward runs without CheckpointError, (2) grads mat
tests/unit/v1/zero/test_zero_user_backward.py:254
↓ 4 callersMethodrun_test
(self, test_config)
tests/model/Megatron_GPT2/run_perf_baseline.py:84
↓ 4 callersMethodrun_test
(self, test_config)
tests/model/Megatron_GPT2/run_perf_test.py:88
↓ 4 callersMethodschedule_experiments
(self, exp_paths)
deepspeed/autotuning/scheduler.py:58
↓ 4 callersFunctionset_log_level_from_string
Sets a log level in the passed `logger` and its handlers from string. e.g. "info" => `logging.INFO` Args: log_level_str: one of 'debug',
deepspeed/utils/logging.py:193
↓ 4 callersFunctionshard_attn_out_param
Utility method for sharding an attention output parameter.
deepspeed/inference/v2/model_implementations/sharding/attn_out.py:14
↓ 4 callersFunctionshard_mlp_1_param
Utility method for sharding an MLP 1 parameter. Both biases and weights are supported, as well as for fused weights for MoE. Args:
deepspeed/inference/v2/model_implementations/sharding/mlp.py:14
↓ 4 callersFunctionshard_mlp_2_param
Utility method for sharding an MLP 2 parameter. Args: param (torch.Tensor): The parameter to shard. shard_rank (int): Which
deepspeed/inference/v2/model_implementations/sharding/mlp.py:42
↓ 4 callersMethodsources
Returns list of source files for your op, relative to root of deepspeed package (i.e., DeepSpeed/deepspeed)
op_builder/builder.py:140
↓ 4 callersMethodstep
(self, last_batch_iteration=None)
deepspeed/runtime/lr_schedules.py:900
↓ 4 callersMethodswap_in
(self, aio_handle, async_op=False)
deepspeed/runtime/swap_tensor/utils.py:163
↓ 4 callersMethodsync_pwrite
csrc/aio/py_lib/deepspeed_py_io_handle.cpp:336
↓ 4 callersMethodto
Move the parameter to the given device. Then, if the device is a cuda device, quantize it.
deepspeed/linear/quantization.py:118
↓ 4 callersMethodto_dense
(self)
deepspeed/runtime/sparse_tensor.py:42
↓ 4 callersFunctiontop2gating
Implements Top2Gating on logits.
deepspeed/moe/sharded_moe.py:341
↓ 4 callersMethodtransform
(self, param: torch.Tensor)
tests/unit/inference/v2/model_implementations/parameters/utils.py:55
↓ 4 callersMethodtransform_qkv_param
Passes a QKV parameter to the underlying implementation for any necessary transformations. Args: param (torch.Te
deepspeed/inference/v2/model_implementations/inference_transformer_base.py:304
↓ 4 callersMethodtranspose_impl
(self, data)
deepspeed/module_inject/containers/base.py:298
↓ 4 callersFunctiontrim_mean
Compute the trimmed mean of a list of numbers. Args: data (list): List of numbers. trim_percent (float): Percentage of data to tr
deepspeed/utils/timer.py:296
↓ 4 callersMethodupdate_difficulty
(self, global_steps)
deepspeed/runtime/data_pipeline/curriculum_scheduler.py:155
↓ 4 callersMethodupdate_linear_policies
(self)
deepspeed/module_inject/auto_tp.py:615
↓ 4 callersMethodupdate_state
csrc/includes/cpu_lion.h:55
↓ 4 callersFunctionvalidate_inferred_shape
Validate that the leading dim of the shard is of the expected size and aligns with the sharding logic for the attention computation itself.
tests/unit/inference/v2/model_implementations/sharding/test_qkv_sharding.py:31
↓ 4 callersMethodwait
(self, **kwargs)
deepspeed/runtime/zero/partition_parameters.py:74
↓ 4 callersFunctionwarn_consumer_ssd_writes
csrc/aio/py_lib/deepspeed_aio_op_desc.cpp:25
↓ 4 callersFunctionwarp_uniform
csrc/deepspeed4science/evoformer_attn/gemm_kernel_utils.h:217
↓ 4 callersMethodzero_offload_optimizer
(self)
deepspeed/runtime/engine.py:1179
↓ 4 callersMethodzero_reduce_bucket_size
(self)
deepspeed/runtime/engine.py:1221
↓ 4 callersMethodzero_use_cpu_optimizer
(self)
deepspeed/runtime/engine.py:1185
↓ 3 callersMethodFloatTensor
(self, values)
tests/unit/v1/moe/test_autoep_unit.py:532
↓ 3 callersMethodGetMaxTokenLength
csrc/transformer/inference/includes/inference_context.h:183
↓ 3 callersMethodIntTensor
(self)
accelerator/hpu_accelerator.py:227
↓ 3 callersMethodQuantize
(self, value_list, quantize_bits, groups, key, merge_dim=0)
deepspeed/runtime/weight_quantizer.py:42
↓ 3 callersMethod__init__
(self, hidden_size=64)
tests/unit/v1/moe/test_autoep_unit.py:147
↓ 3 callersMethod__init__
(self, *args)
tests/unit/runtime/zero/test_zero_context_ancestry.py:46
↓ 3 callersMethod__init__
(self)
tests/unit/module_inject/test_tp_partition_config_path.py:20
↓ 3 callersMethod__init__
(self, num_layers=3)
deepspeed/sequence/test_autosp.py:74
↓ 3 callersMethod__init__
(self, params, lr=0.02, weight_decay=0, momentum=0.95, ns_method="gram")
deepspeed/runtime/zero/muon/original_muon.py:191
↓ 3 callersFunction_add
(graph, lhs, rhs, name, device_time=0)
tests/unit/compile/test_list_schedule.py:120
↓ 3 callersFunction_apply_dtype_to_config
Set bf16/fp16 in config_dict based on dtype; skip if not supported.
tests/unit/v1/zero/test_stage2_flatten_on_gpu.py:21
↓ 3 callersFunction_assert_forward_runs
(engine)
tests/unit/v1/moe/test_autoep_checkpoint.py:289
↓ 3 callersFunction_assert_no_secondary_tensor_group
(model: Module)
tests/unit/runtime/zero/test_zeropp.py:43
↓ 3 callersFunction_assert_nonzero_named_grad
(engine, *name_fragments)
tests/unit/v1/moe/test_autoep_autotp_runtime.py:162
↓ 3 callersFunction_assert_partition_status
(model: Module, valid_statuses: Set[ZeroParamStatus])
tests/unit/v1/zero/test_zero.py:503
↓ 3 callersFunction_assert_secondary_tensor_size
(model: Module)
tests/unit/runtime/zero/test_zeropp.py:56
↓ 3 callersMethod_autoep_expert_parallel_group
(self, params)
deepspeed/runtime/zero/stage3.py:626
↓ 3 callersFunction_autoep_expert_param_info
(autoep_metadata)
deepspeed/checkpoint/ds_to_universal.py:517
↓ 3 callersMethod_backward_epilogue
(self)
deepspeed/runtime/engine.py:2916
↓ 3 callersFunction_bias_activation_test_helper
Fully parameterized testing entry point.
tests/unit/inference/v2/kernels/core_ops/test_bias_activation.py:38
↓ 3 callersFunction_build_config
Partition config that matches q_proj and o_proj via regex.
tests/unit/module_inject/test_tp_partition_config_path.py:56
↓ 3 callersFunction_build_gathered_lm_head_autotp
(model, mp_size=1)
tests/unit/module_inject/test_tp_partition_config_path.py:138
↓ 3 callersFunction_build_overlap_optimizer
(monkeypatch, *, resolves_data_dependency)
tests/unit/v1/zero/test_overlap_comm_record_stream.py:49
↓ 3 callersFunction_build_param_uc_restore_meta
Build the restore-facing parameter UC metadata. Restore metadata stays on the parameter object and may include details that are intentionally
deepspeed/module_inject/layers.py:60
↓ 3 callersFunction_capacity
(gates: Tensor, capacity_factor: Tensor, min_capacity: Tensor)
deepspeed/moe/sharded_moe.py:162
↓ 3 callersFunction_capture_matched_names
Run _replace_module and capture full_name values that match a spec.
tests/unit/module_inject/test_tp_partition_config_path.py:64
↓ 3 callersMethod_check_process_alive
Check if the checkpoint process is still alive. Note: Only call this when self.ckpt_process is not None. Some ranks don't have a chec
deepspeed/runtime/checkpoint_engine/decoupled_checkpoint_engine.py:120
↓ 3 callersFunction_collect_by_ep_rank
(local_tensor, ep_rank, ep_size, device)
tests/unit/v1/moe/test_autoep_checkpoint.py:155
↓ 3 callersFunction_compiler
(name)
tests/unit/compile/test_inductor_aot_kwargs.py:9
↓ 3 callersMethod_config
(self, zero_stage, buffer_dtype=None)
tests/unit/v1/half_precision/test_mixed_precision_dtype.py:103
↓ 3 callersFunction_config_dtype
(config)
tests/unit/v1/zero/test_zero_coalesce_grad_reduction.py:86
↓ 3 callersFunction_convert_checkpoint_to_universal
(save_dir, tag)
tests/unit/v1/moe/test_autoep_checkpoint.py:36
↓ 3 callersFunction_count_type
(cmds, classtype)
tests/unit/runtime/pipe/test_pipe_schedule.py:10
↓ 3 callersMethod_create_momentum_buffer
(self, num_elements, i, ds_id)
deepspeed/runtime/zero/stage3.py:983
↓ 3 callersMethod_device
(self)
tests/torch_compile/test_deepcompile_z3_release.py:25
↓ 3 callersFunction_dist_allgather_fn
(input_tensor: Tensor, output_tensor: Tensor, group=None)
deepspeed/runtime/zero/partition_parameters.py:110
↓ 3 callersFunction_drop_tokens
Divide a tensor among the tensor parallel ranks
deepspeed/moe/mappings.py:56
↓ 3 callersMethod_drop_tracked_param
(self, ds_id, param)
deepspeed/compile/z3_eager_fallback.py:128
↓ 3 callersMethod_dump_state
(self)
deepspeed/io/fast_file_writer.py:174
↓ 3 callersMethod_enable_universal_checkpoint
(self)
deepspeed/runtime/bf16_optimizer.py:232
↓ 3 callersMethod_engine
(self, param_dtype=None, fp16=False, bf16=False)
tests/unit/v1/half_precision/test_mixed_precision_dtype.py:52
↓ 3 callersMethod_ensure_availability_of_partitioned_params
(self, params)
deepspeed/runtime/zero/partition_parameters.py:1662
← previousnext →801–900 of 11,258, ranked by callers