DeepEP: an efficient expert-parallel communication library
This report presents the forensic synthetic code analysis of deepseek-ai/DeepEP, a Cuda project with 9,844 GitHub stars. SynthScan v2.0 examined 13,039 lines of code across 67 source files, recording 67 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 5.6 places this repository in the Low 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 67 distinct pattern matches across 10 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 | setup.py | 42 | def get_nvshmem_host_lib_name(base_dir): | CODE |
| LOW | deep_ep/buffers/legacy.py | 176 | def get_low_latency_rdma_size_hint(num_max_dispatch_tokens_per_rank: int, hidden: int, num_ranks: int, num_experts: | CODE |
| LOW | deep_ep/buffers/legacy.py | 672 | def low_latency_update_mask_buffer(self, rank_to_mask: int, mask: bool = False): | CODE |
| LOW⚡ | deep_ep/buffers/legacy.py | 683 | def low_latency_query_mask_buffer(self, mask_status: torch.Tensor): | CODE |
| LOW⚡ | deep_ep/buffers/legacy.py | 693 | def low_latency_clean_mask_buffer(self): | CODE |
| LOW⚡ | deep_ep/buffers/legacy.py | 700 | def get_next_low_latency_combine_buffer(self, handle: object): | CODE |
| LOW | deep_ep/buffers/elastic.py | 409 | def get_engram_storage_size_hint(num_entries: int, hidden: int, | CODE |
| LOW | deep_ep/buffers/elastic.py | 459 | def get_agrs_num_max_session_bytes(group: dist.ProcessGroup, | CODE |
| LOW | deep_ep/buffers/elastic.py | 480 | def get_agrs_buffer_size_hint(group: dist.ProcessGroup, | CODE |
| LOW | deep_ep/utils/envs.py | 183 | def check_torch_deterministic() -> None: | CODE |
| LOW | deep_ep/utils/envs.py | 223 | def check_fast_rdma_atomic_support(nic_name: str = _DEFAULT_NIC_NAME) -> bool: | CODE |
| LOW | deep_ep/utils/comm.py | 78 | def destroy_all_managed_nccl_comm() -> None: | CODE |
| LOW | deep_ep/utils/gate.py | 116 | def get_precise_unbalanced_scores(num_tokens: int, num_experts: int, num_ranks: int, num_topk: int, ratio: float): | CODE |
| LOW | deep_ep/utils/gate.py | 148 | def map_unbalanced_ratio_to_factor(num_tokens: int, num_experts: int, num_ranks: int, num_topk: int, ratio: float) -> fl | CODE |
| LOW | deep_ep/utils/gate.py | 167 | def get_random_unbalanced_scores(num_tokens: int, num_experts: int, num_ranks: int, num_topk: int, ratio: float): | CODE |
| LOW | deep_ep/utils/refs.py | 126 | def generate_pre_combine_data(src_token_global_idx: torch.Tensor, | CODE |
| LOW | tests/elastic/test_ep.py | 295 | def get_unique_and_valid_dst_count(dst_idx: torch.Tensor, | CODE |
| LOW | tests/legacy/test_low_latency.py | 14 | def simulate_failure_and_skip(rank: int, api: Literal["dispatch", "combine", "clean"], expected_masked_ranks: Set[int]): | CODE |
| LOW | tests/legacy/test_low_latency.py | 33 | def query_mask_buffer_and_check(api: Literal["dispatch", "combine", "clean"], buffer: deep_ep.Buffer, mask_status: torch | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deep_ep/__init__.py | 5 | CODE | |
| LOW | deep_ep/__init__.py | 88 | CODE | |
| LOW | deep_ep/__init__.py | 89 | CODE | |
| LOW | deep_ep/__init__.py | 89 | CODE | |
| LOW | deep_ep/__init__.py | 91 | CODE | |
| LOW | deep_ep/__init__.py | 91 | CODE | |
| LOW | deep_ep/__init__.py | 92 | CODE | |
| LOW | deep_ep/__init__.py | 92 | CODE | |
| LOW | deep_ep/__init__.py | 95 | CODE | |
| LOW | deep_ep/__init__.py | 95 | CODE | |
| LOW | deep_ep/buffers/elastic.py | 6 | CODE | |
| LOW | deep_ep/utils/__init__.py | 3 | CODE | |
| LOW | tests/elastic/test_agrs.py | 2 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deep_ep/utils/envs.py | 145 | CODE | |
| LOW | deep_ep/utils/testing.py | 111 | CODE | |
| LOW | deep_ep/utils/find_pkgs.py | 8 | CODE | |
| LOW | tests/elastic/test_ep.py | 22 | CODE | |
| LOW | tests/elastic/test_ep.py | 59 | CODE | |
| LOW | tests/elastic/test_agrs.py | 89 | CODE | |
| LOW | tests/legacy/test_low_latency.py | 39 | CODE | |
| LOW | tests/legacy/test_intranode.py | 17 | CODE | |
| LOW | tests/legacy/test_internode.py | 18 | CODE | |
| LOW | tests/legacy/test_internode.py | 318 | CODE | |
| LOW | tests/utils/test_gate.py | 7 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | format.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | csrc/python_api.cpp | 1 | #include <pybind11/pybind11.h> | COMMENT |
| LOW | csrc/kernels/elastic/api.hpp | 1 | #pragma once | COMMENT |
| LOW | csrc/elastic/buffer.hpp | 1 | #pragma once | COMMENT |
| LOW | csrc/legacy/buffer.hpp | 1 | #pragma once | COMMENT |
| LOW | csrc/utils/system.hpp | 1 | #pragma once | COMMENT |
| LOW | csrc/utils/format.hpp | 1 | #pragma once | COMMENT |
| LOW | csrc/jit/compiler.hpp | 1 | #pragma once | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deep_ep/buffers/legacy.py | 33 | CODE | |
| LOW | deep_ep/buffers/legacy.py | 322 | CODE | |
| LOW | deep_ep/buffers/legacy.py | 458 | CODE | |
| LOW | deep_ep/buffers/elastic.py | 228 | CODE | |
| LOW | deep_ep/buffers/elastic.py | 855 | CODE | |
| LOW | deep_ep/buffers/elastic.py | 1046 | CODE | |
| LOW | deep_ep/utils/refs.py | 243 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | deep_ep/utils/comm.py | 71 | # Create a new communicator | COMMENT |
| MEDIUM | deep_ep/utils/gate.py | 20 | # Create the mask | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deep_ep/__init__.py | 38 | except Exception: | CODE |
| LOW | deep_ep/utils/envs.py | 217 | except Exception as e: | CODE |
| LOW | deep_ep/utils/envs.py | 241 | except Exception: | CODE |
| LOW | deep_ep/utils/envs.py | 266 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | format.sh | 2 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | format.sh | 179 | # Check if there are any uncommitted changes after all formatting steps. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deep_ep/buffers/legacy.py | 154 | def set_num_sms(new_num_sms: int) -> None: | CODE |