DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.
This report presents the forensic synthetic code analysis of deepspeedai/DeepSpeed, a Python project with 42,843 GitHub stars. SynthScan v2.0 examined 317,439 lines of code across 1589 source files, recording 3604 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 15.1 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 3604 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| 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/elasticity/utils.py | 9 | def is_torch_elastic_compatible(): | CODE |
| LOW | deepspeed/elasticity/elasticity.py | 27 | def get_candidate_batch_sizes(base_list, max_acceptable_batch_size): | CODE |
| LOW | deepspeed/elasticity/elasticity.py | 191 | def _compatible_ds_version_check(target_deepspeed_version: str): | CODE |
| LOW | deepspeed/elasticity/elasticity.py | 208 | def ensure_immutable_elastic_config(runtime_elastic_config_dict: dict): | CODE |
| LOW | deepspeed/launcher/runner.py | 275 | def _stable_remove_duplicates(data): | STRING |
| LOW | deepspeed/launcher/runner.py | 391 | def parse_inclusion_exclusion(resource_pool, inclusion, exclusion): | STRING |
| 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 | 85 | def apply_scores_before_experts_if_enabled( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 96 | def _split_plan_from_expert_counts( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 167 | def compute_split_plan_from_expert_indices( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 289 | def unpermute_by_local_expert( | CODE |
| LOW | deepspeed/module_inject/auto_ep_layer.py | 541 | def set_deepspeed_parallelism( | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 344 | def set_tensor_parallel_config(self, mp_size, mp_group): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 458 | def _create_row_parallel_layer(self, module, spec: TPLayerSpec, name: str): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 476 | def _create_column_parallel_layer(self, module, spec: TPLayerSpec, name: str): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 513 | def _configure_gathered_column_tie_fallbacks(self): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 632 | def _replace_autoep_shared_experts(self, autoep_layer, autoep_name): | CODE |
| LOW | deepspeed/module_inject/auto_tp.py | 735 | 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 | 162 | 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 | 265 | def mark_autoep_folding_router_parameter(param) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 281 | def mark_autoep_folding_partial_router_parameter(param) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 298 | def mark_autoep_folding_sp_sharded_layernorm_parameter(param) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 318 | def _is_model_parallel_param_marker(param) -> bool: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 322 | def _autoep_folding_param_family(param, *, param_name: str | None = None) -> str | None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 341 | def autoep_folding_gradient_reduction_strategy( | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 425 | def reduce_autoep_folding_gradient( | CODE |
| LOW⚡ | deepspeed/module_inject/auto_ep_folding.py | 465 | def is_autoep_folding_gradient_corrected(param) -> bool: | CODE |
| LOW⚡ | deepspeed/module_inject/auto_ep_folding.py | 469 | def clear_autoep_folding_gradient_corrected(param) -> None: | CODE |
| LOW⚡ | deepspeed/module_inject/auto_ep_folding.py | 474 | def apply_folding_correction_to_grad_buffer( | CODE |
| LOW | deepspeed/module_inject/auto_ep_folding.py | 496 | def assert_group_matches_spec(existing_rank_lists, spec: ParallelFoldingSpec, *, group_kind: str = "ep_edp") -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 40 | def _remove_transformers_output_capture_hooks(model: nn.Module) -> int: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 69 | def _raise_if_duplicate_moe_specs(specs: list[MoELayerSpec]) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 110 | def _get_num_experts_from_config(model_config, preset: MoEModelPreset) -> int | None: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 165 | def _infer_hidden_and_ffn_size( | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 489 | def _replace_moe_layer_without_retarget( | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 518 | def _retarget_transformers_output_recorders(self, spec: MoELayerSpec, replacement: nn.Module) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 568 | def _requires_selected_preset_detection(self) -> bool: | CODE |
| LOW | deepspeed/module_inject/auto_ep.py | 579 | def _raise_no_moe_layers_detected(self, presets_to_try: list[tuple[str, MoEModelPreset]]) -> None: | CODE |
| LOW | deepspeed/module_inject/auto_ep_config.py | 265 | def validate_autoep_post_detection( | CODE |
| LOW | deepspeed/module_inject/auto_ep_config.py | 330 | def fill_autoep_config_from_hf(config: AutoEPConfig, model_config) -> None: | CODE |
| LOW | deepspeed/module_inject/replace_module.py | 189 | def replace_transformer_layer(orig_layer_impl, model, checkpoint_dict, config, model_config): | CODE |
| LOW | deepspeed/module_inject/auto_tp_model_utils.py | 74 | def build_mpt_atten_bias_tensor(self, | CODE |
| LOW | deepspeed/module_inject/load_checkpoint.py | 23 | def load_model_with_checkpoint(r_module, | CODE |
| LOW | deepspeed/module_inject/layers.py | 38 | def _build_param_uc_conversion_meta(*, | CODE |
| LOW | deepspeed/module_inject/layers.py | 60 | def _build_param_uc_restore_meta(*, | CODE |
| LOW | deepspeed/module_inject/layers.py | 414 | def _should_materialize_tp_partition(self): | CODE |
| LOW | deepspeed/module_inject/layers.py | 474 | def configure_tensor_parallel_runtime(config): | CODE |
| LOW | deepspeed/module_inject/layers.py | 481 | def _get_param_uc_conversion_meta(param: torch.Tensor) -> Optional[Dict[str, Any]]: | CODE |
| LOW | deepspeed/module_inject/layers.py | 496 | def collect_autotp_universal_checkpoint_info(model: nn.Module) -> Dict[str, Any]: | CODE |
| LOW | deepspeed/module_inject/layers.py | 595 | def _is_replaced_module_weight(self, param: torch.Tensor) -> bool: | CODE |
| LOW | deepspeed/module_inject/layers.py | 1098 | def _infer_subparam_logical_shapes(weight_shape, shape, partition_dim, name=None): | CODE |
| LOW | deepspeed/module_inject/layers.py | 1200 | def _partition_logical_tensor(tensor, partition_dim, tp_world_size, tp_index, name=None, subparam_sizes=None): | CODE |
| LOW | deepspeed/module_inject/module_quantize.py | 9 | def quantize_transformer_layer(orig_layer_impl, model, megatron=False, preln=False): | CODE |
| 1660 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 | deepspeed/runtime/fp16/onebit/zoadam.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | deepspeed/runtime/fp16/onebit/adam.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | deepspeed/ops/lamb/fused_lamb.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r | STRING |
| HIGH | deepspeed/runtime/fp16/onebit/zoadam.py | 0 | overrides load_state_dict() to add special handling when loading checkpoints | STRING |
| HIGH | deepspeed/runtime/fp16/onebit/lamb.py | 0 | overrides load_state_dict() to add special handling when loading checkpoints | STRING |
| HIGH | deepspeed/runtime/fp16/onebit/adam.py | 0 | overrides load_state_dict() to add special handling when loading checkpoints | 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 |
| 85 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 | 49 | CODE | |
| LOW | deepspeed/__init__.py | 50 | CODE | |
| LOW | deepspeed/__init__.py | 51 | CODE | |
| LOW | deepspeed/__init__.py | 52 | CODE | |
| LOW | deepspeed/__init__.py | 52 | CODE | |
| LOW | deepspeed/__init__.py | 53 | CODE | |
| LOW | deepspeed/__init__.py | 53 | CODE | |
| LOW | deepspeed/__init__.py | 55 | CODE | |
| LOW | deepspeed/__init__.py | 58 | CODE | |
| LOW | deepspeed/__init__.py | 59 | CODE | |
| LOW | deepspeed/__init__.py | 29 | CODE | |
| LOW | deepspeed/elasticity/config.py | 7 | CODE | |
| LOW | deepspeed/elasticity/__init__.py | 6 | CODE | |
| LOW | deepspeed/elasticity/__init__.py | 6 | CODE | |
| LOW | deepspeed/elasticity/__init__.py | 6 | CODE | |
| LOW | deepspeed/elasticity/__init__.py | 8 | CODE | |
| LOW | deepspeed/elasticity/__init__.py | 8 | CODE | |
| LOW | deepspeed/elasticity/__init__.py | 8 | CODE | |
| LOW | deepspeed/elasticity/__init__.py | 10 | 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/module_inject/auto_ep_layer.py | 15 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 14 | 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 | |
| 654 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 31 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 33 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 49 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 51 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 350 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_layer.py | 352 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 36 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 38 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 90 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/module_inject/auto_ep_config.py | 92 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/runtime/rollout/hybrid_engine_rollout.py | 95 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | deepspeed/runtime/rollout/hybrid_engine_rollout.py | 97 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | deepspeed/compression/basic_layer.py | 746 | # ----------------- | COMMENT |
| MEDIUM⚡ | deepspeed/compression/basic_layer.py | 748 | # ----------------- | COMMENT |
| MEDIUM | …epspeed/ops/transformer/inference/triton/matmul_ext.py | 19 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …epspeed/ops/transformer/inference/triton/matmul_ext.py | 125 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …epspeed/ops/transformer/inference/triton/matmul_ext.py | 470 | # ----------------------------------------------------------------------------- | 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 | 26 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/moe/ep_experts.py | 28 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | deepspeed/moe/ep_experts.py | 83 | # --------------------------------------------------------------------------- | COMMENT |
| 109 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/env_report.py | 83 | CODE | |
| LOW | deepspeed/elasticity/elastic_agent.py | 127 | CODE | |
| LOW | deepspeed/elasticity/elasticity.py | 41 | CODE | |
| LOW | deepspeed/elasticity/elasticity.py | 233 | CODE | |
| LOW | deepspeed/launcher/runner.py | 243 | CODE | |
| LOW | deepspeed/launcher/runner.py | 310 | CODE | |
| LOW | deepspeed/launcher/runner.py | 436 | CODE | |
| LOW | deepspeed/launcher/launcher_helper.py | 55 | CODE | |
| LOW | deepspeed/launcher/launch.py | 145 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 156 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 228 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 291 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 632 | CODE | |
| LOW | deepspeed/module_inject/auto_tp.py | 653 | CODE | |
| LOW | deepspeed/module_inject/fusedqkv_utils.py | 29 | CODE | |
| LOW | deepspeed/module_inject/fusedqkv_utils.py | 124 | CODE | |
| LOW | deepspeed/module_inject/policy.py | 131 | CODE | |
| LOW | deepspeed/module_inject/auto_ep.py | 165 | CODE | |
| LOW | deepspeed/module_inject/auto_ep.py | 219 | CODE | |
| LOW | deepspeed/module_inject/auto_ep.py | 283 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 29 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 88 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 189 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 630 | CODE | |
| LOW | deepspeed/module_inject/replace_module.py | 690 | 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 | 496 | CODE | |
| LOW | deepspeed/module_inject/layers.py | 1098 | CODE | |
| LOW | deepspeed/module_inject/autotp_config.py | 145 | 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/universal_checkpoint.py | 99 | CODE | |
| LOW | deepspeed/checkpoint/autoep_universal.py | 207 | CODE | |
| LOW | deepspeed/checkpoint/autoep_universal.py | 266 | CODE | |
| LOW | deepspeed/checkpoint/utils.py | 41 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 161 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 249 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 550 | CODE | |
| LOW | deepspeed/checkpoint/ds_to_universal.py | 759 | CODE | |
| LOW | deepspeed/runtime/hybrid_engine.py | 168 | CODE | |
| LOW | deepspeed/runtime/hybrid_engine.py | 274 | CODE | |
| LOW | deepspeed/runtime/hybrid_engine.py | 305 | CODE | |
| LOW | deepspeed/runtime/config.py | 205 | CODE | |
| LOW | deepspeed/runtime/config.py | 250 | CODE | |
| LOW | deepspeed/runtime/config.py | 678 | CODE | |
| LOW | deepspeed/runtime/config.py | 924 | CODE | |
| LOW | deepspeed/runtime/quantize.py | 51 | CODE | |
| LOW | deepspeed/runtime/quantize.py | 129 | CODE | |
| LOW | deepspeed/runtime/base_optimizer.py | 315 | CODE | |
| LOW | deepspeed/runtime/bf16_optimizer.py | 232 | CODE | |
| 306 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/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 |
| LOW | csrc/includes/custom_cuda_layers.h | 1 | // Copyright (c) Microsoft Corporation. | COMMENT |
| 105 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | deepspeed/launcher/runner.py | 276 | # Create a new list in the same order as original but with duplicates | STRING |
| MEDIUM | deepspeed/module_inject/layers.py | 425 | # 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 | 612 | """This function is used to recursively obtain the granularity of each module.""" | STRING |
| MEDIUM | …peed/runtime/activation_checkpointing/checkpointing.py | 489 | """This function is adapted from torch.utils.checkpoint with | STRING |
| MEDIUM | …peed/runtime/activation_checkpointing/checkpointing.py | 705 | """This function is union of `torch.utils.checkpoint._checkpoint_without_reentrant` and `CheckpointFunction` in this | STRING |
| MEDIUM | deepspeed/comm/comm.py | 857 | # 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 | 180 | # Create a set of parameter indices for quick lookup | COMMENT |
| MEDIUM | deepspeed/compile/backend.py | 321 | # 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⚡ | deepspeed/compression/basic_layer.py | 213 | # This function is used for row/col pruning | 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 | …epspeed/ops/sparse_attention/sparse_attention_utils.py | 15 | """This class provides some utility functions that are use integrating sparse attention into transformer models. | STRING |
| MEDIUM | deepspeed/moe/sharded_moe.py | 152 | # The following functions are extracted and scripted | COMMENT |
| MEDIUM | deepspeed/moe/sharded_moe.py | 201 | # Create a mask for 1st's expert per token | COMMENT |
| MEDIUM | deepspeed/moe/sharded_moe.py | 302 | # Create a mask for 1st's expert per token | COMMENT |
| MEDIUM | deepspeed/moe/sharded_moe.py | 308 | # 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 | 333 | # Create a compiler object. | COMMENT |
| MEDIUM⚡ | op_builder/builder.py | 339 | # Create a temporary directory to hold test files. | COMMENT |
| MEDIUM⚡ | op_builder/builder.py | 342 | # Define a simple C program that calls the function in question | COMMENT |
| MEDIUM | tests/unit/ulysses_alst/test_ulysses_sp_hf.py | 207 | # Create a mock PEFT model object that has config but doesn't inherit from PreTrainedModel | COMMENT |
| MEDIUM | …ivation_checkpointing/test_activation_checkpointing.py | 272 | # Create a simple topology for testing | COMMENT |
| MEDIUM | …ivation_checkpointing/test_activation_checkpointing.py | 288 | # Create a mock GPT2 model with different layer types | COMMENT |
| MEDIUM | tests/unit/runtime/half_precision/onebit/test_onebit.py | 1257 | # Create a model with normal and empty parameters | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | …epspeed/ops/sparse_attention/sparse_attention_utils.py | 33 | original_max_position = model.bert.embeddings.position_embeddings.weight.size(0) | CODE |
| CRITICAL⚡ | …epspeed/ops/sparse_attention/sparse_attention_utils.py | 36 | model.bert.embeddings.position_embeddings.weight.data = model.bert.embeddings.position_embeddings.weight.rep | CODE |
| CRITICAL⚡ | …epspeed/ops/sparse_attention/sparse_attention_utils.py | 45 | extended_position_embedding = model.roberta.embeddings.position_embeddings.weight.new_empty( | CODE |
| CRITICAL | tests/unit/modeling.py | 456 | self.attention.output.LayerNorm.weight.register_hook(lambda x, self=self: grads.append([x, "N2_W"])) | CODE |
| CRITICAL | tests/unit/modeling.py | 457 | 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 | 1357 | assert model.l2.linear.weight.ds_tensor.numel() == ds_tensor_numel | CODE |
| CRITICAL | tests/unit/v1/zero/test_zero.py | 1360 | assert model.l4.linear.weight.ds_tensor.numel() == ds_tensor_numel | 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 |
|---|---|---|---|---|
| LOW | deepspeed/__init__.py | 93 | CODE | |
| LOW | …d/model_implementations/transformers/ds_transformer.py | 111 | 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 | 60 | CODE | |
| LOW | deepspeed/module_inject/layers.py | 383 | 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 | 62 | 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 | 68 | CODE | |
| LOW | deepspeed/linear/optimized_linear.py | 204 | CODE | |
| LOW | deepspeed/runtime/lr_schedules.py | 447 | CODE | |
| LOW | deepspeed/runtime/quantize.py | 16 | CODE | |
| LOW | deepspeed/runtime/quantize.py | 100 | CODE | |
| LOW | deepspeed/runtime/quantize.py | 113 | CODE | |
| LOW | deepspeed/runtime/quantize.py | 121 | CODE | |
| LOW | deepspeed/runtime/bf16_optimizer.py | 39 | CODE | |
| LOW | deepspeed/runtime/engine.py | 238 | 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 | 227 | CODE | |
| LOW | deepspeed/runtime/sequence_parallel/ulysses_sp.py | 198 | CODE | |
| LOW | deepspeed/runtime/zero/parameter_offload.py | 119 | CODE | |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 146 | CODE | |
| LOW | deepspeed/runtime/zero/partition_parameters.py | 930 | CODE | |
| LOW | deepspeed/runtime/zero/mics.py | 65 | CODE | |
| LOW | deepspeed/runtime/zero/stage3.py | 160 | CODE | |
| LOW | deepspeed/runtime/fp16/fused_optimizer.py | 40 | CODE | |
| LOW | deepspeed/runtime/fp16/unfused_optimizer.py | 31 | CODE | |
| LOW | deepspeed/runtime/fp16/onebit/zoadam.py | 58 | CODE | |
| LOW | deepspeed/runtime/fp16/onebit/lamb.py | 62 | CODE | |
| LOW | deepspeed/runtime/fp16/onebit/adam.py | 46 | CODE | |
| LOW | deepspeed/comm/comm.py | 792 | CODE | |
| LOW | deepspeed/profiling/flops_profiler/profiler.py | 1204 | CODE | |
| LOW | deepspeed/compression/basic_layer.py | 672 | CODE | |
| LOW | deepspeed/compression/basic_layer.py | 695 | CODE | |
| LOW | deepspeed/compression/basic_layer.py | 118 | CODE | |
| LOW | deepspeed/compression/utils.py | 96 | CODE | |
| LOW | deepspeed/compression/utils.py | 140 | CODE | |
| LOW | deepspeed/compression/utils.py | 181 | CODE | |
| LOW | deepspeed/compression/utils.py | 217 | 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/sparse_attention/sparsity_config.py | 250 | 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 | 192 | CODE | |
| LOW | …speed/ops/transformer/inference/diffusers_attention.py | 87 | CODE | |
| 35 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 | 232 | except Exception as e: | CODE |
| LOW | deepspeed/module_inject/auto_ep_presets/base.py | 200 | except Exception as exc: | CODE |
| LOW | deepspeed/module_inject/containers/bloom.py | 116 | except Exception as e: | CODE |
| MEDIUM | deepspeed/checkpoint/deepspeed_checkpoint.py | 274 | print(f'Error: {file} is not existent') | CODE |
| MEDIUM | deepspeed/checkpoint/reshape_utils.py | 31 | print(f'Error: {file} is not existent') | CODE |
| MEDIUM | deepspeed/runtime/engine.py | 817 | def __del__(self): | CODE |
| LOW | deepspeed/runtime/engine.py | 820 | 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/superoffload/superoffload_utils.py | 151 | except Exception as e: | CODE |
| LOW | deepspeed/runtime/superoffload/superoffload_utils.py | 217 | 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 | 138 | except Exception: | 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/profilers/graph_profile.py | 44 | except Exception as e: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 126 | except Exception: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 168 | except Exception as e: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 333 | except Exception as e: | 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 | 728 | except Exception: # noqa: BLE001 -- explain is a diagnostic, never fail CI on it | CODE |
| LOW | ci/tests_fetcher.py | 736 | except Exception: # noqa: BLE001 | CODE |
| LOW | ci/test_tests_fetcher.py | 375 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | ci/test_torch_latest.py | 592 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | op_builder/builder.py | 211 | except Exception: | CODE |
| LOW | op_builder/builder.py | 384 | except Exception: | CODE |
| LOW | op_builder/builder.py | 414 | except Exception as e: | CODE |
| LOW | op_builder/builder.py | 476 | except Exception as e: | CODE |
| MEDIUM | op_builder/builder.py | 404 | def cpu_arch(self): | CODE |
| MEDIUM | op_builder/builder.py | 428 | def get_cuda_compile_flag(self): | CODE |
| LOW | op_builder/npu/builder.py | 33 | except Exception: | CODE |
| LOW | op_builder/supa/fused_adam.py | 14 | except Exception: | CODE |
| LOW | op_builder/supa/fused_lion.py | 8 | except Exception: | CODE |
| LOW | op_builder/supa/fused_lamb.py | 10 | except Exception: | CODE |
| LOW | tests/unit/v1/nvme/test_aio_gil.py | 123 | except Exception as error: | CODE |
| LOW | tests/unit/v1/nvme/test_aio_gil.py | 156 | except Exception as error: | CODE |
| LOW | tests/unit/v1/nvme/test_aio_gil.py | 165 | except Exception as error: | CODE |
| MEDIUM | tests/unit/v1/nvme/test_aio_gil.py | 119 | def run_read(index): | CODE |
| MEDIUM | tests/unit/v1/nvme/test_aio_gil.py | 151 | def run_reads(): | CODE |
| MEDIUM | tests/unit/v1/nvme/test_aio_gil.py | 159 | def manage_locked_tensors(): | CODE |
| LOW | tests/unit/runtime/zero/test_zero_grad_clip.py | 79 | except Exception as e: | CODE |
| LOW | tests/unit/hybrid_engine/test_he_lora.py | 35 | except Exception: | CODE |
| LOW | tests/unit/hybrid_engine/test_he_lora.py | 69 | except Exception: | CODE |
| LOW | tests/model/Megatron_GPT2/run_checkpoint_test.py | 458 | except Exception: | CODE |
| 7 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 260 | # Set cuda_version to 0.0 if cpu-only. | COMMENT |
| LOW | setup.py | 263 | # Set hip_version to 0.0 if cpu-only. | COMMENT |
| LOW | deepspeed/module_inject/auto_tp.py | 685 | # Check if embedding matches any pattern | COMMENT |
| LOW | deepspeed/module_inject/auto_ep.py | 252 | # 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 | 590 | # 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 | 2924 | # Check if loss scaling was required but not applied | STRING |
| LOW | deepspeed/runtime/engine.py | 3136 | # 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 | 824 | # 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 | 861 | # Set _running_engine_backward to avoid RuntimeError in post-backward hook | COMMENT |
| LOW | deepspeed/runtime/zenflow/zenflow_stage_1_and_2.py | 483 | # 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 | 1346 | # Set numel to next partition's offset | COMMENT |
| LOW | …peed/runtime/activation_checkpointing/checkpointing.py | 175 | # 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 | 182 | # 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 | 222 | # 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/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/unit/moe/test_moe.py | 128 | # Set numel to next partition's offset | 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 |
| LOW | deepspeed/nebula/constants.py | 35 | # Customer can just set NEBULA_ENABLE_NEBULA_LOAD to False. Then use | STRING |
| MEDIUM | deepspeed/runtime/compiler.py | 108 | # robust version of @torch.compile | COMMENT |
| MEDIUM | deepspeed/runtime/engine.py | 3634 | # utilize dp_world_size for allreduce average | STRING |
| LOW | deepspeed/runtime/pipe/engine.py | 778 | # Some models just return loss from forward() | COMMENT |
| LOW | deepspeed/runtime/pipe/module.py | 277 | # that case and just use it in forward() | COMMENT |
| MEDIUM | deepspeed/runtime/zero/partition_parameters.py | 483 | # 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 | 226 | # environment, so to make the test robust a combined entry of both streams is available | STRING |
| LOW | tests/unit/v1/zero/test_zero.py | 887 | # TODO. add testing for this - for now we just call it to make sure it | COMMENT |
| LOW | tests/unit/v1/zero/test_zero.py | 1276 | # TODO. add testing for this - for now we just call it to make sure it | 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 |
|---|---|---|---|---|
| HIGH | deepspeed/__init__.py | 108 | Initialize the DeepSpeed Engine. Arguments: args: an object containing local_rank and deepspeed_config fiel | STRING |
| HIGH | deepspeed/elasticity/elasticity.py | 234 | Core deepspeed elasticity API. Given an elastic config (similar to the example below) DeepSpeed will compute a total | STRING |
| HIGH | deepspeed/runtime/compiler.py | 43 | Decorator factory to enable compiling of a function if the minimum PyTorch version requirement is met. Args: | STRING |
| HIGH | deepspeed/runtime/utils.py | 1445 | 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/__init__.py | 84 | def set_optimizer_flags(config_class: DeepSpeedConfig, model: torch.nn.Module) -> None: | CODE |
| LOW | deepspeed/module_inject/tp_plan_converter.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | deepspeed/module_inject/auto_ep_config.py | 24 | __all__ = [ | CODE |
| LOW | deepspeed/module_inject/layers.py | 23 | __all__ = [ | CODE |
| LOW | deepspeed/module_inject/auto_ep_preset_adapters.py | 16 | __all__ = [ | CODE |
| LOW | deepspeed/runtime/engine.py | 5576 | def _set_deepcompile_active(self, active: bool) -> None: | CODE |
| LOW | deepspeed/runtime/rollout/__init__.py | 22 | __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 | 189 | def _set_cpu_affinity(self, cpuadam_cores_perc: float) -> None: | CODE |
| LOW | deepspeed/compile/custom_ops/__init__.py | 9 | __all__ = ["all_to_all", "sp_dp_registry", "sp_compat"] | 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/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 | 30 | 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 | 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 | 106 | 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 | 192 | if node.op == "placeholder" and "val" in node.meta: | CODE |
| LOW | deepspeed/compile/passes/prefetch.py | 96 | if node.op != "placeholder": | CODE |
| LOW | deepspeed/compile/passes/prefetch.py | 151 | if (node.op != "placeholder" | CODE |
| LOW | deepspeed/compile/passes/prefetch.py | 152 | and node.target != torch.ops.dc.reload_parameter) and order_rev[i + 1].op == "placeholder": | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 353 | or node.op == 'placeholder' \ | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 384 | if node.op != 'placeholder': | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 407 | if node.op != 'placeholder' and not inserted_sync: | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 418 | or node.op == 'placeholder' \ | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 474 | if node.op == "output" or node.op == "placeholder": | CODE |
| LOW | deepspeed/compile/passes/offload_adam_states.py | 509 | if node.op != 'placeholder' and not inserted_offload and is_first_graph: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 185 | if n.op in {"placeholder", "output"}: | CODE |
| LOW | deepspeed/compile/profilers/graph_profile.py | 348 | if n.op in {"placeholder", "output"}: | CODE |
| LOW | tests/unit/v1/compile/test_compile_autosp.py | 118 | assert node.op == "placeholder" | CODE |
| LOW | tests/unit/v1/compile/test_compile_autosp.py | 133 | assert node.op == "placeholder" | CODE |
| LOW | tests/unit/v1/compile/test_compile_autosp.py | 149 | assert node.op == "placeholder" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | ci/test_torch_latest.py | 568 | assert "pull_request.head.sha || github.sha" in deploy | CODE |
| HIGH⚡ | ci/test_torch_latest.py | 569 | assert "pull_request.head.repo.full_name || github.repository" in deploy | CODE |
| HIGH | ci/test_torch_latest.py | 542 | trusted_ref = "ref: ${{ github.event.pull_request.base.sha || github.sha }}" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CONTRIBUTING.md | 129 | ### Step 1: proposal and discussion | COMMENT |
| LOW | CONTRIBUTING.md | 142 | ### Step 2: implementation and verification | COMMENT |
| LOW | CONTRIBUTING.md | 151 | ### Step 3: release and maintenance | 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/runtime/zenflow/zenflow_stage_1_and_2.py | 779 | # Step 1:- Calculate gradient norm using bit-16 grads | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 2236 | # Step 1:- Calculate gradient norm using bit-16 grads | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 2242 | # Step 2:- run optimizer and upscaling simultaneously | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 2301 | # Step 3:- run the optimizer if no offloading | COMMENT |
| LOW | deepspeed/runtime/zero/stage_1_and_2.py | 2304 | # Step 4:- get rid of the fp32 gradients. Not needed anymore | 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 |
|---|---|---|---|---|
| MEDIUM | ci/tests_fetcher.py | 152 | # Core orchestration on the deepspeed.initialize() critical path. Tests | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deepspeed/runtime/zero/stage3.py | 888 | # 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 | 55 | def my_function(): | STRING |