Repository Analysis

deepseek-ai/DeepGEMM

DeepGEMM: clean and efficient BLAS kernel library on GPU

9.4 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of deepseek-ai/DeepGEMM, a Cuda project with 7,747 GitHub stars. SynthScan v2.0 examined 15,948 lines of code across 90 source files, recording 165 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 9.4 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).

9.4
Adjusted Score
9.4
Raw Score
100%
Time Factor
2026-08-27
Last Push
7.7K
Stars
Cuda
Language
15.9K
Lines of Code
90
Files
165
Pattern Hits
2026-08-29
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 1LOW 164

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 165 distinct pattern matches across 7 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.

Unused Imports88 hits · 70 pts
SeverityFileLineSnippetContext
LOWdeep_gemm/__init__.py3CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py17CODE
LOWdeep_gemm/__init__.py29CODE
LOWdeep_gemm/__init__.py29CODE
LOWdeep_gemm/__init__.py29CODE
LOWdeep_gemm/__init__.py29CODE
LOWdeep_gemm/__init__.py86CODE
LOWdeep_gemm/__init__.py86CODE
LOWdeep_gemm/__init__.py86CODE
LOWdeep_gemm/__init__.py86CODE
LOWdeep_gemm/__init__.py86CODE
LOWdeep_gemm/__init__.py95CODE
LOWdeep_gemm/__init__.py96CODE
LOWdeep_gemm/__init__.py97CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py36CODE
LOWdeep_gemm/__init__.py101CODE
LOWdeep_gemm/legacy/m_grouped_gemm.py4CODE
LOWdeep_gemm/legacy/m_grouped_gemm.py6CODE
LOWdeep_gemm/legacy/__init__.py2CODE
LOWdeep_gemm/legacy/__init__.py3CODE
LOWdeep_gemm/legacy/__init__.py4CODE
28 more matches not shown…
Hyper-Verbose Identifiers32 hits · 32 pts
SeverityFileLineSnippetContext
LOWdeep_gemm/mega/__init__.py69def get_symm_buffer_for_mega_moe(group: dist.ProcessGroup,CODE
LOWdeep_gemm/mega/__init__.py131def transform_weights_for_mega_moe(CODE
LOWtests/test_mega_moe.py36def _to_shared_mega_moe_sf_layout(sf: torch.Tensor, block_m: int, num_max_sf_tokens: int) -> torch.Tensor:CODE
LOWtests/generators.py157def enumerate_m_grouped_contiguous(dtype: torch.dtype) -> Generator:CODE
LOWtests/generators.py174def enumerate_m_grouped_masked(dtype: torch.dtype) -> Generator:CODE
LOWtests/generators.py190def enumerate_k_grouped_contiguous(dtype: torch.dtype):CODE
LOWtests/generators.py213def enumerate_k_grouped_contiguous_test_variants(real_ks_cpu: List[int], k_alignment: int,CODE
LOWtests/generators.py243def enumerate_k_grouped_sf_layout():CODE
LOWtests/generators.py253def enumerate_k_grouped_psum_sf_layout():CODE
LOWtests/generators.py329def generate_m_grouped_contiguous(num_groups: int, expected_m_per_group: int, n: int, k: int,CODE
LOWtests/generators.py382def generate_m_grouped_masked(num_groups: int, max_m: int, expected_m_per_group: int, n: int, k: int,CODE
LOWtests/generators.py438def generate_k_grouped_contiguous(num_groups: int, m: int, n: int, major_a: MajorTypeAB, major_b: MajorTypeAB, ks_cpu: LCODE
LOWtests/generators.py482def build_psum_layout_from_ks(real_ks: List[int], k_alignment: int) -> List[int]:CODE
LOWtests/generators.py492def generate_k_grouped_contiguous_psum(num_groups: int, m: int, n: int,CODE
LOWtests/test_fp8_fp4.py64def test_m_grouped_gemm_contiguous() -> None:CODE
LOWtests/test_fp8_fp4.py122def test_m_grouped_gemm_masked() -> None:CODE
LOWtests/test_fp8_fp4.py186def test_k_grouped_gemm_contiguous() -> None:CODE
LOWtests/test_attention.py325 def enumerate_paged_mqa_logits():CODE
LOWtests/test_legacy.py14def test_m_grouped_gemm_contiguous_tl() -> None:CODE
LOWtests/test_legacy.py50def test_k_grouped_gemm_contiguous_tl() -> None:CODE
LOWtests/test_bf16.py57def test_m_grouped_gemm_contiguous() -> None:CODE
LOWtests/test_bf16.py107def test_m_grouped_gemm_masked() -> None:CODE
LOWtests/test_bf16.py164def test_k_grouped_gemm_contiguous() -> None:CODE
LOWtests/test_layout.py83def test_k_grouped_sf_layout_kernels() -> None:CODE
LOWtests/test_layout.py108def test_k_grouped_psum_sf_layout_kernels() -> None:CODE
LOWscripts/generate_pyi.py135 def _in_top_level_of_other_brackets(self):CODE
LOWscripts/generate_pyi.py345def extract_cpp_signature_from_content(cpp_func_name, content):CODE
LOWscripts/generate_pyi.py389def parse_mdef_and_attach_cpp_signatures(item, func_index):CODE
LOWscripts/generate_pyi.py494def parse_parameter_declaration(decl: str):CODE
LOWscripts/generate_pyi.py581def extract_cpp_signature_details(item):CODE
LOWscripts/generate_pyi.py723def cpp_default_to_python_default(cpp_default: str):CODE
LOWscripts/generate_pyi.py828def generate_pyi_file_content(enhanced_results, module_name: str = 'my_module'):CODE
Deep Nesting20 hits · 19 pts
SeverityFileLineSnippetContext
LOWdeep_gemm/testing/bench.py79CODE
LOWtests/generators.py115CODE
LOWtests/generators.py157CODE
LOWtests/generators.py174CODE
LOWtests/generators.py231CODE
LOWtests/test_fp8_fp4.py64CODE
LOWtests/test_fp8_fp4.py122CODE
LOWtests/test_attention.py116CODE
LOWtests/test_attention.py287CODE
LOWtests/test_attention.py136CODE
LOWtests/test_attention.py325CODE
LOWtests/test_legacy.py14CODE
LOWtests/test_bf16.py57CODE
LOWtests/test_bf16.py107CODE
LOWscripts/generate_pyi.py5CODE
LOWscripts/generate_pyi.py151CODE
LOWscripts/generate_pyi.py225CODE
LOWscripts/generate_pyi.py345CODE
LOWscripts/generate_pyi.py828CODE
LOWscripts/generate_pyi.py112CODE
Over-Commented Block11 hits · 11 pts
SeverityFileLineSnippetContext
LOWcsrc/python_api.cpp1#include <pybind11/pybind11.h>COMMENT
LOWcsrc/apis/einsum.hpp1#pragma onceCOMMENT
LOWcsrc/apis/mega.hpp1#pragma onceCOMMENT
LOWcsrc/apis/attention.hpp1#pragma onceCOMMENT
LOWcsrc/apis/gemm.hpp1#pragma onceCOMMENT
LOWcsrc/utils/system.hpp1#pragma onceCOMMENT
LOWcsrc/utils/format.hpp1#pragma onceCOMMENT
LOWcsrc/utils/compatibility.hpp1#pragma onceCOMMENT
LOWcsrc/jit/compiler.hpp1#pragma onceCOMMENT
LOWcsrc/jit_kernels/heuristics/mega_moe.hpp1#pragma onceCOMMENT
LOWcsrc/jit_kernels/impls/sm100_fp8_fp4_gemm_1d1d.hpp1#pragma onceCOMMENT
Excessive Try-Catch Wrapping9 hits · 9 pts
SeverityFileLineSnippetContext
LOWsetup.py71 except Exception:CODE
LOWdeep_gemm/__init__.py102except Exception as e:CODE
LOWdeep_gemm/__init__.py116 except Exception:CODE
LOWdeep_gemm/mega/__init__.py12except Exception as exception:CODE
LOWtests/test_mega_moe.py30 except Exception as ex:CODE
LOWscripts/generate_pyi.py25 except Exception as e:CODE
LOWscripts/generate_pyi.py170 except Exception as e:CODE
LOWscripts/generate_pyi.py594 except Exception as e:CODE
LOWscripts/generate_pyi.py846 except Exception as e:CODE
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMscripts/generate_pyi.py517 # Instead of simple splitting, we'll use a more robust approachCOMMENT
LOWscripts/generate_pyi.py523 # No parameter name found, just return the typeCOMMENT
LOWscripts/generate_pyi.py574 # Fallback: if we can't find a clear parameter name, just return the typeCOMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWscripts/generate_pyi.py182 # Check if it's a commentCOMMENT
LOWscripts/generate_pyi.py549 # Check if this might be part of a type keyword (like 'int', 'bool', etc.)COMMENT