AI Slop Code RIsk Monitor

deepspeedai/DeepSpeed

DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.

18.2 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for deepspeedai/DeepSpeed, a Python project with 43,218 GitHub stars. SynthScan examined 357,348 lines of code across 1629 source files, recording 5051 pattern matches distributed across 23 syntactic categories. The legacy adjusted pattern signal is 18.2 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

18.2
Adjusted Signal
18.2
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
43.2K
Stars
Python
Language
357.3K
Lines of Code
1.6K
Files
5.1K
Pattern Hits
2026-10-12
Scan Date
0.15
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 40.9/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 3736 finding(s).

Hallucinated Dependency & Supply Chain Risk 11.3/100 · LOW

Are imports declared and package/API names verified? 773 finding(s).

Agent Over-Engineering Ratio 49.4/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 3600 finding(s).

PR Review Velocity Impact 61.3/100 · HIGH

Which changes need focused human review? 5051 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 10HIGH 228MEDIUM 256LOW 4557

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 5051 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers2974 hits · 2903 pts
SeverityFileLineSnippetContext
LOWcsrc/aio/py_test/io_engine.py119def io_engine_multiprocessing(args, read_op):CODE
LOWcsrc/aio/py_test/test_ds_aio_utils.py86def create_page_locked_tensor(num_elem, use_accelerator, aio_handle=None):CODE
LOWdeepspeed/compat.py23def get_annotations_from_namespace(namespace: Mapping[str, object]) -> Dict[str, Any]:CODE
LOWdeepspeed/__init__.py295def _resolve_attention_head_count(param_name: str, param: torch.Tensor, meta, text_config, owners=None):CODE
LOWdeepspeed/__init__.py385def resolve_per_head_muon_after_sharding(model: torch.nn.Module) -> None:CODE
LOWdeepspeed/launcher/runner.py257def _stable_remove_duplicates(data):STRING
LOWdeepspeed/launcher/runner.py373def parse_inclusion_exclusion(resource_pool, inclusion, exclusion):STRING
LOWdeepspeed/launcher/multinode_runner.py55 def validate_active_resources(cls, active_resources):CODE
LOWdeepspeed/launcher/multinode_runner.py365 def validate_active_resources(cls, active_resources):CODE
LOWdeepspeed/model_implementations/diffusers/vae.py37 def _create_cuda_graph_decoder(self, *inputs, **kwargs):CODE
LOWdeepspeed/model_implementations/diffusers/vae.py80 def _create_cuda_graph_encoder(self, *inputs, **kwargs):CODE
LOW…eed/model_implementations/transformers/clip_encoder.py27 def _build_causal_attention_mask(self, bsz, seq_len, dtype):CODE
LOWdeepspeed/module_inject/auto_ep_layer.py110def resolve_row_weighting_impl(config_override: Literal["auto", "eager", "fused"]) -> Literal["eager", "fused"]:CODE
LOWdeepspeed/module_inject/auto_ep_layer.py130def _copy_e_score_correction_bias(CODE
LOWdeepspeed/module_inject/auto_ep_layer.py157def apply_scores_before_experts_if_enabled(CODE
LOWdeepspeed/module_inject/auto_ep_layer.py179def _split_plan_from_expert_counts(CODE
LOWdeepspeed/module_inject/auto_ep_layer.py219def _get_async_split_plan_stream(device_index: int):CODE
LOWdeepspeed/module_inject/auto_ep_layer.py223def _start_async_split_plan_from_expert_counts(CODE
LOWdeepspeed/module_inject/auto_ep_layer.py305def compute_split_plan_from_expert_indices(CODE
LOWdeepspeed/module_inject/auto_ep_layer.py435def unpermute_by_local_expert(CODE
LOWdeepspeed/module_inject/auto_ep_layer.py756 def set_deepspeed_parallelism(CODE
LOWdeepspeed/module_inject/auto_ep_layer.py1123def collect_replacement_sources(source_module, replacement, spec, ep_size, ep_rank):CODE
LOWdeepspeed/module_inject/auto_tp.py395 def set_tensor_parallel_config(self, mp_size, mp_group):CODE
LOWdeepspeed/module_inject/auto_tp.py547 def _create_row_parallel_layer(self, module, spec: TPLayerSpec, name: str):CODE
LOWdeepspeed/module_inject/auto_tp.py578 def _create_column_parallel_layer(self, module, spec: TPLayerSpec, name: str):CODE
LOWdeepspeed/module_inject/auto_tp.py603 def _find_tied_weight_partners(self):CODE
LOWdeepspeed/module_inject/auto_tp.py617 def _find_tied_row_parallel_embedding_ids(self):CODE
LOWdeepspeed/module_inject/auto_tp.py635 def _validate_row_parallel_head_ties(self, head):CODE
LOWdeepspeed/module_inject/auto_tp.py645 def _replace_tied_row_parallel_embeddings(self, row_parallel_head, tied_embeddings):CODE
LOWdeepspeed/module_inject/auto_tp.py673 def _default_lm_head_patterns():CODE
LOWdeepspeed/module_inject/auto_tp.py688 def _is_vocab_parallel_lm_head(self, child, name):CODE
LOWdeepspeed/module_inject/auto_tp.py693 def _create_vocab_parallel_layer(self, child, name):CODE
LOWdeepspeed/module_inject/auto_tp.py722 def _find_tied_embedding_modules(self, lm_head):CODE
LOWdeepspeed/module_inject/auto_tp.py739 def _validate_vocab_parallel_layer(self, child, name):CODE
LOWdeepspeed/module_inject/auto_tp.py750 def _warn_overridden_lm_head_spec(self, name):CODE
LOWdeepspeed/module_inject/auto_tp.py763 def _warn_overridden_embedding_spec(self, name):CODE
LOWdeepspeed/module_inject/auto_tp.py780 def _resolve_vocab_parallel_lm_head(self):CODE
LOWdeepspeed/module_inject/auto_tp.py802 def _replace_vocab_parallel_lm_head(self):CODE
LOWdeepspeed/module_inject/auto_tp.py808 def _configure_gathered_column_tie_fallbacks(self):CODE
LOWdeepspeed/module_inject/auto_tp.py931 def register_replicated_grad_hooks(self, model):CODE
LOWdeepspeed/module_inject/auto_tp.py1018 def _replace_autoep_shared_experts(self, autoep_layer, autoep_name):CODE
LOWdeepspeed/module_inject/auto_tp.py1108 def _replace_last_linear_module(self, r_module):CODE
LOWdeepspeed/module_inject/fusedqkv_utils.py10def split_by_qkvlist_and_refuse(qkv_list, split_size, split_dim=0, cat_dim=0):CODE
LOWdeepspeed/module_inject/fusedqkv_utils.py86def set_fused_qkv_shard_state(module, shard_widths, tp_index):CODE
LOWdeepspeed/module_inject/fusedqkv_utils.py239def shard_value_with_share_qk(CODE
LOWdeepspeed/module_inject/auto_ep_folding.py130def expected_folding_group_tables(spec: ParallelFoldingSpec) -> FoldingGroupTables:CODE
LOWdeepspeed/module_inject/auto_ep_folding.py261def mark_autoep_folding_router_parameter(param) -> None:CODE
LOWdeepspeed/module_inject/auto_ep_folding.py277def mark_autoep_folding_partial_router_parameter(param) -> None:CODE
LOWdeepspeed/module_inject/auto_ep_folding.py294def mark_autoep_folding_sp_sharded_layernorm_parameter(param) -> None:CODE
LOWdeepspeed/module_inject/auto_ep_folding.py314def _is_model_parallel_param_marker(param) -> bool:CODE
LOWdeepspeed/module_inject/auto_ep_folding.py318def _autoep_folding_param_family(param, *, param_name: str | None = None) -> str | None:CODE
LOWdeepspeed/module_inject/auto_ep_folding.py337def autoep_folding_gradient_reduction_strategy(CODE
LOWdeepspeed/module_inject/auto_ep_folding.py421def reduce_autoep_folding_gradient(CODE
LOW⚡deepspeed/module_inject/auto_ep_folding.py461def is_autoep_folding_gradient_corrected(param) -> bool:CODE
LOW⚡deepspeed/module_inject/auto_ep_folding.py465def clear_autoep_folding_gradient_corrected(param) -> None:CODE
LOW⚡deepspeed/module_inject/auto_ep_folding.py470def apply_folding_correction_to_grad_buffer(CODE
LOWdeepspeed/module_inject/auto_ep_folding.py492def assert_group_matches_spec(existing_rank_lists, spec: ParallelFoldingSpec, *, group_kind: str = "ep_edp") -> None:CODE
LOWdeepspeed/module_inject/auto_ep.py44def _remove_transformers_output_capture_hooks(model: nn.Module) -> int:CODE
LOWdeepspeed/module_inject/auto_ep.py73def _raise_if_duplicate_moe_specs(specs: list[MoELayerSpec]) -> None:CODE
LOWdeepspeed/module_inject/auto_ep.py89def _resolve_e_score_correction_bias_path(moe_module: nn.Module, module_name: str) -> str | None:CODE
2914 more matches not shown…
Unused Imports733 hits · 712 pts
SeverityFileLineSnippetContext
LOWcsrc/aio/py_test/torch_io.py10CODE
LOWcsrc/aio/py_test/ds_aio_basic.py13CODE
LOWcsrc/aio/py_test/ds_aio_handle.py11CODE
LOWcsrc/aio/py_test/torch_fastio_engine.py11CODE
LOWdeepspeed/git_version_info.py8CODE
LOWdeepspeed/__init__.py17CODE
LOWdeepspeed/__init__.py18CODE
LOWdeepspeed/__init__.py36CODE
LOWdeepspeed/__init__.py37CODE
LOWdeepspeed/__init__.py42CODE
LOWdeepspeed/__init__.py42CODE
LOWdeepspeed/__init__.py50CODE
LOWdeepspeed/__init__.py51CODE
LOWdeepspeed/__init__.py52CODE
LOWdeepspeed/__init__.py53CODE
LOWdeepspeed/__init__.py53CODE
LOWdeepspeed/__init__.py54CODE
LOWdeepspeed/__init__.py54CODE
LOWdeepspeed/__init__.py56CODE
LOWdeepspeed/__init__.py59CODE
LOWdeepspeed/__init__.py60CODE
LOWdeepspeed/__init__.py29CODE
LOWdeepspeed/model_implementations/__init__.py6CODE
LOWdeepspeed/model_implementations/__init__.py7CODE
LOWdeepspeed/pipe/__init__.py6CODE
LOWdeepspeed/pipe/__init__.py6CODE
LOWdeepspeed/pipe/__init__.py6CODE
LOWdeepspeed/pipe/__init__.py7CODE
LOWdeepspeed/module_inject/auto_ep_layer.py15CODE
LOWdeepspeed/module_inject/auto_tp.py15CODE
LOWdeepspeed/module_inject/auto_ep_folding.py11CODE
LOWdeepspeed/module_inject/__init__.py6CODE
LOWdeepspeed/module_inject/__init__.py6CODE
LOWdeepspeed/module_inject/__init__.py6CODE
LOWdeepspeed/module_inject/__init__.py6CODE
LOWdeepspeed/module_inject/__init__.py6CODE
LOWdeepspeed/module_inject/__init__.py7CODE
LOWdeepspeed/module_inject/__init__.py8CODE
LOWdeepspeed/module_inject/__init__.py9CODE
LOWdeepspeed/module_inject/__init__.py9CODE
LOWdeepspeed/module_inject/__init__.py9CODE
LOWdeepspeed/module_inject/__init__.py9CODE
LOWdeepspeed/module_inject/__init__.py9CODE
LOWdeepspeed/module_inject/__init__.py9CODE
LOWdeepspeed/module_inject/__init__.py9CODE
LOWdeepspeed/module_inject/__init__.py10CODE
LOWdeepspeed/module_inject/__init__.py11CODE
LOWdeepspeed/module_inject/__init__.py11CODE
LOWdeepspeed/module_inject/__init__.py11CODE
LOWdeepspeed/module_inject/__init__.py11CODE
LOWdeepspeed/module_inject/__init__.py11CODE
LOWdeepspeed/module_inject/auto_ep.py11CODE
LOWdeepspeed/module_inject/auto_ep_config.py7CODE
LOWdeepspeed/module_inject/auto_ep_config.py9CODE
LOWdeepspeed/module_inject/auto_ep_config.py16CODE
LOWdeepspeed/module_inject/auto_ep_comm.py22CODE
LOWdeepspeed/module_inject/auto_ep_preset_adapters.py5CODE
LOWdeepspeed/module_inject/auto_ep_preset_adapters.py5CODE
LOWdeepspeed/module_inject/auto_ep_preset_adapters.py5CODE
LOWdeepspeed/module_inject/auto_ep_preset_adapters.py5CODE
673 more matches not shown…
Cross-File Repetition142 hits · 710 pts
SeverityFileLineSnippetContext
HIGHcsrc/aio/py_test/aio_bench_generate_param.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/ds_aio_args.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/test_ds_aio_utils.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/validate_async_io.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/test_ds_aio.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/aio_bench_perf_sweep.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/ds_aio_basic.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/parse_aio_stats.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/gds/py_test/validate_gds.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/ds_aio_args.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/test_ds_aio_utils.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/validate_async_io.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/test_ds_aio.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/perf_generate_param.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/ds_aio_basic.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/ds_aio_handle.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/parse_nvme_stats.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/perf_run_sweep.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGH…eed/runtime/swap_tensor/pipelined_optimizer_swapper.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGH…d/runtime/swap_tensor/partitioned_optimizer_swapper.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHcsrc/aio/py_test/ds_aio_job.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/nvme/ds_aio_job.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/runtime/swap_tensor/optimizer_utils.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGH…speed/runtime/swap_tensor/partitioned_param_swapper.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/runtime/swap_tensor/utils.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/runtime/swap_tensor/async_swapper.py0functionality of swapping tensors to/from (nvme) storage devices.STRING
HIGHdeepspeed/module_inject/containers/gptj.py0necessary to implement for `hybridsplitqkvcontainer`STRING
HIGHdeepspeed/module_inject/containers/opt.py0necessary to implement for `hybridsplitqkvcontainer`STRING
HIGHdeepspeed/module_inject/containers/llama.py0necessary to implement for `hybridsplitqkvcontainer`STRING
HIGHdeepspeed/module_inject/containers/gptneo.py0necessary to implement for `hybridsplitqkvcontainer`STRING
HIGHdeepspeed/module_inject/containers/internlm.py0necessary to implement for `hybridsplitqkvcontainer`STRING
HIGHdeepspeed/module_inject/containers/llama2.py0necessary to implement for `hybridsplitqkvcontainer`STRING
HIGHdeepspeed/module_inject/containers/llama.py0necessary to implement for `hybridgatedmlpcontainer`STRING
HIGHdeepspeed/module_inject/containers/internlm.py0necessary to implement for `hybridgatedmlpcontainer`STRING
HIGHdeepspeed/module_inject/containers/llama2.py0necessary to implement for `hybridgatedmlpcontainer`STRING
HIGHdeepspeed/runtime/tensor_parallel/config.py0number of devices to split the model across using tensor parallelism.STRING
HIGHdeepspeed/inference/config.py0number of devices to split the model across using tensor parallelism.STRING
HIGHdeepspeed/inference/v2/config_v2.py0number of devices to split the model across using tensor parallelism.STRING
HIGHdeepspeed/runtime/tensor_parallel/config.py0configuration for tensor parallelism used to split the model across several gpus. expects a dictionary containing valuesSTRING
HIGHdeepspeed/inference/config.py0configuration for tensor parallelism used to split the model across several gpus. expects a dictionary containing valuesSTRING
HIGHdeepspeed/inference/v2/config_v2.py0configuration for tensor parallelism used to split the model across several gpus. expects a dictionary containing valuesSTRING
HIGHdeepspeed/runtime/zero/stage_1_and_2.py0returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of :STRING
HIGHdeepspeed/runtime/zero/stage3.py0returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of :STRING
HIGHdeepspeed/runtime/fp16/fused_optimizer.py0returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of :STRING
HIGHdeepspeed/runtime/fp16/unfused_optimizer.py0returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of :STRING
HIGHdeepspeed/runtime/zero/stage_1_and_2.py0loads a state_dict created by an earlier call to state_dict(). if ``fp16_optimizer_instance`` was constructed from some STRING
HIGHdeepspeed/runtime/zero/stage3.py0loads a state_dict created by an earlier call to state_dict(). if ``fp16_optimizer_instance`` was constructed from some STRING
HIGHdeepspeed/runtime/fp16/fused_optimizer.py0loads a state_dict created by an earlier call to state_dict(). if ``fp16_optimizer_instance`` was constructed from some STRING
HIGHdeepspeed/runtime/fp16/unfused_optimizer.py0loads a state_dict created by an earlier call to state_dict(). if ``fp16_optimizer_instance`` was constructed from some STRING
HIGH…e/v2/kernels/ragged_ops/blocked_flash/blocked_flash.py0return preferred granulatity for blocked kv-cache implementation.STRING
HIGH…s/implementations/attention/dense_blocked_attention.py0return preferred granulatity for blocked kv-cache implementation.STRING
HIGH…peed/inference/v2/modules/interfaces/attention_base.py0return preferred granulatity for blocked kv-cache implementation.STRING
HIGH…gged_ops/linear_blocked_kv_rotary/blocked_kv_rotary.py0cuda kernel implementation that will perform rotary position embeddings on the queries and keys before copying into a blSTRING
HIGH…ops/linear_blocked_kv_rotary/linear_blocked_kv_copy.py0cuda kernel implementation that will perform rotary position embeddings on the queries and keys before copying into a blSTRING
HIGH…/linear_blocked_kv_rotary/blocked_trained_kv_rotary.py0cuda kernel implementation that will perform rotary position embeddings on the queries and keys before copying into a blSTRING
HIGH…gged_ops/linear_blocked_kv_rotary/blocked_kv_rotary.py0args: head_size: the size of the attention head. dtype: data type for the input/output. supported values are torch.floatSTRING
HIGH…ops/linear_blocked_kv_rotary/linear_blocked_kv_copy.py0args: head_size: the size of the attention head. dtype: data type for the input/output. supported values are torch.floatSTRING
HIGH…/linear_blocked_kv_rotary/blocked_trained_kv_rotary.py0args: head_size: the size of the attention head. dtype: data type for the input/output. supported values are torch.floatSTRING
HIGH…v2/model_implementations/inference_transformer_base.py0the positional embedding configuration for the model.STRING
HIGH…ed/inference/v2/model_implementations/mixtral/model.py0the positional embedding configuration for the model.STRING
82 more matches not shown…
Decorative Section Separators195 hits · 651 pts
SeverityFileLineSnippetContext
MEDIUMdeepspeed/module_inject/auto_ep_layer.py40# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_layer.py42# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_layer.py86# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_layer.py88# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_layer.py501# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_layer.py503# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_config.py37# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_config.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_config.py99# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/module_inject/auto_ep_config.py101# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/runtime/rollout/hybrid_engine_rollout.py968 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/runtime/rollout/hybrid_engine_rollout.py970 # ------------------------------------------------------------------COMMENT
MEDIUM…epspeed/ops/transformer/inference/triton/matmul_ext.py19# -----------------------------------------------------------------------------COMMENT
MEDIUM…epspeed/ops/transformer/inference/triton/matmul_ext.py126# -----------------------------------------------------------------------------COMMENT
MEDIUM…epspeed/ops/transformer/inference/triton/matmul_ext.py471# -----------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/auto_sp.py82 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/auto_sp.py84 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/auto_sp.py96 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/auto_sp.py98 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/auto_sp.py115 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/auto_sp.py117 # ------------------------------------------------------------------COMMENT
MEDIUM⚡deepspeed/sequence/auto_sp.py129# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡deepspeed/sequence/auto_sp.py131# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_detector.py17# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_detector.py19# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_detector.py67# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_detector.py69# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_detector.py84# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_detector.py86# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡deepspeed/sequence/test_autosp.py274# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡deepspeed/sequence/test_autosp.py276# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py28# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py87# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py89# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py109# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py111# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py161# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py163# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py215# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py217# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py393# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py395# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py503# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py505# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py612# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/test_autosp.py614# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py72 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py74 # ------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py104 # -------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py106 # -------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py138 # -------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py140 # -------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py155 # -------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/sequence/autosp_vit.py159 # -------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/moe/ep_experts.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/moe/ep_experts.py35# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/moe/ep_experts.py139# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/moe/ep_experts.py141# ---------------------------------------------------------------------------COMMENT
MEDIUMdeepspeed/moe/ep_experts.py204# ---------------------------------------------------------------------------COMMENT
135 more matches not shown…
Empty Error Handlers77 hits · 385 pts
SeverityFileLineSnippetContext
HIGHdeepspeed/launcher/launch.py128except psutil.NoSuchProcess:CODE
HIGHdeepspeed/launcher/launch.py256except (OSError, psutil.Error):CODE
HIGHdeepspeed/runtime/engine.py1998except ImportError:CODE
HIGHdeepspeed/runtime/engine.py1392except AttributeError:CODE
HIGHdeepspeed/runtime/pipe/module.py438except AttributeError:CODE
HIGHdeepspeed/runtime/swap_tensor/utils.py241except Exception:CODE
HIGHdeepspeed/runtime/zero/utils.py54except ImportError:CODE
HIGHdeepspeed/runtime/zero/utils.py62except ImportError:CODE
HIGHdeepspeed/runtime/zero/muon/muon_optimizer.py12except ImportError:CODE
HIGH…ntime/checkpoint_engine/decoupled_checkpoint_engine.py84except RuntimeError:CODE
HIGH…ntime/checkpoint_engine/decoupled_checkpoint_engine.py116except Exception:CODE
HIGH…ntime/checkpoint_engine/decoupled_checkpoint_engine.py222except Exception:CODE
HIGHdeepspeed/comm/comm.py804except (RuntimeError, ValueError):CODE
HIGHdeepspeed/comm/ccl.py175except (ValueError, RuntimeError):CODE
HIGHdeepspeed/comm/torch.py239except Exception:CODE
HIGHdeepspeed/utils/pin_memory.py135except Exception:CODE
HIGHdeepspeed/compile/patch_fake_tensor.py18except ImportError:CODE
HIGHdeepspeed/compile/backend.py21except ImportError:CODE
HIGHdeepspeed/compile/partitioner.py14except ImportError:CODE
HIGHdeepspeed/compile/util.py18except ImportError:CODE
HIGHdeepspeed/compile/input_storage.py108except Exception as e:CODE
HIGHdeepspeed/compile/input_storage.py129except RuntimeError:CODE
HIGHdeepspeed/compile/input_storage.py98except RuntimeError:CODE
HIGHdeepspeed/compile/list_schedule.py17except ImportError:CODE
HIGHdeepspeed/compile/inductor.py17except ImportError:CODE
HIGHdeepspeed/compile/passes/offload_activation.py20except ImportError:CODE
HIGHdeepspeed/compile/passes/offload_adam_states.py18except ImportError:CODE
HIGHdeepspeed/compile/profilers/comm_profile.py11except ImportError:CODE
HIGHdeepspeed/compile/profilers/graph_profile.py17except ImportError:CODE
HIGHdeepspeed/compile/profilers/graph_profile.py138except Exception:CODE
HIGHdeepspeed/compile/profilers/graph_profile.py182except Exception:CODE
HIGHdeepspeed/profiling/flops_profiler/profiler.py181except ValueError:CODE
HIGHdeepspeed/inference/v2/inference_parameter.py50except (RuntimeError, TypeError, IndexError):CODE
HIGHci/test_tests_fetcher.py573except ValueError:CODE
HIGHci/test_tests_fetcher.py622except ValueError:CODE
HIGHci/test_tests_fetcher.py613except ValueError:CODE
HIGHop_builder/builder.py213except ImportError:CODE
HIGHop_builder/builder.py232except Exception:CODE
HIGHop_builder/mps/fused_adam.py9except ImportError as e:CODE
HIGHop_builder/mps/fused_adam.py134except RuntimeError:CODE
HIGHop_builder/sdaa/fused_adam.py36except ImportError as e:CODE
HIGHop_builder/mlu/fused_adam.py11except ImportError as e:CODE
HIGHop_builder/npu/fused_adam.py11except ImportError as e:CODE
HIGHop_builder/npu/quantizer.py6except ImportError:CODE
HIGHop_builder/npu/builder.py10except ImportError as e:CODE
HIGHop_builder/npu/fused_lion.py6except ImportError:CODE
HIGHop_builder/npu/inference.py12except ImportError as e:CODE
HIGHop_builder/npu/fused_lamb.py8except ImportError:CODE
HIGHop_builder/supa/fused_adam.py9except ImportError:CODE
HIGHop_builder/supa/quantizer.py7except ImportError:CODE
HIGHop_builder/supa/fused_lion.py8except Exception:CODE
HIGHop_builder/supa/inference.py10except ImportError:CODE
HIGHop_builder/supa/fused_lamb.py10except Exception:CODE
HIGHop_builder/hpu/fused_adam.py18except ImportError as e:CODE
HIGHtests/unit/common.py178except FixtureLookupError:CODE
HIGHtests/unit/v1/compile/test_list_schedule.py36except AttributeError:CODE
HIGHtests/unit/launcher/test_ds_arguments.py111except ValueError as e:CODE
HIGHtests/unit/launcher/test_ds_arguments.py120except ValueError as e:CODE
HIGHtests/unit/launcher/test_ds_arguments.py129except ValueError as e:CODE
HIGHtests/unit/runtime/zero/test_zero_leaf_module.py422except RuntimeError as e:CODE
17 more matches not shown…
Deep Nesting378 hits · 334 pts
SeverityFileLineSnippetContext
LOWcsrc/aio/py_test/aio_bench_perf_sweep.py158CODE
LOWcsrc/aio/py_test/parse_aio_stats.py36CODE
LOWcsrc/aio/py_test/parse_aio_stats.py88CODE
LOWdeepspeed/__init__.py351CODE
LOWdeepspeed/env_report.py84CODE
LOWdeepspeed/launcher/runner.py225CODE
LOWdeepspeed/launcher/runner.py292CODE
LOWdeepspeed/launcher/runner.py439CODE
LOWdeepspeed/launcher/launcher_helper.py55CODE
LOWdeepspeed/launcher/launch.py135CODE
LOWdeepspeed/module_inject/auto_ep_layer.py874CODE
LOWdeepspeed/module_inject/auto_tp.py162CODE
LOWdeepspeed/module_inject/auto_tp.py279CODE
LOWdeepspeed/module_inject/auto_tp.py342CODE
LOWdeepspeed/module_inject/auto_tp.py405CODE
LOWdeepspeed/module_inject/auto_tp.py512CODE
LOWdeepspeed/module_inject/auto_tp.py1018CODE
LOWdeepspeed/module_inject/auto_tp.py1038CODE
LOWdeepspeed/module_inject/tp_plan_converter.py20CODE
LOWdeepspeed/module_inject/fusedqkv_utils.py105CODE
LOWdeepspeed/module_inject/fusedqkv_utils.py184CODE
LOWdeepspeed/module_inject/policy.py131CODE
LOWdeepspeed/module_inject/auto_ep.py294CODE
LOWdeepspeed/module_inject/auto_ep.py348CODE
LOWdeepspeed/module_inject/auto_ep.py417CODE
LOWdeepspeed/module_inject/replace_module.py28CODE
LOWdeepspeed/module_inject/replace_module.py87CODE
LOWdeepspeed/module_inject/replace_module.py188CODE
LOWdeepspeed/module_inject/replace_module.py626CODE
LOWdeepspeed/module_inject/replace_module.py686CODE
LOWdeepspeed/module_inject/load_checkpoint.py23CODE
LOWdeepspeed/module_inject/load_checkpoint.py60CODE
LOWdeepspeed/module_inject/load_checkpoint.py222CODE
LOWdeepspeed/module_inject/load_checkpoint.py63CODE
LOWdeepspeed/module_inject/layers.py686CODE
LOWdeepspeed/module_inject/layers.py1849CODE
LOWdeepspeed/module_inject/autotp_config.py151CODE
LOWdeepspeed/monitor/csv_monitor.py22CODE
LOWdeepspeed/monitor/csv_monitor.py40CODE
LOWdeepspeed/monitor/tensorboard.py27CODE
LOWdeepspeed/nvme/parse_nvme_stats.py36CODE
LOWdeepspeed/nvme/parse_nvme_stats.py88CODE
LOWdeepspeed/nvme/perf_run_sweep.py167CODE
LOWdeepspeed/checkpoint/affine_transfer.py335CODE
LOWdeepspeed/checkpoint/affine_transfer.py364CODE
LOWdeepspeed/checkpoint/affine_transfer.py599CODE
LOWdeepspeed/checkpoint/universal_checkpoint.py236CODE
LOWdeepspeed/checkpoint/affine.py219CODE
LOWdeepspeed/checkpoint/autoep_universal.py159CODE
LOWdeepspeed/checkpoint/autoep_universal.py288CODE
LOWdeepspeed/checkpoint/autoep_universal.py413CODE
LOWdeepspeed/checkpoint/utils.py41CODE
LOWdeepspeed/checkpoint/ds_to_universal.py173CODE
LOWdeepspeed/checkpoint/ds_to_universal.py298CODE
LOWdeepspeed/checkpoint/ds_to_universal.py824CODE
LOWdeepspeed/checkpoint/ds_to_universal.py1107CODE
LOWdeepspeed/checkpoint/ds_to_universal.py1156CODE
LOWdeepspeed/runtime/hybrid_engine.py237CODE
LOWdeepspeed/runtime/hybrid_engine.py346CODE
LOWdeepspeed/runtime/hybrid_engine.py377CODE
318 more matches not shown…
Over-Commented Block177 hits · 174 pts
SeverityFileLineSnippetContext
LOWcsrc/cpu/comm/shm_interface.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/cpu/comm/shm_interface.cpp161}COMMENT
LOWcsrc/cpu/comm/ccl.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/cpu/comm/shm.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/cpu/comm/riscv64/shm.h61 __attribute__((target("arch=+v,+zvfh")));COMMENT
LOWcsrc/cpu/comm/riscv64/shm.h81#define CVT_FP16_TO_FP32(X) cvt_fp16_to_fp32(X, vl)COMMENT
LOWcsrc/cpu/comm/arm64/shm.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/cpu/comm/arm64/shm.h81// Reduce functions down below use vectorized algorithm, the number of bytes processed eachCOMMENT
LOWcsrc/cpu/comm/arm64/shm.h101#define VADD_F32_2VL(A, B) vaddq_f32(A, B)COMMENT
LOWcsrc/cpu/comm/x86_64/shm.h61#define VLOAD_U16(X) _mm256_loadu_si256((__m256i*)(X))COMMENT
LOWcsrc/deepspeed4science/evoformer_attn/kernel_forward.h41#include <vector>COMMENT
LOWcsrc/deepspeed4science/evoformer_attn/kernel_forward.h61#include "cutlass/gemm/threadblock/default_mma_core_sm80.h"COMMENT
LOWcsrc/deepspeed4science/evoformer_attn/kernel_backward.h41#include <vector>COMMENT
LOWcsrc/deepspeed4science/evoformer_attn/kernel_backward.h61#include "cutlass/epilogue/warp/fragment_iterator_tensor_op.h"COMMENT
LOWcsrc/deepspeed4science/evoformer_attn/kernel_backward.h801 // part1 - after Q.K / dV / dO.VCOMMENT
LOW…ed4science/evoformer_attn/gemm/custom_mma_multistage.h41COMMENT
LOW…ed4science/evoformer_attn/gemm/custom_mma_multistage.h61/////////////////////////////////////////////////////////////////////////////////////////////////COMMENT
LOW…/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h41COMMENT
LOW…/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h61#include "../epilogue/epilogue_thread_apply_logsumexp.h"COMMENT
LOW…/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h321 // BEGIN smemCOMMENT
LOW…/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h661template <COMMENT
LOW…/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h1301 /// Iterates over tiles of A operand in global memoryCOMMENT
LOW…/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h1381COMMENT
LOW…eepspeed4science/evoformer_attn/gemm/custom_mma_base.h41COMMENT
LOW…eed4science/evoformer_attn/gemm/custom_mma_pipelined.h61/////////////////////////////////////////////////////////////////////////////////////////////////COMMENT
LOW…ence/evoformer_attn/epilogue/epilogue_rescale_output.h61#include "cutlass/layout/tensor.h"COMMENT
LOW…d4science/evoformer_attn/epilogue/epilogue_pipelined.h61#include "cutlass/functional.h"COMMENT
LOW…ttn/iterators/predicated_tile_iterator_residual_last.h61namespace threadblock {COMMENT
LOW…ttn/iterators/predicated_tile_iterator_residual_last.h81/// Adding a logical coordinate offset may be performed at the time the iteratorCOMMENT
LOW…ttn/iterators/predicated_tile_iterator_residual_last.h101///COMMENT
LOW…ttn/iterators/predicated_tile_iterator_residual_last.h121//COMMENT
LOW…ttn/iterators/predicated_tile_iterator_residual_last.h1861 }COMMENT
LOW…mer_attn/iterators/epilogue_predicated_tile_iterator.h41 Mostly copied from "cutlass/epilogue/threadblock/predicated_tile_iterator.h"COMMENT
LOW…rators/predicated_tile_access_iterator_residual_last.h221 int const* indices = nullptr)COMMENT
LOW…rators/predicated_tile_access_iterator_residual_last.h781COMMENT
LOW…rators/predicated_tile_access_iterator_residual_last.h821 /// Gets the maskCOMMENT
LOW…rators/predicated_tile_access_iterator_residual_last.h1701 AccessType* get() const { return reinterpret_cast<AccessType*>(iterator_.get()); }COMMENT
LOW…rators/predicated_tile_access_iterator_residual_last.h1741COMMENT
LOWcsrc/transformer/ds_transformer_cuda.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/transformer/inference/csrc/pt_binding.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOW…transformer/inference/includes/inference_cuda_layers.h1// Copyright (c) Microsoft Corporation.COMMENT
LOW…sformer/inference/includes/inference_cublas_wrappers.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/transformer/inference/includes/inference_context.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/xpu/includes/type_shim.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/xpu/includes/simd.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/xpu/includes/simd.h21#define SIMD_SET(x) _mm512_set1_ps(x)COMMENT
LOWcsrc/xpu/includes/simd.h41#define SIMD_STORE(a, d) _mm256_storeu_ps(a, d)COMMENT
LOWcsrc/xpu/includes/compat.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/xpu/includes/cpu_adam.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/xpu/adagrad/cpu_adagrad.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/xpu/adam/multi_tensor_apply.dp.hpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/ds_transformer_cuda.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/cpu_lion.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/deepcompile.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/context.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/cublas_wrappers.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/cpu_adagrad.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/ds_kernel_utils.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWcsrc/includes/ds_kernel_utils.h21#include <cuda_bf16.h>COMMENT
LOWcsrc/includes/type_shim.h1// Copyright (c) Microsoft Corporation.COMMENT
117 more matches not shown…
Excessive Try-Catch Wrapping99 hits · 113 pts
SeverityFileLineSnippetContext
LOWcsrc/aio/py_test/parse_aio_stats.py53 except Exception:CODE
LOWdeepspeed/launcher/launch.py205 except Exception as e:CODE
LOWdeepspeed/module_inject/auto_ep_layer.py931 except Exception:CODE
LOWdeepspeed/module_inject/auto_ep.py228 except Exception:CODE
LOWdeepspeed/module_inject/auto_ep_comm.py190 except Exception:CODE
LOWdeepspeed/module_inject/auto_ep_presets/base.py221 except Exception as exc:CODE
LOWdeepspeed/module_inject/containers/bloom.py116 except Exception as e:CODE
MEDIUMdeepspeed/checkpoint/deepspeed_checkpoint.py332 print(f'Error: {file} is not existent')CODE
MEDIUMdeepspeed/checkpoint/reshape_utils.py31 print(f'Error: {file} is not existent')CODE
LOWdeepspeed/runtime/hybrid_engine_graph.py175 except Exception as err:CODE
MEDIUMdeepspeed/runtime/engine.py1242def __del__(self):CODE
LOWdeepspeed/runtime/engine.py1245 except Exception as exc:CODE
LOWdeepspeed/runtime/torch_autocast.py51 except Exception as e:CODE
LOWdeepspeed/runtime/config_utils.py77 except Exception as e:CODE
LOWdeepspeed/runtime/config_utils.py95 except Exception as e:CODE
LOW…d/runtime/data_pipeline/data_sampling/data_analyzer.py560 except Exception as e:CODE
LOWdeepspeed/runtime/swap_tensor/utils.py241 except Exception:CODE
LOW…untime/activation_checkpointing/offload_activations.py488 except Exception:CODE
LOW…untime/activation_checkpointing/offload_activations.py496 except Exception as err:CODE
LOWdeepspeed/runtime/superoffload/superoffload_utils.py165 except Exception as e:CODE
LOWdeepspeed/runtime/superoffload/superoffload_utils.py235 except Exception as e:CODE
LOW…ntime/checkpoint_engine/decoupled_checkpoint_engine.py65 except Exception as e:CODE
LOW…ntime/checkpoint_engine/decoupled_checkpoint_engine.py116 except Exception:CODE
LOW…ntime/checkpoint_engine/decoupled_checkpoint_engine.py216 except Exception as e:CODE
LOW…ntime/checkpoint_engine/decoupled_checkpoint_engine.py222 except Exception:CODE
MEDIUM…ntime/checkpoint_engine/decoupled_checkpoint_engine.py42def init_decoupled_checkpoint(config_params, dp_writer_config, save_event, save_CODE
MEDIUM…ntime/checkpoint_engine/decoupled_checkpoint_engine.py113def __del__(self):CODE
LOW…time/checkpoint_engine/datastates_checkpoint_engine.py25 except Exception as e:CODE
LOWdeepspeed/comm/mori.py168 except Exception as e:CODE
LOWdeepspeed/comm/mori.py224 except Exception as e:CODE
LOWdeepspeed/comm/torch.py239 except Exception:CODE
LOWdeepspeed/utils/pin_memory.py37 except Exception as e:CODE
LOWdeepspeed/utils/pin_memory.py75 except Exception as e:CODE
LOWdeepspeed/utils/pin_memory.py127 except Exception:CODE
LOWdeepspeed/utils/pin_memory.py135 except Exception:CODE
MEDIUMdeepspeed/utils/pin_memory.py124def _release(handle, begin, ranges, finalizers, device_registered):CODE
LOWdeepspeed/utils/torch.py58 except Exception:CODE
LOWdeepspeed/utils/torch.py67 except Exception:CODE
LOWdeepspeed/compile/input_storage.py108 except Exception as e:CODE
LOWdeepspeed/compile/input_storage.py139 except Exception as e:CODE
LOWdeepspeed/compile/passes/offload_activation.py217 except Exception as e:CODE
LOWdeepspeed/compile/passes/offload_activation.py285 except Exception:CODE
LOWdeepspeed/compile/passes/offload_activation.py514 except Exception:CODE
LOWdeepspeed/compile/profilers/graph_profile.py49 except Exception as e:CODE
LOWdeepspeed/compile/profilers/graph_profile.py138 except Exception:CODE
LOWdeepspeed/compile/profilers/graph_profile.py182 except Exception:CODE
LOWdeepspeed/compile/profilers/graph_profile.py239 except Exception as e:CODE
LOWdeepspeed/compile/profilers/graph_profile.py363 except Exception as e:CODE
LOWdeepspeed/compile/profilers/graph_profile.py449 except Exception as e:CODE
LOWdeepspeed/compile/profilers/graph_profile.py482 except Exception as e:CODE
LOWdeepspeed/ops/triton_ops/_triton.py14except Exception:CODE
LOWdeepspeed/autotuning/autotuner.py33except Exception as e:CODE
LOWdeepspeed/autotuning/tuner/base_tuner.py70 except Exception:CODE
LOWdeepspeed/moe/sharded_moe.py50except Exception:CODE
LOWdeepspeed/moe/ep_tp_dispatch.py195 except Exception:CODE
LOWci/tests_fetcher.py729 except Exception: # noqa: BLE001 -- explain is a diagnostic, never fail CI on itCODE
LOWci/tests_fetcher.py737 except Exception: # noqa: BLE001CODE
LOWci/test_tests_fetcher.py644 except Exception as e: # noqa: BLE001CODE
LOWci/test_torch_latest.py1730 except Exception as exc: # noqa: BLE001STRING
LOWop_builder/builder.py78 except Exception as err:CODE
39 more matches not shown…
Hallucination Indicators10 hits · 105 pts
SeverityFileLineSnippetContext
CRITICAL…s/transformer/inference/triton/triton_matmul_kernel.py29 max_shared_memory = triton.runtime.driver.active.utils.get_device_properties(device)["max_shared_mem"]CODE
CRITICAL…s/transformer/inference/triton/triton_matmul_kernel.py224 max_shared_memory = triton.runtime.driver.active.utils.get_device_properties(device)["max_shared_mem"]CODE
CRITICALtests/unit/modeling.py433 self.attention.output.LayerNorm.weight.register_hook(lambda x, self=self: grads.append([x, "N2_W"]))CODE
CRITICALtests/unit/modeling.py434 self.attention.output.LayerNorm.bias.register_hook(lambda x, self=self: grads.append([x, "N2_B"]))CODE
CRITICALtests/unit/v1/zero/test_zero.py1635 assert model.l2.linear.weight.ds_tensor.numel() == ds_tensor_numelCODE
CRITICALtests/unit/v1/zero/test_zero.py1638 assert model.l4.linear.weight.ds_tensor.numel() == ds_tensor_numelCODE
CRITICALtests/unit/v1/autotp/test_autotp_training.py1262 accumulated_gradient = engine.module.projection.weight.grad.detach().clone()CODE
CRITICAL…s/unit/v1/half_precision/test_mixed_precision_dtype.py220 assert engine.module.quantized.weight.data.view(torch.uint8).eq(9).all()CODE
CRITICAL⚡…ts/unit/v1/half_precision/test_keep_in_fp32_modules.py203 assert torch.equal(engine.module.child.inner.router_bias.cpu(), EXACT_VALUES)CODE
CRITICALtests/unit/inference/test_inference.py360 if pipe.tokenizer.model_max_length < deepspeed.ops.transformer.inference.config.DeepSpeedInferenceConfig(CODE
Self-Referential Comments35 hits · 103 pts
SeverityFileLineSnippetContext
MEDIUMdeepspeed/launcher/runner.py258 # Create a new list in the same order as original but with duplicatesSTRING
MEDIUMdeepspeed/module_inject/layers.py615 # This function is designed forCOMMENT
MEDIUMdeepspeed/module_inject/containers/base_moe.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUMdeepspeed/module_inject/containers/base.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUMdeepspeed/runtime/zero/parameter_offload.py632 """This function is used to recursively obtain the granularity of each module."""STRING
MEDIUM…peed/runtime/activation_checkpointing/checkpointing.py568 """This function is adapted from torch.utils.checkpoint withSTRING
MEDIUM…peed/runtime/activation_checkpointing/checkpointing.py789 """This function is union of `torch.utils.checkpoint._checkpoint_without_reentrant` and `CheckpointFunction` in thisSTRING
MEDIUMdeepspeed/comm/comm.py901 # Create a torch backend object, initialize torch distributed, and assign to cdbCOMMENT
MEDIUMdeepspeed/utils/comms_logging.py186 # Create a snapshot to avoid concurrent modification issuesCOMMENT
MEDIUMdeepspeed/utils/comms_logging.py270 # Create a snapshot of the dictionary to avoid concurrent modification issuesCOMMENT
MEDIUM⚡deepspeed/compile/backend.py186 # Create a set of parameter indices for quick lookupCOMMENT
MEDIUMdeepspeed/compile/backend.py356 # Create an InputStorage instance for this specific graphCOMMENT
MEDIUMdeepspeed/compile/input_storage.py112 # Create a tensor with the stored metadata (original behavior for non-int tensors)COMMENT
MEDIUMdeepspeed/compile/profilers/comm_profile.py152 # Create an interpolation functionCOMMENT
MEDIUM…nference/v2/model_implementations/mixtral/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…ence/v2/model_implementations/qwen_v2_moe/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…/inference/v2/model_implementations/phi3/containers.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…d/inference/v2/model_implementations/qwen/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…nference/v2/model_implementations/qwen_v2/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…ference/v2/model_implementations/llama_v2/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…ed/inference/v2/model_implementations/opt/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…inference/v2/model_implementations/falcon/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…d/inference/v2/model_implementations/phi/containers.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUM…nference/v2/model_implementations/mistral/container.py6# Create a container object to save model-specific tensors using the policy file above.COMMENT
MEDIUMdeepspeed/moe/sharded_moe.py152# The following functions are extracted and scriptedCOMMENT
MEDIUMdeepspeed/moe/sharded_moe.py253 # Create a mask for 1st's expert per tokenCOMMENT
MEDIUMdeepspeed/moe/sharded_moe.py352 # Create a mask for 1st's expert per tokenCOMMENT
MEDIUMdeepspeed/moe/sharded_moe.py358 # Create a mask for 2nd's expert per token using Gumbel-max trickCOMMENT
MEDIUMdeepspeed/moe/utils.py99 # Create the param MoE groups, leave param assign to next stepCOMMENT
MEDIUM⚡op_builder/builder.py354 # Create a compiler object.COMMENT
MEDIUM⚡op_builder/builder.py360 # Create a temporary directory to hold test files.COMMENT
MEDIUM⚡op_builder/builder.py363 # Define a simple C program that calls the function in questionCOMMENT
MEDIUMtests/unit/ulysses_alst/test_ulysses_sp_hf.py208 # Create a mock PEFT model object that has config but doesn't inherit from PreTrainedModelCOMMENT
MEDIUM…ivation_checkpointing/test_activation_checkpointing.py417 # Create a simple topology for testingCOMMENT
MEDIUM…ivation_checkpointing/test_activation_checkpointing.py433 # Create a mock GPT2 model with different layer typesCOMMENT
AI Structural Patterns84 hits · 80 pts
SeverityFileLineSnippetContext
LOWdeepspeed/__init__.py427CODE
LOW…d/model_implementations/transformers/ds_transformer.py109CODE
LOWdeepspeed/module_inject/policy.py48CODE
LOWdeepspeed/module_inject/auto_ep_folding.py184CODE
LOWdeepspeed/module_inject/layers.py78CODE
LOWdeepspeed/module_inject/layers.py110CODE
LOWdeepspeed/module_inject/layers.py513CODE
LOWdeepspeed/module_inject/containers/gptj.py49CODE
LOWdeepspeed/module_inject/containers/opt.py62CODE
LOWdeepspeed/module_inject/containers/llama.py109CODE
LOWdeepspeed/module_inject/containers/gptneo.py63CODE
LOWdeepspeed/module_inject/containers/internlm.py54CODE
LOWdeepspeed/module_inject/containers/llama2.py59CODE
LOWdeepspeed/module_inject/containers/gptneox.py43CODE
LOWdeepspeed/module_inject/containers/bloom.py57CODE
LOWdeepspeed/checkpoint/autoep_universal.py84CODE
LOWdeepspeed/linear/optimized_linear.py204CODE
LOWdeepspeed/runtime/lr_schedules.py483CODE
LOWdeepspeed/runtime/bf16_optimizer.py41CODE
LOWdeepspeed/runtime/engine.py519CODE
LOW…a_pipeline/data_sampling/variable_batch_size_and_lr.py23CODE
LOW…a_pipeline/data_sampling/variable_batch_size_and_lr.py165CODE
LOW…a_pipeline/data_sampling/variable_batch_size_and_lr.py432CODE
LOW…d/runtime/data_pipeline/data_sampling/data_analyzer.py25CODE
LOW…d/runtime/data_pipeline/data_sampling/data_analyzer.py459CODE
LOWdeepspeed/runtime/domino/transformer.py247CODE
LOWdeepspeed/runtime/pipe/module.py125CODE
LOWdeepspeed/runtime/sequence_parallel/ulysses_sp.py229CODE
LOWdeepspeed/runtime/sequence_parallel/ulysses_sp.py200CODE
LOWdeepspeed/runtime/zero/parameter_offload.py138CODE
LOWdeepspeed/runtime/zero/stage_1_and_2.py154CODE
LOWdeepspeed/runtime/zero/partition_parameters.py960CODE
LOWdeepspeed/runtime/zero/stage3.py165CODE
LOWdeepspeed/runtime/fp16/fused_optimizer.py42CODE
LOWdeepspeed/runtime/fp16/unfused_optimizer.py32CODE
LOWdeepspeed/comm/comm.py836CODE
LOWdeepspeed/profiling/flops_profiler/profiler.py1196CODE
LOWdeepspeed/inference/quantization/utils.py93CODE
LOWdeepspeed/inference/quantization/utils.py149CODE
LOWdeepspeed/ops/lamb/fused_lamb.py41CODE
LOWdeepspeed/ops/transformer/transformer.py89CODE
LOWdeepspeed/ops/transformer/transformer.py399CODE
LOW…speed/ops/transformer/inference/diffusers_attention.py91CODE
LOW…speed/ops/transformer/inference/diffusers_attention.py190CODE
LOW…speed/ops/transformer/inference/diffusers_attention.py87CODE
LOWdeepspeed/ops/transformer/inference/config.py49CODE
LOWdeepspeed/ops/transformer/inference/ds_attention.py131CODE
LOWdeepspeed/ops/transformer/inference/moe_inference.py49CODE
LOWdeepspeed/ops/transformer/inference/moe_inference.py270CODE
LOWdeepspeed/ops/transformer/inference/triton/attention.py125CODE
LOW…epspeed/ops/transformer/inference/triton/matmul_ext.py438CODE
LOW…ps/transformer/inference/op_binding/softmax_context.py144CODE
LOW…/ops/transformer/inference/op_binding/vector_matmul.py42CODE
LOW…peed/ops/transformer/inference/op_binding/gelu_gemm.py38CODE
LOW…peed/ops/transformer/inference/op_binding/gelu_gemm.py52CODE
LOW…speed/ops/transformer/inference/op_binding/qkv_gemm.py67CODE
LOW…speed/ops/transformer/inference/op_binding/qkv_gemm.py75CODE
LOW…pspeed/ops/transformer/inference/op_binding/softmax.py63CODE
LOW…pspeed/ops/transformer/inference/op_binding/softmax.py71CODE
LOWdeepspeed/ops/adam/fused_adam.py76CODE
24 more matches not shown…
Redundant / Tautological Comments27 hits · 38 pts
SeverityFileLineSnippetContext
LOWsetup.py250# Set cuda_version to 0.0 if cpu-only.COMMENT
LOWsetup.py253# Set hip_version to 0.0 if cpu-only.COMMENT
LOWdeepspeed/module_inject/auto_tp.py1070 # Check if embedding matches any patternCOMMENT
LOWdeepspeed/module_inject/auto_ep.py381 # Check if MoE block has tuple return contract (legacy transformers)COMMENT
LOWdeepspeed/module_inject/load_checkpoint.py107 # Check if the weight tensor is for the QKV parameterCOMMENT
LOWdeepspeed/module_inject/load_checkpoint.py149 # Check if the weight tensor is for the QKV parameterCOMMENT
LOWdeepspeed/module_inject/layers.py842 # Check if the parameters belong to a replaced layer (indicated by a specific attribute)COMMENT
LOWdeepspeed/monitor/csv_monitor.py61 # Open file and record event. Insert header if this is the first time writingCOMMENT
LOWdeepspeed/runtime/engine.py3202 # Check if loss scaling was required but not appliedSTRING
LOWdeepspeed/runtime/engine.py3414 # Set flag to prevent hooks from firing (we'll manually call prologue/epilogue)STRING
LOWdeepspeed/runtime/utils.py66 # Check if first element is a dict (parameter groups) or a ParameterCOMMENT
LOWdeepspeed/runtime/utils.py836 # Print message except when distributed but not rank 0COMMENT
LOWdeepspeed/runtime/config_utils.py72 # Check if there is a new param and if it should be set with a valueCOMMENT
LOWdeepspeed/runtime/pipe/engine.py842 # Set _running_engine_backward to avoid RuntimeError in post-backward hookCOMMENT
LOWdeepspeed/runtime/zenflow/zenflow_stage_1_and_2.py505 # Set numel to next partition's offsetCOMMENT
LOW…speed/runtime/swap_tensor/partitioned_param_swapper.py135 #Check if partitioned param or numel in a tensor is swappable or notCOMMENT
LOWdeepspeed/runtime/zero/stage_1_and_2.py1534 # Set numel to next partition's offsetCOMMENT
LOW…peed/runtime/activation_checkpointing/checkpointing.py185 # Check if we have added the stateCOMMENT
LOW…ntime/checkpoint_engine/decoupled_checkpoint_engine.py139 # Check if process is still aliveCOMMENT
LOWdeepspeed/inference/engine.py187 # Check if local CUDA graphs can be created in replacement modulesCOMMENT
LOWdeepspeed/ops/adam/zenflow_torch_adam.py12# Check if we have PyTorch >= 2.0 for ZenFlow featuresCOMMENT
LOWdeepspeed/ops/adam/cpu_adam.py228 # Check if we can rollback (step count must be > 0)COMMENT
LOWop_builder/xpu/builder.py147 # Set CXX to icpx (Intel oneAPI DPC++ compiler) so that .cpp/.dp.cppCOMMENT
LOWtests/unit/v1/moe/test_moe.py205 # Set numel to next partition's offsetCOMMENT
LOWtests/unit/runtime/pipe/test_pipe.py198 # Check if models have same weights after trainingCOMMENT
LOWtests/unit/runtime/pipe/test_pipe.py288 # Check if all layers have seen different shapesCOMMENT
LOWtests/small_model_debugging/test.py14 # Print message except when distributed but not rank 0COMMENT
AI Slop Vocabulary18 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMdeepspeed/compat.py20# Backwards compatible, applies best practices (use annotationlib) from python 3.14 onwards.COMMENT
MEDIUMdeepspeed/runtime/compiler.py114# robust version of @torch.compileCOMMENT
MEDIUMdeepspeed/runtime/engine.py3904 # utilize dp_world_size for allreduce averageSTRING
LOWdeepspeed/runtime/pipe/engine.py759 # Some models just return loss from forward()COMMENT
LOWdeepspeed/runtime/pipe/module.py280 # that case and just use it in forward()COMMENT
MEDIUMdeepspeed/runtime/zero/partition_parameters.py497 # since skip_init won't involve any computations or weight adjustments, we can directly utilize postCOMMENT
LOWdeepspeed/utils/comms_logging.py107 # If this comm_op has already been logged with this message size, just add to existing recordCOMMENT
MEDIUMdeepspeed/compile/util.py107 # to utilize that information. This is left as future work when real needsCOMMENT
LOWdeepspeed/inference/v2/modules/heuristics.py51 # Currently, we only have one implementation, so we just return it.COMMENT
LOWdeepspeed/inference/v2/modules/heuristics.py70 # Currently, we only have one implementation, so we just return it.COMMENT
LOWdeepspeed/inference/v2/modules/heuristics.py132 # Currently, we only have one implementation, so we just return it.COMMENT
LOWdeepspeed/inference/v2/modules/heuristics.py153 # Currently, we only have one implementation, so we just return it.COMMENT
LOWdeepspeed/inference/v2/modules/heuristics.py193 # Currently, we only have one implementation, so we just return it.COMMENT
MEDIUMtests/unit/util.py224 # environment, so to make the test robust a combined entry of both streams is availableSTRING
LOWtests/unit/v1/zero/test_zero.py1165 # TODO. add testing for this - for now we just call it to make sure itCOMMENT
LOWtests/unit/v1/zero/test_zero.py1554 # TODO. add testing for this - for now we just call it to make sure itCOMMENT
MEDIUMtests/unit/checkpoint/test_affine_shard_map.py591# builds its map analytically from head counts and the tp degree, while the harness aboveCOMMENT
MEDIUMtests/unit/checkpoint/test_zero_optimizer.py670 # This test calls deepspeed.initialize(), so use the harness' file-storeCOMMENT
Structural Annotation Overuse19 hits · 34 pts
SeverityFileLineSnippetContext
LOWCONTRIBUTING.md133### Step 1: proposal and discussionCOMMENT
LOWCONTRIBUTING.md146### Step 2: implementation and verificationCOMMENT
LOWCONTRIBUTING.md155### Step 3: release and maintenanceCOMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py419 # Step 1: nF0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py423 # Step 2: nF0F1COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py431 # Step 3: nB1W1F1COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py447 # Step 5: nB1F1B0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py451 # Step 6: nB1B0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py455 # Step 7: nWB0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py459 # Step 8: nWCOMMENT
LOWtests/unit/v1/ops/muon/test_muon.py703 # Step 2: verify multi-step execution does not crash and momentum accumulatesCOMMENT
LOWdocs/_tutorials/universal-checkpointing.md26### Step 1: Create ZeRO CheckpointCOMMENT
LOWdocs/_tutorials/universal-checkpointing.md41### Step 2: Convert ZeRO Checkpoint to Universal FormatCOMMENT
LOWdocs/_tutorials/universal-checkpointing.md61### Step 3: Resume Training with Universal CheckpointCOMMENT
LOWdocs/_tutorials/monitor.md87# Step 1: Import monitor (and DeepSpeed config, if needed)COMMENT
LOWdocs/_tutorials/monitor.md91# Step 2: Initialized monitor with DeepSpeed config (get DeepSpeed config object, if needed)COMMENT
LOWdocs/_tutorials/monitor.md110 # Step 3: Create list of 3-tuple records (single entry in this case)COMMENT
LOWdocs/_tutorials/monitor.md112 # Step 4: Call monitor.write_events on the list from step 3COMMENT
LOWdocs/_tutorials/comms-logging.md91 # Step 3: Call `deepspeed.comm.log_summary()`COMMENT
Modern Structural Boilerplate29 hits · 32 pts
SeverityFileLineSnippetContext
LOWdeepspeed/__init__.py351def set_optimizer_flags(config_class: DeepSpeedConfig, model: torch.nn.Module) -> None:CODE
LOWdeepspeed/module_inject/auto_ep_config.py25__all__ = [CODE
LOWdeepspeed/module_inject/layers.py27__all__ = [CODE
LOWdeepspeed/module_inject/auto_ep_preset_adapters.py16__all__ = [CODE
LOWdeepspeed/checkpoint/affine_transfer.py34__all__ = [CODE
LOWdeepspeed/checkpoint/affine.py23__all__ = [CODE
LOWdeepspeed/checkpoint/autoep_affine.py17__all__ = [CODE
LOW⚡deepspeed/runtime/base_optimizer.py269 def set_gradient_accumulation_boundary(self, is_boundary: bool) -> None:CODE
LOWdeepspeed/runtime/engine.py5964 def _set_deepcompile_active(self, active: bool) -> None:CODE
LOWdeepspeed/runtime/rollout/__init__.py24__all__ = [CODE
LOWdeepspeed/runtime/zero/partitioned_param_coordinator.py37def update_recompute_parameters(sub_module: Module, param: Parameter) -> None:CODE
LOWdeepspeed/runtime/superoffload/superoffload_utils.py207 def _set_cpu_affinity(self, cpuadam_cores_perc: float) -> None:CODE
LOWdeepspeed/compile/custom_ops/__init__.py10__all__ = [CODE
LOWdeepspeed/compression/helper.py24__all__ = ["recursive_getattr", "recursive_setattr"]CODE
LOW⚡…ence/v2/model_implementations/inference_policy_base.py43 def set_transformer_params(self, prefixes: Union[str, Iterable[str]], containers: List[LayerContainer]) -> None:CODE
LOW⚡…ence/v2/model_implementations/inference_policy_base.py52 def set_non_transformer_params(self, container: LayerContainer) -> None:CODE
LOW⚡…ence/v2/model_implementations/inference_policy_base.py55 def set_unmapped_params(self, prefixes: Union[str, Iterable[str]]) -> None:CODE
LOW…rence/v2/model_implementations/layer_container_base.py272 def set_dependency(self, dep_name: str, dep_value: torch.Tensor) -> None:CODE
LOWdeepspeed/ops/triton_ops/__init__.py22__all__ = ["_TRITON_AVAILABLE", "is_triton_available", "triton", "tl", "group_gemm_triton", "swiglu"]CODE
LOWdeepspeed/sequence/auto_sp.py39logger = logging.getLogger(__name__)CODE
LOW⚡deepspeed/sequence/auto_sp.py134def _set_module_by_name(model: nn.Module, dotted_name: str, new_module: nn.Module) -> None:CODE
LOW⚡deepspeed/moe/ep_kernels.py27logger = logging.getLogger(__name__)CODE
LOWdeepspeed/moe/layer.py86 def set_deepspeed_parallelism(self, use_data_before_expert_parallel_: bool = False) -> None:CODE
LOWop_builder/cpu/pin_memory.py11__all__ = ["PinMemoryBuilder"]CODE
LOWop_builder/xpu/pin_memory.py11__all__ = ["PinMemoryBuilder"]CODE
LOWop_builder/npu/pin_memory.py11__all__ = ["PinMemoryBuilder"]CODE
LOWop_builder/supa/pin_memory.py11__all__ = ["PinMemoryBuilder"]CODE
LOWtests/unit/modeling.py47logger = logging.getLogger(__name__)CODE
LOWtests/unit/modelingpreln.py43logger = logging.getLogger(__name__)CODE
Fake / Example Data26 hits · 26 pts
SeverityFileLineSnippetContext
LOWdeepspeed/compile/util.py136 return [n for n in graph.nodes if n.op == "placeholder"]CODE
LOWdeepspeed/compile/list_schedule.py221 if node.op == 'placeholder':CODE
LOWdeepspeed/compile/inductor.py146 if n.op == "placeholder" and n.name in pm.param_names:CODE
LOWdeepspeed/compile/fx.py49 primals = [n for n in graph.nodes if n.op == "placeholder"]CODE
LOWdeepspeed/compile/fx.py50 non_primals = [n for n in graph.nodes if n.op != "placeholder"]CODE
LOWdeepspeed/compile/fx.py121 activation_nodes_set = set([n for n in graph.nodes if n.op == "placeholder" and n.name in activation_node_names])CODE
LOWdeepspeed/compile/passes/sp_compile.py206 if node.op == "placeholder" and "val" in node.meta:CODE
LOWdeepspeed/compile/passes/offload_activation.py270 while nodes[insert_index].op == "placeholder":CODE
LOWdeepspeed/compile/passes/offload_activation.py355 keepers = [node for node in graph.nodes if node.op in ("placeholder", "get_attr") or node.target in gather_ops]CODE
LOWdeepspeed/compile/passes/offload_activation.py747 placeholders = {node.name: node for node in nodes if node.op == "placeholder"}CODE
LOWdeepspeed/compile/passes/offload_activation.py773 if candidate.op == "placeholder":CODE
LOWdeepspeed/compile/passes/prefetch.py97 if node.op != "placeholder":CODE
LOWdeepspeed/compile/passes/prefetch.py152 if (node.op != "placeholder"CODE
LOWdeepspeed/compile/passes/prefetch.py153 and node.target != torch.ops.dc.reload_parameter) and order_rev[i + 1].op == "placeholder":CODE
LOWdeepspeed/compile/passes/offload_adam_states.py332 if node.op == 'placeholder' and isinstance(node.meta.get("val"), torch.Tensor):CODE
LOWdeepspeed/compile/passes/offload_adam_states.py429 or node.op == 'placeholder' \CODE
LOWdeepspeed/compile/passes/offload_adam_states.py453 if node.op != 'placeholder':CODE
LOWdeepspeed/compile/passes/offload_adam_states.py476 if node.op != 'placeholder' and not inserted_sync:CODE
LOWdeepspeed/compile/passes/offload_adam_states.py489 or node.op == 'placeholder' \CODE
LOWdeepspeed/compile/passes/offload_adam_states.py543 if node.op == "output" or node.op == "placeholder":CODE
LOWdeepspeed/compile/passes/offload_adam_states.py573 if node.op != 'placeholder' and not inserted_offload and is_first_graph:CODE
LOWdeepspeed/compile/profilers/graph_profile.py258 if n.op in {"placeholder", "output"}:CODE
LOWdeepspeed/compile/profilers/graph_profile.py473 if n.op in {"placeholder", "output"}:CODE
LOWtests/unit/v1/compile/test_compile_autosp.py229 assert node.op == "placeholder"CODE
LOWtests/unit/v1/compile/test_compile_autosp.py244 assert node.op == "placeholder"CODE
LOWtests/unit/v1/compile/test_compile_autosp.py260 assert node.op == "placeholder"CODE
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHdeepspeed/__init__.py442Initialize the DeepSpeed Engine. Arguments: args: an object containing local_rank and deepspeed_config fielSTRING
HIGHdeepspeed/runtime/compiler.py49 Decorator factory to enable compiling of a function if the minimum PyTorch version requirement is met. Args: STRING
HIGHdeepspeed/runtime/utils.py1446 Count the number of parameters that participate in the currently running backward graph. This helper is designSTRING
HIGHdeepspeed/runtime/zero/linear.py153Applies a linear transformation to the incoming data: :math:`y = xA^T + b`. The weights are pre-transposed and storeSTRING
HIGHdeepspeed/autotuning/autotuner.py189Initialize and return a resource manager Args: active_resources ([dict]): A dictionary of hostname STRING
Verbosity Indicators11 hits · 22 pts
SeverityFileLineSnippetContext
LOW⚡deepspeed/runtime/pipe/schedule.py419 # Step 1: nF0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py423 # Step 2: nF0F1COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py431 # Step 3: nB1W1F1COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py447 # Step 5: nB1F1B0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py451 # Step 6: nB1B0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py455 # Step 7: nWB0COMMENT
LOW⚡deepspeed/runtime/pipe/schedule.py459 # Step 8: nWCOMMENT
LOWdeepspeed/runtime/zero/stage_1_and_2.py2822 # Step 2:- run optimizer and upscaling simultaneouslyCOMMENT
LOWdeepspeed/runtime/zero/stage_1_and_2.py2883 # Step 3:- run the optimizer if no offloadingCOMMENT
LOWdeepspeed/runtime/zero/stage_1_and_2.py2886 # Step 4:- get rid of the fp32 gradients. Not needed anymoreCOMMENT
LOWtests/unit/v1/ops/muon/test_muon.py703 # Step 2: verify multi-step execution does not crash and momentum accumulatesCOMMENT
Cross-Language Confusion4 hits · 15 pts
SeverityFileLineSnippetContext
HIGHci/torch_latest.py1195 "--checksum-sha256 \"$proof_checksum\" --query ChecksumSHA256 --output text 2>/dev/null) || "CODE
HIGH⚡ci/test_torch_latest.py1706 assert "pull_request.head.sha || github.sha" in deploySTRING
HIGH⚡ci/test_torch_latest.py1707 assert "pull_request.head.repo.full_name || github.repository" in deploySTRING
HIGHci/test_torch_latest.py1654 trusted_ref = "ref: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.sha }}"STRING
Modern AI Meta-Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMdeepspeed/module_inject/tp_plan_converter.py13# `embedding_rowwise` is injected for every tied-embedding model since huggingface/transformers#47579.COMMENT
MEDIUMci/tests_fetcher.py155 # Core orchestration on the deepspeed.initialize() critical path. TestsCOMMENT
MEDIUMtests/unit/v1/autotp/test_tp_plan_real_models.py235 # add for a tied-embedding model to exercise the same tp_plan shape as the issue repro.COMMENT
TODO Padding3 hits · 4 pts
SeverityFileLineSnippetContext
LOWcsrc/cpu/comm/ccl.cpp213// TODO: implement torch's async_op behavior, document it.COMMENT
LOW…ointing/test_activation_checkpointing_non_reentrant.py6# TODO: add tests with model parallelism for activation partitioning and other features.COMMENT
LOW…ivation_checkpointing/test_activation_checkpointing.py6# TODO: add tests with model parallelism for activation partitioning and other features.COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdeepspeed/runtime/zero/stage3.py970 # We need to keep the reference to this buffer to make sure you can free it in `offload_states`COMMENT
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWdeepspeed/runtime/compiler.py61 def my_function():STRING