DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 3736 finding(s).
Are imports declared and package/API names verified? 773 finding(s).
Are wrappers, guards, and repeated structures necessary? 3600 finding(s).
Which changes need focused human review? 5051 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csrc/aio/py_test/io_engine.py | 119 | def io_engine_multiprocessing(args, read_op): | CODE |
| LOW | csrc/aio/py_test/test_ds_aio_utils.py | 86 | def create_page_locked_tensor(num_elem, use_accelerator, aio_handle=None): | CODE |
| LOW | deepspeed/compat.py | 23 | def get_annotations_from_namespace(namespace: Mapping[str, object]) -> Dict[str, Any]: | CODE |
| LOW | deepspeed/__init__.py | 295 | def _resolve_attention_head_count(param_name: str, param: torch.Tensor, meta, text_config, owners=None): | CODE |
| LOW | deepspeed/__init__.py | 385 | def resolve_per_head_muon_after_sharding(model: torch.nn.Module) -> None: | CODE |
| LOW | deepspeed/launcher/runner.py | 257 | def _stable_remove_duplicates(data): | STRING |
| LOW | deepspeed/launcher/runner.py | 373 | def parse_inclusion_exclusion(resource_pool, inclusion, exclusion): | STRING |
| LOW | deepspeed/launcher/multinode_runner.py | 55 | def validate_active_resources(cls, active_resources): | CODE |
| LOW | deepspeed/launcher/multinode_runner.py | 365 | def validate_active_resources(cls, active_resources): | CODE |
| LOW | deepspeed/model_implementations/diffusers/vae.py | 37 | def _create_cuda_graph_decoder(self, *inputs, **kwargs): | CODE |
| LOW | deepspeed/model_implementations/diffusers/vae.py | 80 | def _create_cuda_graph_encoder(self, *inputs, **kwargs): | CODE |
| LOW | …eed/model_implementations/transformers/clip_encoder.py | 27 | def _build_causal_attention_mask(self, bsz, seq_len, dtype): | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 110 | def resolve_row_weighting_impl(config_override: Literal["auto", "eager", "fused"]) -> Literal["eager", "fused"]: | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 130 | def _copy_e_score_correction_bias( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 157 | def apply_scores_before_experts_if_enabled( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 179 | def _split_plan_from_expert_counts( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 219 | def _get_async_split_plan_stream(device_index: int): | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 223 | def _start_async_split_plan_from_expert_counts( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 305 | def compute_split_plan_from_expert_indices( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 435 | def unpermute_by_local_expert( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 756 | def set_deepspeed_parallelism( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 1123 | def collect_replacement_sources(source_module, replacement, spec, ep_size, ep_rank): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 395 | def set_tensor_parallel_config(self, mp_size, mp_group): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 547 | def _create_row_parallel_layer(self, module, spec: TPLayerSpec, name: str): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 578 | def _create_column_parallel_layer(self, module, spec: TPLayerSpec, name: str): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 603 | def _find_tied_weight_partners(self): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 617 | def _find_tied_row_parallel_embedding_ids(self): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 635 | def _validate_row_parallel_head_ties(self, head): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 645 | def _replace_tied_row_parallel_embeddings(self, row_parallel_head, tied_embeddings): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 673 | def _default_lm_head_patterns(): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 688 | def _is_vocab_parallel_lm_head(self, child, name): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 693 | def _create_vocab_parallel_layer(self, child, name): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 722 | def _find_tied_embedding_modules(self, lm_head): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 739 | def _validate_vocab_parallel_layer(self, child, name): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 750 | def _warn_overridden_lm_head_spec(self, name): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 763 | def _warn_overridden_embedding_spec(self, name): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 780 | def _resolve_vocab_parallel_lm_head(self): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 802 | def _replace_vocab_parallel_lm_head(self): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 808 | def _configure_gathered_column_tie_fallbacks(self): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 931 | def register_replicated_grad_hooks(self, model): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 1018 | def _replace_autoep_shared_experts(self, autoep_layer, autoep_name): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 1108 | def _replace_last_linear_module(self, r_module): | CODE |
| LOW | deepspeed/module_inject/fusedqkv_utils.py | 10 | def split_by_qkvlist_and_refuse(qkv_list, split_size, split_dim=0, cat_dim=0): | CODE |
| LOW | deepspeed/module_inject/fusedqkv_utils.py | 86 | def set_fused_qkv_shard_state(module, shard_widths, tp_index): | CODE |
| LOW | deepspeed/module_inject/fusedqkv_utils.py | 239 | def shard_value_with_share_qk( | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 130 | def expected_folding_group_tables(spec: ParallelFoldingSpec) -> FoldingGroupTables: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 261 | def mark_autoep_folding_router_parameter(param) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 277 | def mark_autoep_folding_partial_router_parameter(param) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 294 | def mark_autoep_folding_sp_sharded_layernorm_parameter(param) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 314 | def _is_model_parallel_param_marker(param) -> bool: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 318 | def _autoep_folding_param_family(param, *, param_name: str | None = None) -> str | None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 337 | def autoep_folding_gradient_reduction_strategy( | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 421 | def reduce_autoep_folding_gradient( | CODE |
| LOW⚡ | deepspeed/module_inject/auto_ep_folding.py | 461 | def is_autoep_folding_gradient_corrected(param) -> bool: | CODE |
| LOW⚡ | deepspeed/module_inject/auto_ep_folding.py | 465 | def clear_autoep_folding_gradient_corrected(param) -> None: | CODE |
| LOW⚡ | deepspeed/module_inject/auto_ep_folding.py | 470 | def apply_folding_correction_to_grad_buffer( | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 492 | def assert_group_matches_spec(existing_rank_lists, spec: ParallelFoldingSpec, *, group_kind: str = "ep_edp") -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 44 | def _remove_transformers_output_capture_hooks(model: nn.Module) -> int: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 73 | def _raise_if_duplicate_moe_specs(specs: list[MoELayerSpec]) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 89 | def _resolve_e_score_correction_bias_path(moe_module: nn.Module, module_name: str) -> str | None: | CODE |
| 2914 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csrc/aio/py_test/torch_io.py | 10 | CODE | |
| LOW | csrc/aio/py_test/ds_aio_basic.py | 13 | CODE | |
| LOW | csrc/aio/py_test/ds_aio_handle.py | 11 | CODE | |
| LOW | csrc/aio/py_test/torch_fastio_engine.py | 11 | CODE | |
| LOW | deepspeed/git_version_info.py | 8 | CODE | |
| LOW | deepspeed/__init__.py | 17 | CODE | |
| LOW | deepspeed/__init__.py | 18 | CODE | |
| LOW | deepspeed/__init__.py | 36 | CODE | |
| LOW | deepspeed/__init__.py | 37 | CODE | |
| LOW | deepspeed/__init__.py | 42 | CODE | |
| LOW | deepspeed/__init__.py | 42 | CODE | |
| LOW | deepspeed/__init__.py | 50 | CODE | |
| LOW | deepspeed/__init__.py | 51 | CODE | |
| LOW | deepspeed/__init__.py | 52 | CODE | |
| LOW | deepspeed/__init__.py | 53 | CODE | |
| LOW | deepspeed/__init__.py | 53 | CODE | |
| LOW | deepspeed/__init__.py | 54 | CODE | |
| LOW | deepspeed/__init__.py | 54 | CODE | |
| LOW | deepspeed/__init__.py | 56 | CODE | |
| LOW | deepspeed/__init__.py | 59 | CODE | |
| LOW | deepspeed/__init__.py | 60 | CODE | |
| LOW | deepspeed/__init__.py | 29 | CODE | |
| LOW | deepspeed/model_implementations/__init__.py | 6 | CODE | |
| LOW | deepspeed/model_implementations/__init__.py | 7 | CODE | |
| LOW | deepspeed/pipe/__init__.py | 6 | CODE | |
| LOW | deepspeed/pipe/__init__.py | 6 | CODE | |
| LOW | deepspeed/pipe/__init__.py | 6 | CODE | |
| LOW | deepspeed/pipe/__init__.py | 7 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 15 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 15 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 11 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 6 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 6 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 6 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 6 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 6 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 7 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 8 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 9 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 9 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 9 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 9 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 9 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 9 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 9 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 10 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 11 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 11 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 11 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 11 | CODE | |
| LOW | deepspeed/module_inject/__init__.py | 11 | CODE | |
| LOW | deepspeed/module_inject/auto_ep.py | 11 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_config.py | 7 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_config.py | 9 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_config.py | 16 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_comm.py | 22 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_preset_adapters.py | 5 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_preset_adapters.py | 5 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_preset_adapters.py | 5 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_preset_adapters.py | 5 | CODE | |
| 673 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | csrc/aio/py_test/aio_bench_generate_param.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/ds_aio_args.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/test_ds_aio_utils.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/validate_async_io.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/test_ds_aio.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/aio_bench_perf_sweep.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/ds_aio_basic.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/parse_aio_stats.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/gds/py_test/validate_gds.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/ds_aio_args.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/test_ds_aio_utils.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/validate_async_io.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/test_ds_aio.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/perf_generate_param.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/ds_aio_basic.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/ds_aio_handle.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/parse_nvme_stats.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/perf_run_sweep.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | …eed/runtime/swap_tensor/pipelined_optimizer_swapper.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | …d/runtime/swap_tensor/partitioned_optimizer_swapper.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | csrc/aio/py_test/ds_aio_job.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/nvme/ds_aio_job.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/runtime/swap_tensor/optimizer_utils.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | …speed/runtime/swap_tensor/partitioned_param_swapper.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/runtime/swap_tensor/utils.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/runtime/swap_tensor/async_swapper.py | 0 | functionality of swapping tensors to/from (nvme) storage devices. | STRING |
| HIGH | deepspeed/module_inject/containers/gptj.py | 0 | necessary to implement for `hybridsplitqkvcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/opt.py | 0 | necessary to implement for `hybridsplitqkvcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/llama.py | 0 | necessary to implement for `hybridsplitqkvcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/gptneo.py | 0 | necessary to implement for `hybridsplitqkvcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/internlm.py | 0 | necessary to implement for `hybridsplitqkvcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/llama2.py | 0 | necessary to implement for `hybridsplitqkvcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/llama.py | 0 | necessary to implement for `hybridgatedmlpcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/internlm.py | 0 | necessary to implement for `hybridgatedmlpcontainer` | STRING |
| HIGH | deepspeed/module_inject/containers/llama2.py | 0 | necessary to implement for `hybridgatedmlpcontainer` | STRING |
| HIGH | deepspeed/runtime/tensor_parallel/config.py | 0 | number of devices to split the model across using tensor parallelism. | STRING |
| HIGH | deepspeed/inference/config.py | 0 | number of devices to split the model across using tensor parallelism. | STRING |
| HIGH | deepspeed/inference/v2/config_v2.py | 0 | number of devices to split the model across using tensor parallelism. | STRING |
| HIGH | deepspeed/runtime/tensor_parallel/config.py | 0 | configuration for tensor parallelism used to split the model across several gpus. expects a dictionary containing values | STRING |
| HIGH | deepspeed/inference/config.py | 0 | configuration for tensor parallelism used to split the model across several gpus. expects a dictionary containing values | STRING |
| HIGH | deepspeed/inference/v2/config_v2.py | 0 | configuration for tensor parallelism used to split the model across several gpus. expects a dictionary containing values | STRING |
| HIGH | deepspeed/runtime/zero/stage_1_and_2.py | 0 | returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of : | STRING |
| HIGH | deepspeed/runtime/zero/stage3.py | 0 | returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of : | STRING |
| HIGH | deepspeed/runtime/fp16/fused_optimizer.py | 0 | returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of : | STRING |
| HIGH | deepspeed/runtime/fp16/unfused_optimizer.py | 0 | returns a dict containing the current state of this :class:`fp16_optimizer` instance. this dict contains attributes of : | STRING |
| HIGH | deepspeed/runtime/zero/stage_1_and_2.py | 0 | loads a state_dict created by an earlier call to state_dict(). if ``fp16_optimizer_instance`` was constructed from some | STRING |
| HIGH | deepspeed/runtime/zero/stage3.py | 0 | loads a state_dict created by an earlier call to state_dict(). if ``fp16_optimizer_instance`` was constructed from some | STRING |
| HIGH | deepspeed/runtime/fp16/fused_optimizer.py | 0 | loads a state_dict created by an earlier call to state_dict(). if ``fp16_optimizer_instance`` was constructed from some | STRING |
| HIGH | deepspeed/runtime/fp16/unfused_optimizer.py | 0 | loads 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.py | 0 | return preferred granulatity for blocked kv-cache implementation. | STRING |
| HIGH | …s/implementations/attention/dense_blocked_attention.py | 0 | return preferred granulatity for blocked kv-cache implementation. | STRING |
| HIGH | …peed/inference/v2/modules/interfaces/attention_base.py | 0 | return preferred granulatity for blocked kv-cache implementation. | STRING |
| HIGH | …gged_ops/linear_blocked_kv_rotary/blocked_kv_rotary.py | 0 | cuda kernel implementation that will perform rotary position embeddings on the queries and keys before copying into a bl | STRING |
| HIGH | …ops/linear_blocked_kv_rotary/linear_blocked_kv_copy.py | 0 | cuda kernel implementation that will perform rotary position embeddings on the queries and keys before copying into a bl | STRING |
| HIGH | …/linear_blocked_kv_rotary/blocked_trained_kv_rotary.py | 0 | cuda kernel implementation that will perform rotary position embeddings on the queries and keys before copying into a bl | STRING |
| HIGH | …gged_ops/linear_blocked_kv_rotary/blocked_kv_rotary.py | 0 | args: head_size: the size of the attention head. dtype: data type for the input/output. supported values are torch.float | STRING |
| HIGH | …ops/linear_blocked_kv_rotary/linear_blocked_kv_copy.py | 0 | args: head_size: the size of the attention head. dtype: data type for the input/output. supported values are torch.float | STRING |
| HIGH | …/linear_blocked_kv_rotary/blocked_trained_kv_rotary.py | 0 | args: head_size: the size of the attention head. dtype: data type for the input/output. supported values are torch.float | STRING |
| HIGH | …v2/model_implementations/inference_transformer_base.py | 0 | the positional embedding configuration for the model. | STRING |
| HIGH | …ed/inference/v2/model_implementations/mixtral/model.py | 0 | the positional embedding configuration for the model. | STRING |
| 82 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 40 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 42 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 88 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 501 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 503 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 37 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 39 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 99 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 101 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/runtime/rollout/hybrid_engine_rollout.py | 968 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/runtime/rollout/hybrid_engine_rollout.py | 970 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | …epspeed/ops/transformer/inference/triton/matmul_ext.py | 19 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …epspeed/ops/transformer/inference/triton/matmul_ext.py | 126 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …epspeed/ops/transformer/inference/triton/matmul_ext.py | 471 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/auto_sp.py | 82 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/sequence/auto_sp.py | 84 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/sequence/auto_sp.py | 96 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/sequence/auto_sp.py | 98 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/sequence/auto_sp.py | 115 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/sequence/auto_sp.py | 117 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | deepspeed/sequence/auto_sp.py | 129 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | deepspeed/sequence/auto_sp.py | 131 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_detector.py | 17 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_detector.py | 19 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_detector.py | 67 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_detector.py | 69 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_detector.py | 84 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_detector.py | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | deepspeed/sequence/test_autosp.py | 274 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | deepspeed/sequence/test_autosp.py | 276 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 28 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 31 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 87 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 89 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 109 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 111 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 161 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 163 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 215 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 217 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 393 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 395 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 503 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 505 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 612 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/test_autosp.py | 614 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 72 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 74 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 104 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 106 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 138 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 140 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 155 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/sequence/autosp_vit.py | 159 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/moe/ep_experts.py | 33 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/moe/ep_experts.py | 35 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/moe/ep_experts.py | 139 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/moe/ep_experts.py | 141 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/moe/ep_experts.py | 204 | # --------------------------------------------------------------------------- | COMMENT |
| 135 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | deepspeed/launcher/launch.py | 128 | except psutil.NoSuchProcess: | CODE |
| HIGH | deepspeed/launcher/launch.py | 256 | except (OSError, psutil.Error): | CODE |
| HIGH | deepspeed/runtime/engine.py | 1998 | except ImportError: | CODE |
| HIGH | deepspeed/runtime/engine.py | 1392 | except AttributeError: | CODE |
| HIGH | deepspeed/runtime/pipe/module.py | 438 | except AttributeError: | CODE |
| HIGH | deepspeed/runtime/swap_tensor/utils.py | 241 | except Exception: | CODE |
| HIGH | deepspeed/runtime/zero/utils.py | 54 | except ImportError: | CODE |
| HIGH | deepspeed/runtime/zero/utils.py | 62 | except ImportError: | CODE |
| HIGH | deepspeed/runtime/zero/muon/muon_optimizer.py | 12 | except ImportError: | CODE |
| HIGH | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 84 | except RuntimeError: | CODE |
| HIGH | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 116 | except Exception: | CODE |
| HIGH | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 222 | except Exception: | CODE |
| HIGH | deepspeed/comm/comm.py | 804 | except (RuntimeError, ValueError): | CODE |
| HIGH | deepspeed/comm/ccl.py | 175 | except (ValueError, RuntimeError): | CODE |
| HIGH | deepspeed/comm/torch.py | 239 | except Exception: | CODE |
| HIGH | deepspeed/utils/pin_memory.py | 135 | except Exception: | CODE |
| HIGH | deepspeed/compile/patch_fake_tensor.py | 18 | except ImportError: | CODE |
| HIGH | deepspeed/compile/backend.py | 21 | except ImportError: | CODE |
| HIGH | deepspeed/compile/partitioner.py | 14 | except ImportError: | CODE |
| HIGH | deepspeed/compile/util.py | 18 | except ImportError: | CODE |
| HIGH | deepspeed/compile/input_storage.py | 108 | except Exception as e: | CODE |
| HIGH | deepspeed/compile/input_storage.py | 129 | except RuntimeError: | CODE |
| HIGH | deepspeed/compile/input_storage.py | 98 | except RuntimeError: | CODE |
| HIGH | deepspeed/compile/list_schedule.py | 17 | except ImportError: | CODE |
| HIGH | deepspeed/compile/inductor.py | 17 | except ImportError: | CODE |
| HIGH | deepspeed/compile/passes/offload_activation.py | 20 | except ImportError: | CODE |
| HIGH | deepspeed/compile/passes/offload_adam_states.py | 18 | except ImportError: | CODE |
| HIGH | deepspeed/compile/profilers/comm_profile.py | 11 | except ImportError: | CODE |
| HIGH | deepspeed/compile/profilers/graph_profile.py | 17 | except ImportError: | CODE |
| HIGH | deepspeed/compile/profilers/graph_profile.py | 138 | except Exception: | CODE |
| HIGH | deepspeed/compile/profilers/graph_profile.py | 182 | except Exception: | CODE |
| HIGH | deepspeed/profiling/flops_profiler/profiler.py | 181 | except ValueError: | CODE |
| HIGH | deepspeed/inference/v2/inference_parameter.py | 50 | except (RuntimeError, TypeError, IndexError): | CODE |
| HIGH | ci/test_tests_fetcher.py | 573 | except ValueError: | CODE |
| HIGH | ci/test_tests_fetcher.py | 622 | except ValueError: | CODE |
| HIGH | ci/test_tests_fetcher.py | 613 | except ValueError: | CODE |
| HIGH | op_builder/builder.py | 213 | except ImportError: | CODE |
| HIGH | op_builder/builder.py | 232 | except Exception: | CODE |
| HIGH | op_builder/mps/fused_adam.py | 9 | except ImportError as e: | CODE |
| HIGH | op_builder/mps/fused_adam.py | 134 | except RuntimeError: | CODE |
| HIGH | op_builder/sdaa/fused_adam.py | 36 | except ImportError as e: | CODE |
| HIGH | op_builder/mlu/fused_adam.py | 11 | except ImportError as e: | CODE |
| HIGH | op_builder/npu/fused_adam.py | 11 | except ImportError as e: | CODE |
| HIGH | op_builder/npu/quantizer.py | 6 | except ImportError: | CODE |
| HIGH | op_builder/npu/builder.py | 10 | except ImportError as e: | CODE |
| HIGH | op_builder/npu/fused_lion.py | 6 | except ImportError: | CODE |
| HIGH | op_builder/npu/inference.py | 12 | except ImportError as e: | CODE |
| HIGH | op_builder/npu/fused_lamb.py | 8 | except ImportError: | CODE |
| HIGH | op_builder/supa/fused_adam.py | 9 | except ImportError: | CODE |
| HIGH | op_builder/supa/quantizer.py | 7 | except ImportError: | CODE |
| HIGH | op_builder/supa/fused_lion.py | 8 | except Exception: | CODE |
| HIGH | op_builder/supa/inference.py | 10 | except ImportError: | CODE |
| HIGH | op_builder/supa/fused_lamb.py | 10 | except Exception: | CODE |
| HIGH | op_builder/hpu/fused_adam.py | 18 | except ImportError as e: | CODE |
| HIGH | tests/unit/common.py | 178 | except FixtureLookupError: | CODE |
| HIGH | tests/unit/v1/compile/test_list_schedule.py | 36 | except AttributeError: | CODE |
| HIGH | tests/unit/launcher/test_ds_arguments.py | 111 | except ValueError as e: | CODE |
| HIGH | tests/unit/launcher/test_ds_arguments.py | 120 | except ValueError as e: | CODE |
| HIGH | tests/unit/launcher/test_ds_arguments.py | 129 | except ValueError as e: | CODE |
| HIGH | tests/unit/runtime/zero/test_zero_leaf_module.py | 422 | except RuntimeError as e: | CODE |
| 17 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csrc/aio/py_test/aio_bench_perf_sweep.py | 158 | CODE | |
| LOW | csrc/aio/py_test/parse_aio_stats.py | 36 | CODE | |
| LOW | csrc/aio/py_test/parse_aio_stats.py | 88 | CODE | |
| LOW | deepspeed/__init__.py | 351 | CODE | |
| LOW | deepspeed/env_report.py | 84 | CODE | |
| LOW | deepspeed/launcher/runner.py | 225 | CODE | |
| LOW | deepspeed/launcher/runner.py | 292 | CODE | |
| LOW | deepspeed/launcher/runner.py | 439 | CODE | |
| LOW | deepspeed/launcher/launcher_helper.py | 55 | CODE | |
| LOW | deepspeed/launcher/launch.py | 135 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 874 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 162 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 279 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 342 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 405 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 512 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 1018 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 1038 | CODE | |
| LOW | deepspeed/module_inject/tp_plan_converter.py | 20 | CODE | |
| LOW | deepspeed/module_inject/fusedqkv_utils.py | 105 | CODE | |
| LOW | deepspeed/module_inject/fusedqkv_utils.py | 184 | CODE | |
| LOW | deepspeed/module_inject/policy.py | 131 | CODE | |
| LOW | deepspeed/module_inject/auto_ep.py | 294 | CODE | |
| LOW | deepspeed/module_inject/auto_ep.py | 348 | CODE | |
| LOW | deepspeed/module_inject/auto_ep.py | 417 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 28 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 87 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 188 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 626 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 686 | CODE | |
| LOW | deepspeed/module_inject/load_checkpoint.py | 23 | CODE | |
| LOW | deepspeed/module_inject/load_checkpoint.py | 60 | CODE | |
| LOW | deepspeed/module_inject/load_checkpoint.py | 222 | CODE | |
| LOW | deepspeed/module_inject/load_checkpoint.py | 63 | CODE | |
| LOW | deepspeed/module_inject/layers.py | 686 | CODE | |
| LOW | deepspeed/module_inject/layers.py | 1849 | CODE | |
| LOW | deepspeed/module_inject/autotp_config.py | 151 | CODE | |
| LOW | deepspeed/monitor/csv_monitor.py | 22 | CODE | |
| LOW | deepspeed/monitor/csv_monitor.py | 40 | CODE | |
| LOW | deepspeed/monitor/tensorboard.py | 27 | CODE | |
| LOW | deepspeed/nvme/parse_nvme_stats.py | 36 | CODE | |
| LOW | deepspeed/nvme/parse_nvme_stats.py | 88 | CODE | |
| LOW | deepspeed/nvme/perf_run_sweep.py | 167 | CODE | |
| LOW | deepspeed/checkpoint/affine_transfer.py | 335 | CODE | |
| LOW | deepspeed/checkpoint/affine_transfer.py | 364 | CODE | |
| LOW | deepspeed/checkpoint/affine_transfer.py | 599 | CODE | |
| LOW | deepspeed/checkpoint/universal_checkpoint.py | 236 | CODE | |
| LOW | deepspeed/checkpoint/affine.py | 219 | CODE | |
| LOW | deepspeed/checkpoint/autoep_universal.py | 159 | CODE | |
| LOW | deepspeed/checkpoint/autoep_universal.py | 288 | CODE | |
| LOW | deepspeed/checkpoint/autoep_universal.py | 413 | CODE | |
| LOW | deepspeed/checkpoint/utils.py | 41 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 173 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 298 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 824 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 1107 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 1156 | CODE | |
| LOW | deepspeed/runtime/hybrid_engine.py | 237 | CODE | |
| LOW | deepspeed/runtime/hybrid_engine.py | 346 | CODE | |
| LOW | deepspeed/runtime/hybrid_engine.py | 377 | CODE | |
| 318 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csrc/cpu/comm/shm_interface.cpp | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/cpu/comm/shm_interface.cpp | 161 | } | COMMENT |
| LOW | csrc/cpu/comm/ccl.cpp | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/cpu/comm/shm.cpp | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/cpu/comm/riscv64/shm.h | 61 | __attribute__((target("arch=+v,+zvfh"))); | COMMENT |
| LOW | csrc/cpu/comm/riscv64/shm.h | 81 | #define CVT_FP16_TO_FP32(X) cvt_fp16_to_fp32(X, vl) | COMMENT |
| LOW | csrc/cpu/comm/arm64/shm.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/cpu/comm/arm64/shm.h | 81 | // Reduce functions down below use vectorized algorithm, the number of bytes processed each | COMMENT |
| LOW | csrc/cpu/comm/arm64/shm.h | 101 | #define VADD_F32_2VL(A, B) vaddq_f32(A, B) | COMMENT |
| LOW | csrc/cpu/comm/x86_64/shm.h | 61 | #define VLOAD_U16(X) _mm256_loadu_si256((__m256i*)(X)) | COMMENT |
| LOW | csrc/deepspeed4science/evoformer_attn/kernel_forward.h | 41 | #include <vector> | COMMENT |
| LOW | csrc/deepspeed4science/evoformer_attn/kernel_forward.h | 61 | #include "cutlass/gemm/threadblock/default_mma_core_sm80.h" | COMMENT |
| LOW | csrc/deepspeed4science/evoformer_attn/kernel_backward.h | 41 | #include <vector> | COMMENT |
| LOW | csrc/deepspeed4science/evoformer_attn/kernel_backward.h | 61 | #include "cutlass/epilogue/warp/fragment_iterator_tensor_op.h" | COMMENT |
| LOW | csrc/deepspeed4science/evoformer_attn/kernel_backward.h | 801 | // part1 - after Q.K / dV / dO.V | COMMENT |
| LOW | …ed4science/evoformer_attn/gemm/custom_mma_multistage.h | 41 | COMMENT | |
| LOW | …ed4science/evoformer_attn/gemm/custom_mma_multistage.h | 61 | ///////////////////////////////////////////////////////////////////////////////////////////////// | COMMENT |
| LOW | …/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h | 41 | COMMENT | |
| LOW | …/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h | 61 | #include "../epilogue/epilogue_thread_apply_logsumexp.h" | COMMENT |
| LOW | …/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h | 321 | // BEGIN smem | COMMENT |
| LOW | …/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h | 661 | template < | COMMENT |
| LOW | …/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h | 1301 | /// Iterates over tiles of A operand in global memory | COMMENT |
| LOW | …/deepspeed4science/evoformer_attn/gemm/mma_from_smem.h | 1381 | COMMENT | |
| LOW | …eepspeed4science/evoformer_attn/gemm/custom_mma_base.h | 41 | COMMENT | |
| LOW | …eed4science/evoformer_attn/gemm/custom_mma_pipelined.h | 61 | ///////////////////////////////////////////////////////////////////////////////////////////////// | COMMENT |
| LOW | …ence/evoformer_attn/epilogue/epilogue_rescale_output.h | 61 | #include "cutlass/layout/tensor.h" | COMMENT |
| LOW | …d4science/evoformer_attn/epilogue/epilogue_pipelined.h | 61 | #include "cutlass/functional.h" | COMMENT |
| LOW | …ttn/iterators/predicated_tile_iterator_residual_last.h | 61 | namespace threadblock { | COMMENT |
| LOW | …ttn/iterators/predicated_tile_iterator_residual_last.h | 81 | /// Adding a logical coordinate offset may be performed at the time the iterator | COMMENT |
| LOW | …ttn/iterators/predicated_tile_iterator_residual_last.h | 101 | /// | COMMENT |
| LOW | …ttn/iterators/predicated_tile_iterator_residual_last.h | 121 | // | COMMENT |
| LOW | …ttn/iterators/predicated_tile_iterator_residual_last.h | 1861 | } | COMMENT |
| LOW | …mer_attn/iterators/epilogue_predicated_tile_iterator.h | 41 | Mostly copied from "cutlass/epilogue/threadblock/predicated_tile_iterator.h" | COMMENT |
| LOW | …rators/predicated_tile_access_iterator_residual_last.h | 221 | int const* indices = nullptr) | COMMENT |
| LOW | …rators/predicated_tile_access_iterator_residual_last.h | 781 | COMMENT | |
| LOW | …rators/predicated_tile_access_iterator_residual_last.h | 821 | /// Gets the mask | COMMENT |
| LOW | …rators/predicated_tile_access_iterator_residual_last.h | 1701 | AccessType* get() const { return reinterpret_cast<AccessType*>(iterator_.get()); } | COMMENT |
| LOW | …rators/predicated_tile_access_iterator_residual_last.h | 1741 | COMMENT | |
| LOW | csrc/transformer/ds_transformer_cuda.cpp | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/transformer/inference/csrc/pt_binding.cpp | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | …transformer/inference/includes/inference_cuda_layers.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | …sformer/inference/includes/inference_cublas_wrappers.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/transformer/inference/includes/inference_context.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/xpu/includes/type_shim.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/xpu/includes/simd.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/xpu/includes/simd.h | 21 | #define SIMD_SET(x) _mm512_set1_ps(x) | COMMENT |
| LOW | csrc/xpu/includes/simd.h | 41 | #define SIMD_STORE(a, d) _mm256_storeu_ps(a, d) | COMMENT |
| LOW | csrc/xpu/includes/compat.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/xpu/includes/cpu_adam.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/xpu/adagrad/cpu_adagrad.cpp | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/xpu/adam/multi_tensor_apply.dp.hpp | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/ds_transformer_cuda.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/cpu_lion.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/deepcompile.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/context.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/cublas_wrappers.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/cpu_adagrad.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/ds_kernel_utils.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| LOW | csrc/includes/ds_kernel_utils.h | 21 | #include <cuda_bf16.h> | COMMENT |
| LOW | csrc/includes/type_shim.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| 117 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csrc/aio/py_test/parse_aio_stats.py | 53 | except Exception: | CODE |
| LOW | deepspeed/launcher/launch.py | 205 | except Exception as e: | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 931 | except Exception: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 228 | except Exception: | CODE |
| LOW | deepspeed/module_inject/auto_ep_comm.py | 190 | except Exception: | CODE |
| LOW | deepspeed/module_inject/auto_ep_presets/base.py | 221 | except Exception as exc: | CODE |
| LOW | deepspeed/module_inject/containers/bloom.py | 116 | except Exception as e: | CODE |
| MEDIUM | deepspeed/checkpoint/deepspeed_checkpoint.py | 332 | print(f'Error: {file} is not existent') | CODE |
| MEDIUM | deepspeed/checkpoint/reshape_utils.py | 31 | print(f'Error: {file} is not existent') | CODE |
| LOW | deepspeed/runtime/hybrid_engine_graph.py | 175 | except Exception as err: | CODE |
| MEDIUM | deepspeed/runtime/engine.py | 1242 | def __del__(self): | CODE |
| LOW | deepspeed/runtime/engine.py | 1245 | except Exception as exc: | CODE |
| LOW | deepspeed/runtime/torch_autocast.py | 51 | except Exception as e: | CODE |
| LOW | deepspeed/runtime/config_utils.py | 77 | except Exception as e: | CODE |
| LOW | deepspeed/runtime/config_utils.py | 95 | except Exception as e: | CODE |
| LOW | …d/runtime/data_pipeline/data_sampling/data_analyzer.py | 560 | except Exception as e: | CODE |
| LOW | deepspeed/runtime/swap_tensor/utils.py | 241 | except Exception: | CODE |
| LOW | …untime/activation_checkpointing/offload_activations.py | 488 | except Exception: | CODE |
| LOW | …untime/activation_checkpointing/offload_activations.py | 496 | except Exception as err: | CODE |
| LOW | deepspeed/runtime/superoffload/superoffload_utils.py | 165 | except Exception as e: | CODE |
| LOW | deepspeed/runtime/superoffload/superoffload_utils.py | 235 | except Exception as e: | CODE |
| LOW | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 65 | except Exception as e: | CODE |
| LOW | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 116 | except Exception: | CODE |
| LOW | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 216 | except Exception as e: | CODE |
| LOW | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 222 | except Exception: | CODE |
| MEDIUM | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 42 | def init_decoupled_checkpoint(config_params, dp_writer_config, save_event, save_ | CODE |
| MEDIUM | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 113 | def __del__(self): | CODE |
| LOW | …time/checkpoint_engine/datastates_checkpoint_engine.py | 25 | except Exception as e: | CODE |
| LOW | deepspeed/comm/mori.py | 168 | except Exception as e: | CODE |
| LOW | deepspeed/comm/mori.py | 224 | except Exception as e: | CODE |
| LOW | deepspeed/comm/torch.py | 239 | except Exception: | CODE |
| LOW | deepspeed/utils/pin_memory.py | 37 | except Exception as e: | CODE |
| LOW | deepspeed/utils/pin_memory.py | 75 | except Exception as e: | CODE |
| LOW | deepspeed/utils/pin_memory.py | 127 | except Exception: | CODE |
| LOW | deepspeed/utils/pin_memory.py | 135 | except Exception: | CODE |
| MEDIUM | deepspeed/utils/pin_memory.py | 124 | def _release(handle, begin, ranges, finalizers, device_registered): | CODE |
| LOW | deepspeed/utils/torch.py | 58 | except Exception: | CODE |
| LOW | deepspeed/utils/torch.py | 67 | except Exception: | CODE |
| LOW | deepspeed/compile/input_storage.py | 108 | except Exception as e: | CODE |
| LOW | deepspeed/compile/input_storage.py | 139 | except Exception as e: | CODE |
| LOW | deepspeed/compile/passes/offload_activation.py | 217 | except Exception as e: | CODE |
| LOW | deepspeed/compile/passes/offload_activation.py | 285 | except Exception: | CODE |
| LOW | deepspeed/compile/passes/offload_activation.py | 514 | except Exception: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 49 | except Exception as e: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 138 | except Exception: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 182 | except Exception: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 239 | except Exception as e: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 363 | except Exception as e: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 449 | except Exception as e: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 482 | except Exception as e: | CODE |
| LOW | deepspeed/ops/triton_ops/_triton.py | 14 | except Exception: | CODE |
| LOW | deepspeed/autotuning/autotuner.py | 33 | except Exception as e: | CODE |
| LOW | deepspeed/autotuning/tuner/base_tuner.py | 70 | except Exception: | CODE |
| LOW | deepspeed/moe/sharded_moe.py | 50 | except Exception: | CODE |
| LOW | deepspeed/moe/ep_tp_dispatch.py | 195 | except Exception: | CODE |
| LOW | ci/tests_fetcher.py | 729 | except Exception: # noqa: BLE001 -- explain is a diagnostic, never fail CI on it | CODE |
| LOW | ci/tests_fetcher.py | 737 | except Exception: # noqa: BLE001 | CODE |
| LOW | ci/test_tests_fetcher.py | 644 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | ci/test_torch_latest.py | 1730 | except Exception as exc: # noqa: BLE001 | STRING |
| LOW | op_builder/builder.py | 78 | except Exception as err: | CODE |
| 39 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …s/transformer/inference/triton/triton_matmul_kernel.py | 29 | max_shared_memory = triton.runtime.driver.active.utils.get_device_properties(device)["max_shared_mem"] | CODE |
| CRITICAL | …s/transformer/inference/triton/triton_matmul_kernel.py | 224 | max_shared_memory = triton.runtime.driver.active.utils.get_device_properties(device)["max_shared_mem"] | CODE |
| CRITICAL | tests/unit/modeling.py | 433 | self.attention.output.LayerNorm.weight.register_hook(lambda x, self=self: grads.append([x, "N2_W"])) | CODE |
| CRITICAL | tests/unit/modeling.py | 434 | self.attention.output.LayerNorm.bias.register_hook(lambda x, self=self: grads.append([x, "N2_B"])) | CODE |
| CRITICAL | tests/unit/v1/zero/test_zero.py | 1635 | assert model.l2.linear.weight.ds_tensor.numel() == ds_tensor_numel | CODE |
| CRITICAL | tests/unit/v1/zero/test_zero.py | 1638 | assert model.l4.linear.weight.ds_tensor.numel() == ds_tensor_numel | CODE |
| CRITICAL | tests/unit/v1/autotp/test_autotp_training.py | 1262 | accumulated_gradient = engine.module.projection.weight.grad.detach().clone() | CODE |
| CRITICAL | …s/unit/v1/half_precision/test_mixed_precision_dtype.py | 220 | assert engine.module.quantized.weight.data.view(torch.uint8).eq(9).all() | CODE |
| CRITICAL⚡ | …ts/unit/v1/half_precision/test_keep_in_fp32_modules.py | 203 | assert torch.equal(engine.module.child.inner.router_bias.cpu(), EXACT_VALUES) | CODE |
| CRITICAL | tests/unit/inference/test_inference.py | 360 | if pipe.tokenizer.model_max_length < deepspeed.ops.transformer.inference.config.DeepSpeedInferenceConfig( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | deepspeed/launcher/runner.py | 258 | # Create a new list in the same order as original but with duplicates | STRING |
| MEDIUM | deepspeed/module_inject/layers.py | 615 | # This function is designed for | COMMENT |
| MEDIUM | deepspeed/module_inject/containers/base_moe.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | deepspeed/module_inject/containers/base.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | deepspeed/runtime/zero/parameter_offload.py | 632 | """This function is used to recursively obtain the granularity of each module.""" | STRING |
| MEDIUM | …peed/runtime/activation_checkpointing/checkpointing.py | 568 | """This function is adapted from torch.utils.checkpoint with | STRING |
| MEDIUM | …peed/runtime/activation_checkpointing/checkpointing.py | 789 | """This function is union of `torch.utils.checkpoint._checkpoint_without_reentrant` and `CheckpointFunction` in this | STRING |
| MEDIUM | deepspeed/comm/comm.py | 901 | # Create a torch backend object, initialize torch distributed, and assign to cdb | COMMENT |
| MEDIUM | deepspeed/utils/comms_logging.py | 186 | # Create a snapshot to avoid concurrent modification issues | COMMENT |
| MEDIUM | deepspeed/utils/comms_logging.py | 270 | # Create a snapshot of the dictionary to avoid concurrent modification issues | COMMENT |
| MEDIUM⚡ | deepspeed/compile/backend.py | 186 | # Create a set of parameter indices for quick lookup | COMMENT |
| MEDIUM | deepspeed/compile/backend.py | 356 | # Create an InputStorage instance for this specific graph | COMMENT |
| MEDIUM | deepspeed/compile/input_storage.py | 112 | # Create a tensor with the stored metadata (original behavior for non-int tensors) | COMMENT |
| MEDIUM | deepspeed/compile/profilers/comm_profile.py | 152 | # Create an interpolation function | COMMENT |
| MEDIUM | …nference/v2/model_implementations/mixtral/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …ence/v2/model_implementations/qwen_v2_moe/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …/inference/v2/model_implementations/phi3/containers.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …d/inference/v2/model_implementations/qwen/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …nference/v2/model_implementations/qwen_v2/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …ference/v2/model_implementations/llama_v2/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …ed/inference/v2/model_implementations/opt/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …inference/v2/model_implementations/falcon/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …d/inference/v2/model_implementations/phi/containers.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | …nference/v2/model_implementations/mistral/container.py | 6 | # Create a container object to save model-specific tensors using the policy file above. | COMMENT |
| MEDIUM | deepspeed/moe/sharded_moe.py | 152 | # The following functions are extracted and scripted | COMMENT |
| MEDIUM | deepspeed/moe/sharded_moe.py | 253 | # Create a mask for 1st's expert per token | COMMENT |
| MEDIUM | deepspeed/moe/sharded_moe.py | 352 | # Create a mask for 1st's expert per token | COMMENT |
| MEDIUM | deepspeed/moe/sharded_moe.py | 358 | # Create a mask for 2nd's expert per token using Gumbel-max trick | COMMENT |
| MEDIUM | deepspeed/moe/utils.py | 99 | # Create the param MoE groups, leave param assign to next step | COMMENT |
| MEDIUM⚡ | op_builder/builder.py | 354 | # Create a compiler object. | COMMENT |
| MEDIUM⚡ | op_builder/builder.py | 360 | # Create a temporary directory to hold test files. | COMMENT |
| MEDIUM⚡ | op_builder/builder.py | 363 | # Define a simple C program that calls the function in question | COMMENT |
| MEDIUM | tests/unit/ulysses_alst/test_ulysses_sp_hf.py | 208 | # Create a mock PEFT model object that has config but doesn't inherit from PreTrainedModel | COMMENT |
| MEDIUM | …ivation_checkpointing/test_activation_checkpointing.py | 417 | # Create a simple topology for testing | COMMENT |
| MEDIUM | …ivation_checkpointing/test_activation_checkpointing.py | 433 | # Create a mock GPT2 model with different layer types | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deepspeed/__init__.py | 427 | CODE | |
| LOW | …d/model_implementations/transformers/ds_transformer.py | 109 | CODE | |
| LOW | deepspeed/module_inject/policy.py | 48 | CODE | |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 184 | CODE | |
| LOW | deepspeed/module_inject/layers.py | 78 | CODE | |
| LOW | deepspeed/module_inject/layers.py | 110 | CODE | |
| LOW | deepspeed/module_inject/layers.py | 513 | CODE | |
| LOW | deepspeed/module_inject/containers/gptj.py | 49 | CODE | |
| LOW | deepspeed/module_inject/containers/opt.py | 62 | CODE | |
| LOW | deepspeed/module_inject/containers/llama.py | 109 | CODE | |
| LOW | deepspeed/module_inject/containers/gptneo.py | 63 | CODE | |
| LOW | deepspeed/module_inject/containers/internlm.py | 54 | CODE | |
| LOW | deepspeed/module_inject/containers/llama2.py | 59 | CODE | |
| LOW | deepspeed/module_inject/containers/gptneox.py | 43 | CODE | |
| LOW | deepspeed/module_inject/containers/bloom.py | 57 | CODE | |
| LOW | deepspeed/checkpoint/autoep_universal.py | 84 | CODE | |
| LOW | deepspeed/linear/optimized_linear.py | 204 | CODE | |
| LOW | deepspeed/runtime/lr_schedules.py | 483 | CODE | |
| LOW | deepspeed/runtime/bf16_optimizer.py | 41 | CODE | |
| LOW | deepspeed/runtime/engine.py | 519 | CODE | |
| LOW | …a_pipeline/data_sampling/variable_batch_size_and_lr.py | 23 | CODE | |
| LOW | …a_pipeline/data_sampling/variable_batch_size_and_lr.py | 165 | CODE | |
| LOW | …a_pipeline/data_sampling/variable_batch_size_and_lr.py | 432 | CODE | |
| LOW | …d/runtime/data_pipeline/data_sampling/data_analyzer.py | 25 | CODE | |
| LOW | …d/runtime/data_pipeline/data_sampling/data_analyzer.py | 459 | CODE | |
| LOW | deepspeed/runtime/domino/transformer.py | 247 | CODE | |
| LOW | deepspeed/runtime/pipe/module.py | 125 | CODE | |
| LOW | deepspeed/runtime/sequence_parallel/ulysses_sp.py | 229 | CODE | |
| LOW | deepspeed/runtime/sequence_parallel/ulysses_sp.py | 200 | CODE | |
| LOW | deepspeed/runtime/zero/parameter_offload.py | 138 | CODE | |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 154 | CODE | |
| LOW | deepspeed/runtime/zero/partition_parameters.py | 960 | CODE | |
| LOW | deepspeed/runtime/zero/stage3.py | 165 | CODE | |
| LOW | deepspeed/runtime/fp16/fused_optimizer.py | 42 | CODE | |
| LOW | deepspeed/runtime/fp16/unfused_optimizer.py | 32 | CODE | |
| LOW | deepspeed/comm/comm.py | 836 | CODE | |
| LOW | deepspeed/profiling/flops_profiler/profiler.py | 1196 | CODE | |
| LOW | deepspeed/inference/quantization/utils.py | 93 | CODE | |
| LOW | deepspeed/inference/quantization/utils.py | 149 | CODE | |
| LOW | deepspeed/ops/lamb/fused_lamb.py | 41 | CODE | |
| LOW | deepspeed/ops/transformer/transformer.py | 89 | CODE | |
| LOW | deepspeed/ops/transformer/transformer.py | 399 | CODE | |
| LOW | …speed/ops/transformer/inference/diffusers_attention.py | 91 | CODE | |
| LOW | …speed/ops/transformer/inference/diffusers_attention.py | 190 | CODE | |
| LOW | …speed/ops/transformer/inference/diffusers_attention.py | 87 | CODE | |
| LOW | deepspeed/ops/transformer/inference/config.py | 49 | CODE | |
| LOW | deepspeed/ops/transformer/inference/ds_attention.py | 131 | CODE | |
| LOW | deepspeed/ops/transformer/inference/moe_inference.py | 49 | CODE | |
| LOW | deepspeed/ops/transformer/inference/moe_inference.py | 270 | CODE | |
| LOW | deepspeed/ops/transformer/inference/triton/attention.py | 125 | CODE | |
| LOW | …epspeed/ops/transformer/inference/triton/matmul_ext.py | 438 | CODE | |
| LOW | …ps/transformer/inference/op_binding/softmax_context.py | 144 | CODE | |
| LOW | …/ops/transformer/inference/op_binding/vector_matmul.py | 42 | CODE | |
| LOW | …peed/ops/transformer/inference/op_binding/gelu_gemm.py | 38 | CODE | |
| LOW | …peed/ops/transformer/inference/op_binding/gelu_gemm.py | 52 | CODE | |
| LOW | …speed/ops/transformer/inference/op_binding/qkv_gemm.py | 67 | CODE | |
| LOW | …speed/ops/transformer/inference/op_binding/qkv_gemm.py | 75 | CODE | |
| LOW | …pspeed/ops/transformer/inference/op_binding/softmax.py | 63 | CODE | |
| LOW | …pspeed/ops/transformer/inference/op_binding/softmax.py | 71 | CODE | |
| LOW | deepspeed/ops/adam/fused_adam.py | 76 | CODE | |
| 24 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 250 | # Set cuda_version to 0.0 if cpu-only. | COMMENT |
| LOW | setup.py | 253 | # Set hip_version to 0.0 if cpu-only. | COMMENT |
| LOW | deepspeed/module_inject/auto_tp.py | 1070 | # Check if embedding matches any pattern | COMMENT |
| LOW | deepspeed/module_inject/auto_ep.py | 381 | # Check if MoE block has tuple return contract (legacy transformers) | COMMENT |
| LOW | deepspeed/module_inject/load_checkpoint.py | 107 | # Check if the weight tensor is for the QKV parameter | COMMENT |
| LOW | deepspeed/module_inject/load_checkpoint.py | 149 | # Check if the weight tensor is for the QKV parameter | COMMENT |
| LOW | deepspeed/module_inject/layers.py | 842 | # Check if the parameters belong to a replaced layer (indicated by a specific attribute) | COMMENT |
| LOW | deepspeed/monitor/csv_monitor.py | 61 | # Open file and record event. Insert header if this is the first time writing | COMMENT |
| LOW | deepspeed/runtime/engine.py | 3202 | # Check if loss scaling was required but not applied | STRING |
| LOW | deepspeed/runtime/engine.py | 3414 | # Set flag to prevent hooks from firing (we'll manually call prologue/epilogue) | STRING |
| LOW | deepspeed/runtime/utils.py | 66 | # Check if first element is a dict (parameter groups) or a Parameter | COMMENT |
| LOW | deepspeed/runtime/utils.py | 836 | # Print message except when distributed but not rank 0 | COMMENT |
| LOW | deepspeed/runtime/config_utils.py | 72 | # Check if there is a new param and if it should be set with a value | COMMENT |
| LOW | deepspeed/runtime/pipe/engine.py | 842 | # Set _running_engine_backward to avoid RuntimeError in post-backward hook | COMMENT |
| LOW | deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py | 505 | # Set numel to next partition's offset | COMMENT |
| LOW | …speed/runtime/swap_tensor/partitioned_param_swapper.py | 135 | #Check if partitioned param or numel in a tensor is swappable or not | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 1534 | # Set numel to next partition's offset | COMMENT |
| LOW | …peed/runtime/activation_checkpointing/checkpointing.py | 185 | # Check if we have added the state | COMMENT |
| LOW | …ntime/checkpoint_engine/decoupled_checkpoint_engine.py | 139 | # Check if process is still alive | COMMENT |
| LOW | deepspeed/inference/engine.py | 187 | # Check if local CUDA graphs can be created in replacement modules | COMMENT |
| LOW | deepspeed/ops/adam/zenflow_torch_adam.py | 12 | # Check if we have PyTorch >= 2.0 for ZenFlow features | COMMENT |
| LOW | deepspeed/ops/adam/cpu_adam.py | 228 | # Check if we can rollback (step count must be > 0) | COMMENT |
| LOW | op_builder/xpu/builder.py | 147 | # Set CXX to icpx (Intel oneAPI DPC++ compiler) so that .cpp/.dp.cpp | COMMENT |
| LOW | tests/unit/v1/moe/test_moe.py | 205 | # Set numel to next partition's offset | COMMENT |
| LOW | tests/unit/runtime/pipe/test_pipe.py | 198 | # Check if models have same weights after training | COMMENT |
| LOW | tests/unit/runtime/pipe/test_pipe.py | 288 | # Check if all layers have seen different shapes | COMMENT |
| LOW | tests/small_model_debugging/test.py | 14 | # Print message except when distributed but not rank 0 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | deepspeed/compat.py | 20 | # Backwards compatible, applies best practices (use annotationlib) from python 3.14 onwards. | COMMENT |
| MEDIUM | deepspeed/runtime/compiler.py | 114 | # robust version of @torch.compile | COMMENT |
| MEDIUM | deepspeed/runtime/engine.py | 3904 | # utilize dp_world_size for allreduce average | STRING |
| LOW | deepspeed/runtime/pipe/engine.py | 759 | # Some models just return loss from forward() | COMMENT |
| LOW | deepspeed/runtime/pipe/module.py | 280 | # that case and just use it in forward() | COMMENT |
| MEDIUM | deepspeed/runtime/zero/partition_parameters.py | 497 | # since skip_init won't involve any computations or weight adjustments, we can directly utilize post | COMMENT |
| LOW | deepspeed/utils/comms_logging.py | 107 | # If this comm_op has already been logged with this message size, just add to existing record | COMMENT |
| MEDIUM | deepspeed/compile/util.py | 107 | # to utilize that information. This is left as future work when real needs | COMMENT |
| LOW | deepspeed/inference/v2/modules/heuristics.py | 51 | # Currently, we only have one implementation, so we just return it. | COMMENT |
| LOW | deepspeed/inference/v2/modules/heuristics.py | 70 | # Currently, we only have one implementation, so we just return it. | COMMENT |
| LOW | deepspeed/inference/v2/modules/heuristics.py | 132 | # Currently, we only have one implementation, so we just return it. | COMMENT |
| LOW | deepspeed/inference/v2/modules/heuristics.py | 153 | # Currently, we only have one implementation, so we just return it. | COMMENT |
| LOW | deepspeed/inference/v2/modules/heuristics.py | 193 | # Currently, we only have one implementation, so we just return it. | COMMENT |
| MEDIUM | tests/unit/util.py | 224 | # environment, so to make the test robust a combined entry of both streams is available | STRING |
| LOW | tests/unit/v1/zero/test_zero.py | 1165 | # TODO. add testing for this - for now we just call it to make sure it | COMMENT |
| LOW | tests/unit/v1/zero/test_zero.py | 1554 | # TODO. add testing for this - for now we just call it to make sure it | COMMENT |
| MEDIUM | tests/unit/checkpoint/test_affine_shard_map.py | 591 | # builds its map analytically from head counts and the tp degree, while the harness above | COMMENT |
| MEDIUM | tests/unit/checkpoint/test_zero_optimizer.py | 670 | # This test calls deepspeed.initialize(), so use the harness' file-store | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CONTRIBUTING.md | 133 | ### Step 1: proposal and discussion | COMMENT |
| LOW | CONTRIBUTING.md | 146 | ### Step 2: implementation and verification | COMMENT |
| LOW | CONTRIBUTING.md | 155 | ### Step 3: release and maintenance | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 419 | # Step 1: nF0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 423 | # Step 2: nF0F1 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 431 | # Step 3: nB1W1F1 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 447 | # Step 5: nB1F1B0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 451 | # Step 6: nB1B0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 455 | # Step 7: nWB0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 459 | # Step 8: nW | COMMENT |
| LOW | tests/unit/v1/ops/muon/test_muon.py | 703 | # Step 2: verify multi-step execution does not crash and momentum accumulates | COMMENT |
| LOW | docs/_tutorials/universal-checkpointing.md | 26 | ### Step 1: Create ZeRO Checkpoint | COMMENT |
| LOW | docs/_tutorials/universal-checkpointing.md | 41 | ### Step 2: Convert ZeRO Checkpoint to Universal Format | COMMENT |
| LOW | docs/_tutorials/universal-checkpointing.md | 61 | ### Step 3: Resume Training with Universal Checkpoint | COMMENT |
| LOW | docs/_tutorials/monitor.md | 87 | # Step 1: Import monitor (and DeepSpeed config, if needed) | COMMENT |
| LOW | docs/_tutorials/monitor.md | 91 | # Step 2: Initialized monitor with DeepSpeed config (get DeepSpeed config object, if needed) | COMMENT |
| LOW | docs/_tutorials/monitor.md | 110 | # Step 3: Create list of 3-tuple records (single entry in this case) | COMMENT |
| LOW | docs/_tutorials/monitor.md | 112 | # Step 4: Call monitor.write_events on the list from step 3 | COMMENT |
| LOW | docs/_tutorials/comms-logging.md | 91 | # Step 3: Call `deepspeed.comm.log_summary()` | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deepspeed/__init__.py | 351 | def set_optimizer_flags(config_class: DeepSpeedConfig, model: torch.nn.Module) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_config.py | 25 | __all__ = [ | CODE |
| LOW | deepspeed/module_inject/layers.py | 27 | __all__ = [ | CODE |
| LOW | deepspeed/module_inject/auto_ep_preset_adapters.py | 16 | __all__ = [ | CODE |
| LOW | deepspeed/checkpoint/affine_transfer.py | 34 | __all__ = [ | CODE |
| LOW | deepspeed/checkpoint/affine.py | 23 | __all__ = [ | CODE |
| LOW | deepspeed/checkpoint/autoep_affine.py | 17 | __all__ = [ | CODE |
| LOW⚡ | deepspeed/runtime/base_optimizer.py | 269 | def set_gradient_accumulation_boundary(self, is_boundary: bool) -> None: | CODE |
| LOW | deepspeed/runtime/engine.py | 5964 | def _set_deepcompile_active(self, active: bool) -> None: | CODE |
| LOW | deepspeed/runtime/rollout/__init__.py | 24 | __all__ = [ | CODE |
| LOW | deepspeed/runtime/zero/partitioned_param_coordinator.py | 37 | def update_recompute_parameters(sub_module: Module, param: Parameter) -> None: | CODE |
| LOW | deepspeed/runtime/superoffload/superoffload_utils.py | 207 | def _set_cpu_affinity(self, cpuadam_cores_perc: float) -> None: | CODE |
| LOW | deepspeed/compile/custom_ops/__init__.py | 10 | __all__ = [ | CODE |
| LOW | deepspeed/compression/helper.py | 24 | __all__ = ["recursive_getattr", "recursive_setattr"] | CODE |
| LOW⚡ | …ence/v2/model_implementations/inference_policy_base.py | 43 | def set_transformer_params(self, prefixes: Union[str, Iterable[str]], containers: List[LayerContainer]) -> None: | CODE |
| LOW⚡ | …ence/v2/model_implementations/inference_policy_base.py | 52 | def set_non_transformer_params(self, container: LayerContainer) -> None: | CODE |
| LOW⚡ | …ence/v2/model_implementations/inference_policy_base.py | 55 | def set_unmapped_params(self, prefixes: Union[str, Iterable[str]]) -> None: | CODE |
| LOW | …rence/v2/model_implementations/layer_container_base.py | 272 | def set_dependency(self, dep_name: str, dep_value: torch.Tensor) -> None: | CODE |
| LOW | deepspeed/ops/triton_ops/__init__.py | 22 | __all__ = ["_TRITON_AVAILABLE", "is_triton_available", "triton", "tl", "group_gemm_triton", "swiglu"] | CODE |
| LOW | deepspeed/sequence/auto_sp.py | 39 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | deepspeed/sequence/auto_sp.py | 134 | def _set_module_by_name(model: nn.Module, dotted_name: str, new_module: nn.Module) -> None: | CODE |
| LOW⚡ | deepspeed/moe/ep_kernels.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | deepspeed/moe/layer.py | 86 | def set_deepspeed_parallelism(self, use_data_before_expert_parallel_: bool = False) -> None: | CODE |
| LOW | op_builder/cpu/pin_memory.py | 11 | __all__ = ["PinMemoryBuilder"] | CODE |
| LOW | op_builder/xpu/pin_memory.py | 11 | __all__ = ["PinMemoryBuilder"] | CODE |
| LOW | op_builder/npu/pin_memory.py | 11 | __all__ = ["PinMemoryBuilder"] | CODE |
| LOW | op_builder/supa/pin_memory.py | 11 | __all__ = ["PinMemoryBuilder"] | CODE |
| LOW | tests/unit/modeling.py | 47 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/unit/modelingpreln.py | 43 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deepspeed/compile/util.py | 136 | return [n for n in graph.nodes if n.op == "placeholder"] | CODE |
| LOW | deepspeed/compile/list_schedule.py | 221 | if node.op == 'placeholder': | CODE |
| LOW | deepspeed/compile/inductor.py | 146 | if n.op == "placeholder" and n.name in pm.param_names: | CODE |
| LOW | deepspeed/compile/fx.py | 49 | primals = [n for n in graph.nodes if n.op == "placeholder"] | CODE |
| LOW | deepspeed/compile/fx.py | 50 | non_primals = [n for n in graph.nodes if n.op != "placeholder"] | CODE |
| LOW | deepspeed/compile/fx.py | 121 | activation_nodes_set = set([n for n in graph.nodes if n.op == "placeholder" and n.name in activation_node_names]) | CODE |
| LOW | deepspeed/compile/passes/sp_compile.py | 206 | if node.op == "placeholder" and "val" in node.meta: | CODE |
| LOW | deepspeed/compile/passes/offload_activation.py | 270 | while nodes[insert_index].op == "placeholder": | CODE |
| LOW | deepspeed/compile/passes/offload_activation.py | 355 | keepers = [node for node in graph.nodes if node.op in ("placeholder", "get_attr") or node.target in gather_ops] | CODE |
| LOW | deepspeed/compile/passes/offload_activation.py | 747 | placeholders = {node.name: node for node in nodes if node.op == "placeholder"} | CODE |
| LOW | deepspeed/compile/passes/offload_activation.py | 773 | if candidate.op == "placeholder": | CODE |
| LOW | deepspeed/compile/passes/prefetch.py | 97 | if node.op != "placeholder": | CODE |
| LOW | deepspeed/compile/passes/prefetch.py | 152 | if (node.op != "placeholder" | CODE |
| LOW | deepspeed/compile/passes/prefetch.py | 153 | and node.target != torch.ops.dc.reload_parameter) and order_rev[i + 1].op == "placeholder": | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 332 | if node.op == 'placeholder' and isinstance(node.meta.get("val"), torch.Tensor): | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 429 | or node.op == 'placeholder' \ | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 453 | if node.op != 'placeholder': | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 476 | if node.op != 'placeholder' and not inserted_sync: | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 489 | or node.op == 'placeholder' \ | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 543 | if node.op == "output" or node.op == "placeholder": | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 573 | if node.op != 'placeholder' and not inserted_offload and is_first_graph: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 258 | if n.op in {"placeholder", "output"}: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 473 | if n.op in {"placeholder", "output"}: | CODE |
| LOW | tests/unit/v1/compile/test_compile_autosp.py | 229 | assert node.op == "placeholder" | CODE |
| LOW | tests/unit/v1/compile/test_compile_autosp.py | 244 | assert node.op == "placeholder" | CODE |
| LOW | tests/unit/v1/compile/test_compile_autosp.py | 260 | assert node.op == "placeholder" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | deepspeed/__init__.py | 442 | Initialize the DeepSpeed Engine. Arguments: args: an object containing local_rank and deepspeed_config fiel | STRING |
| HIGH | deepspeed/runtime/compiler.py | 49 | Decorator factory to enable compiling of a function if the minimum PyTorch version requirement is met. Args: | STRING |
| HIGH | deepspeed/runtime/utils.py | 1446 | Count the number of parameters that participate in the currently running backward graph. This helper is design | STRING |
| HIGH | deepspeed/runtime/zero/linear.py | 153 | Applies a linear transformation to the incoming data: :math:`y = xA^T + b`. The weights are pre-transposed and store | STRING |
| HIGH | deepspeed/autotuning/autotuner.py | 189 | Initialize and return a resource manager Args: active_resources ([dict]): A dictionary of hostname | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 419 | # Step 1: nF0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 423 | # Step 2: nF0F1 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 431 | # Step 3: nB1W1F1 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 447 | # Step 5: nB1F1B0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 451 | # Step 6: nB1B0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 455 | # Step 7: nWB0 | COMMENT |
| LOW⚡ | deepspeed/runtime/pipe/schedule.py | 459 | # Step 8: nW | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 2822 | # Step 2:- run optimizer and upscaling simultaneously | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 2883 | # Step 3:- run the optimizer if no offloading | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 2886 | # Step 4:- get rid of the fp32 gradients. Not needed anymore | COMMENT |
| LOW | tests/unit/v1/ops/muon/test_muon.py | 703 | # Step 2: verify multi-step execution does not crash and momentum accumulates | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | ci/torch_latest.py | 1195 | "--checksum-sha256 \"$proof_checksum\" --query ChecksumSHA256 --output text 2>/dev/null) || " | CODE |
| HIGH⚡ | ci/test_torch_latest.py | 1706 | assert "pull_request.head.sha || github.sha" in deploy | STRING |
| HIGH⚡ | ci/test_torch_latest.py | 1707 | assert "pull_request.head.repo.full_name || github.repository" in deploy | STRING |
| HIGH | ci/test_torch_latest.py | 1654 | trusted_ref = "ref: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.sha }}" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | deepspeed/module_inject/tp_plan_converter.py | 13 | # `embedding_rowwise` is injected for every tied-embedding model since huggingface/transformers#47579. | COMMENT |
| MEDIUM | ci/tests_fetcher.py | 155 | # Core orchestration on the deepspeed.initialize() critical path. Tests | COMMENT |
| MEDIUM | tests/unit/v1/autotp/test_tp_plan_real_models.py | 235 | # add for a tied-embedding model to exercise the same tp_plan shape as the issue repro. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | csrc/cpu/comm/ccl.cpp | 213 | // TODO: implement torch's async_op behavior, document it. | COMMENT |
| LOW | …ointing/test_activation_checkpointing_non_reentrant.py | 6 | # TODO: add tests with model parallelism for activation partitioning and other features. | COMMENT |
| LOW | …ivation_checkpointing/test_activation_checkpointing.py | 6 | # TODO: add tests with model parallelism for activation partitioning and other features. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deepspeed/runtime/zero/stage3.py | 970 | # We need to keep the reference to this buffer to make sure you can free it in `offload_states` | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deepspeed/runtime/compiler.py | 61 | def my_function(): | STRING |