AI Slop Code RIsk Monitor

xlite-dev/LeetCUDA

An Open-source book with Modern CUDA learning Notes for Beginners - BF16/FP8/FP4, HGEMM, CuTe, Flash-Attention, etc.

6.0 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for xlite-dev/LeetCUDA, a Cuda project with 12,056 GitHub stars. SynthScan examined 51,566 lines of code across 368 source files, recording 162 pattern matches distributed across 15 syntactic categories. The legacy adjusted pattern signal is 6.0 (Moderate pattern signal); it is not an authorship estimate.

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

6.0
Adjusted Signal
6.0
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
12.1K
Stars
Cuda
Language
51.6K
Lines of Code
368
Files
162
Pattern Hits
2026-10-12
Scan Date
0.03
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 9.8/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 4.9/100 · LOW

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

Agent Over-Engineering Ratio 15.1/100 · LOW

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

PR Review Velocity Impact 23.9/100 · LOW

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 0HIGH 11MEDIUM 32LOW 119

Directory Score Breakdown

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

Pattern Findings

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

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

Decorative Section Separators29 hits · 123 pts
SeverityFileLineSnippetContext
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py48 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py55 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py56 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py60 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py69 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py78 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py87 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/hgemm/tools/print_swizzle_layout.py96 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py48 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py55 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py56 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py60 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py69 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py78 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py87 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/flash-attn/tools/print_swizzle_layout.py96 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py48 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py55 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py56 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py60 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py69 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py78 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py87 # ----------------------------------------------------------------COMMENT
MEDIUM⚡kernels/swizzle/print_swizzle_layout.py96 # ----------------------------------------------------------------COMMENT
MEDIUMkernels/openai-triton/vector-add/triton_vector_add.py21# --------------COMMENT
MEDIUMkernels/cutlass/cute_dsl/sgemm/pipelining.py63 # ==========================================================================COMMENT
MEDIUMkernels/cutlass/cute_dsl/sgemm/pipelining.py65 # --------------------------------------------------------------------------COMMENT
MEDIUMkernels/cutlass/cute_dsl/sgemm/pipelining.py118 # ======================================================================COMMENT
MEDIUMkernels/cutlass/cute_dsl/sgemm/pipelining.py173 # ===================================================================COMMENT
Deep Nesting34 hits · 34 pts
SeverityFileLineSnippetContext
LOWkernels/hgemm/hgemm.py362CODE
LOWkernels/hgemm/tools/print_swizzle_layout.py40CODE
LOWkernels/flash-attn/flash_attn_mma.py286CODE
LOWkernels/flash-attn/tools/print_swizzle_layout.py40CODE
LOW…view/book/figures/drawio/fig-23-2-tma-copy-flow/gen.py46CODE
LOWkernels/interview/book/scripts/check_overlap.py9CODE
LOWkernels/swizzle/print_swizzle_layout.py40CODE
LOWkernels/cutlass/cute_dsl/sgemm/pipelining.py17CODE
LOW…hers/pytorch/distributed/test_all_to_all_single_ray.py49CODE
LOWothers/pytorch/distributed/test_all_to_all_single.py16CODE
LOWdocs/readthedocs/tools/code_dict.py103CODE
LOWdocs/readthedocs/tools/visual_check.py194CODE
LOWdocs/readthedocs/convert/labels.py245CODE
LOWdocs/readthedocs/convert/figtext.py131CODE
LOWdocs/readthedocs/convert/preprocess.py755CODE
LOWdocs/readthedocs/convert/preprocess.py944CODE
LOWdocs/readthedocs/convert/preprocess.py1202CODE
LOWdocs/readthedocs/convert/preprocess.py1333CODE
LOWdocs/readthedocs/convert/preprocess.py1394CODE
LOWdocs/readthedocs/convert/preprocess.py1439CODE
LOWdocs/readthedocs/convert/postprocess.py857CODE
LOWdocs/readthedocs/convert/postprocess.py1201CODE
LOWdocs/readthedocs/convert/postprocess.py1275CODE
LOWdocs/readthedocs/convert/postprocess.py399CODE
LOWdocs/readthedocs/convert/postprocess.py430CODE
LOWdocs/readthedocs/convert/texutil.py35CODE
LOWdocs/readthedocs/convert/texutil.py64CODE
LOWdocs/readthedocs/convert/texutil.py186CODE
LOWdocs/readthedocs/convert/texutil.py289CODE
LOWdocs/readthedocs/convert/texutil.py370CODE
LOWdocs/readthedocs/convert/verify.py440CODE
LOWdocs/readthedocs/convert/verify.py483CODE
LOWdocs/readthedocs/convert/verify.py659CODE
LOWdocs/readthedocs/convert/tikz2svg.py184CODE
Cross-Language Confusion7 hits · 30 pts
SeverityFileLineSnippetContext
HIGHdocs/readthedocs/tools/visual_check.py13依赖(可选,不进站点构建):``pip install playwright && python -m playwright installSTRING
HIGHdocs/readthedocs/tools/visual_check.py54 if (!element.offsetParent && element.tagName !== 'BODY') return true;CODE
HIGHdocs/readthedocs/tools/visual_check.py61 parts.push(child.nodeValue);CODE
HIGHdocs/readthedocs/tools/visual_check.py96 if (!content) return null;CODE
HIGHdocs/readthedocs/tools/visual_check.py105 if (sidebar && content_column) {CODE
HIGHdocs/readthedocs/tools/visual_check.py119 if (rect.width <= column.width + 1 && offCenter(rect)) out.tables_off_center += 1;CODE
HIGHdocs/readthedocs/convert/__main__.py5 cd docs/readthedocs && python -m convertSTRING
Over-Commented Block22 hits · 22 pts
SeverityFileLineSnippetContext
LOWkernels/hgemm/bench/prof.py1import timeCOMMENT
LOWkernels/hgemm/bench/prof.py81 # run_benchmark(lib.hgemm_sliced_k_f16, a, b, "f16(sk)", c)COMMENT
LOWkernels/hgemm/tools/print_swizzle_layout.py41 rows: int = 16,COMMENT
LOWkernels/hgemm/tools/print_swizzle_layout.py61 # |bank |b 0~3 |b 4~7 |b 0~3 |b 4~7 |b 0~3 |b 4~7 |b 0~3 |b 4~7 |COMMENT
LOWkernels/hgemm/tools/print_swizzle_layout.py81 # |bank |b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|COMMENT
LOWkernels/hgemm/tools/utils.py41 )COMMENT
LOWkernels/flash-attn/tools/print_swizzle_layout.py41 rows: int = 16,COMMENT
LOWkernels/flash-attn/tools/print_swizzle_layout.py61 # |bank |b 0~3 |b 4~7 |b 0~3 |b 4~7 |b 0~3 |b 4~7 |b 0~3 |b 4~7 |COMMENT
LOWkernels/flash-attn/tools/print_swizzle_layout.py81 # |bank |b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|COMMENT
LOWkernels/flash-attn/utils/utils.h1#include <algorithm>COMMENT
LOWkernels/flash-attn/utils/utils.h21#define DEVICE_INLINE __device__ inlineCOMMENT
LOWkernels/interview/build.sh1#!/usr/bin/env bashCOMMENT
LOW…view/book/references/fulltext/zhuxijiachu-tiled-mma.md261 // (M,N,...)COMMENT
LOW…interview/book/references/fulltext/reed-simple-gemm.md21COMMENT
LOWkernels/interview/book/tests/common_test.h1#pragma onceCOMMENT
LOW…nterview/book/cute-zhihu/sources/zhuxi-02-tiled-mma.md261 auto thr_tensor = make_tensor(static_cast<CTensor&&>(ctensor).data(), this->thrfrg_C(ctensor.layout()));COMMENT
LOWkernels/swizzle/print_swizzle_layout.py41 rows: int = 16,COMMENT
LOWkernels/swizzle/print_swizzle_layout.py61 # |bank |b 0~3 |b 4~7 |b 0~3 |b 4~7 |b 0~3 |b 4~7 |b 0~3 |b 4~7 |COMMENT
LOWkernels/swizzle/print_swizzle_layout.py81 # |bank |b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|COMMENT
LOWkernels/softmax/softmax.py61 out_val = [f"{v:<12}" for v in out_val]COMMENT
LOWkernels/openai-triton/vector-add/triton_vector_add.py41 # This program will process inputs that are offset from the initial data.COMMENT
LOWothers/tensorrt/fmha/fmha_pattern_match_ops.py41 V = V.permute(0, 2, 1, 3) # [B, S, N, h] -> [B, N, S, h]COMMENT
Unused Imports22 hits · 22 pts
SeverityFileLineSnippetContext
LOWkernels/interview/bench/deprecated/bench_sdpa.py11CODE
LOWkernels/interview/bench/deprecated/bench_sdpa.py15CODE
LOWdocs/readthedocs/conf.py6CODE
LOWdocs/readthedocs/tools/translate_figures.py15CODE
LOWdocs/readthedocs/tools/code_dict.py22CODE
LOWdocs/readthedocs/tools/visual_check.py19CODE
LOWdocs/readthedocs/tools/build_cover_en.py24CODE
LOWdocs/readthedocs/convert/labels.py9CODE
LOWdocs/readthedocs/convert/figtext.py12CODE
LOWdocs/readthedocs/convert/readme.py7CODE
LOWdocs/readthedocs/convert/preprocess.py20CODE
LOWdocs/readthedocs/convert/postprocess.py10CODE
LOWdocs/readthedocs/convert/__init__.py11CODE
LOWdocs/readthedocs/convert/tokens.py10CODE
LOWdocs/readthedocs/convert/texutil.py6CODE
LOWdocs/readthedocs/convert/booktree.py6CODE
LOWdocs/readthedocs/convert/macros.py11CODE
LOWdocs/readthedocs/convert/cjk_nodes.py8CODE
LOWdocs/readthedocs/convert/verify.py17CODE
LOWdocs/readthedocs/convert/tikz2svg.py14CODE
LOWdocs/readthedocs/convert/tikz2svg.py18CODE
LOWdocs/readthedocs/convert/__main__.py9CODE
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHkernels/hgemm/tools/print_swizzle_layout.py0---------------------------------------------------------------- [info] assert smem store layout col_stride <= 16, prefeSTRING
HIGHkernels/flash-attn/tools/print_swizzle_layout.py0---------------------------------------------------------------- [info] assert smem store layout col_stride <= 16, prefeSTRING
HIGHkernels/swizzle/print_swizzle_layout.py0---------------------------------------------------------------- [info] assert smem store layout col_stride <= 16, prefeSTRING
Hyper-Verbose Identifiers13 hits · 14 pts
SeverityFileLineSnippetContext
LOWkernels/hgemm/hgemm.py198def make_block_swizzle_stride(N: int, K: int, swizzle_factor: float = None):CODE
LOWkernels/hgemm/setup.py23def get_cuda_bare_metal_version(cuda_dir):CODE
LOW⚡kernels/hgemm/tools/print_swizzle_layout.py40def print_smem_swizzle_layout(CODE
LOW⚡kernels/flash-attn/tools/print_swizzle_layout.py40def print_smem_swizzle_layout(CODE
LOW⚡kernels/swizzle/print_swizzle_layout.py40def print_smem_swizzle_layout(CODE
LOW…i-triton/merge-attn-states/triton_merge_attn_states.py119def merge_attn_states_kernel_opt(CODE
LOWdocs/readthedocs/convert/preprocess.py1045def _isolate_display_brackets(text: str) -> str:CODE
LOWdocs/readthedocs/convert/preprocess.py1481def _normalize_math_primitives(text: str) -> str:CODE
LOWdocs/readthedocs/convert/postprocess.py662def _clean_heading_attributes(md_text: str) -> str:CODE
LOWdocs/readthedocs/convert/postprocess.py825def _collapse_math_blank_lines(md_text: str) -> str:CODE
LOWdocs/readthedocs/convert/verify.py206def check_table_counts_per_chapter(CODE
LOWdocs/readthedocs/convert/verify.py312def check_table_inline_markdown(md_texts: dict[str, str]) -> tuple[bool, str]:CODE
LOWdocs/readthedocs/convert/verify.py567def check_math_foreign_markup(texts: dict[str, str]) -> tuple[bool, str]:CODE
Verbosity Indicators8 hits · 12 pts
SeverityFileLineSnippetContext
LOWkernels/interview/build.sh218 # Step 1: 并行编译全部 TU(wait -n 限流,失败即终止并杀掉其余 job 及其 nvcc 子进程)COMMENT
LOWkernels/interview/build.sh247 # Step 2: weaken base.cuh 派生的重复强符号(base.o 为规范定义)COMMENT
LOWkernels/interview/build.sh258 # Step 3: link(显式 TU 列表,防 stale .o 混入;weaken 后 base.o 的强符号恒胜弱符号)COMMENT
LOW⚡docs/readthedocs/_static/code-en.json64 "// Step 1: max 归一化(与 safe softmax 同理,防 exp 溢出)": "// Step 1: max normalization (same idea as safe softmax, prevents exCODE
LOW⚡docs/readthedocs/_static/code-en.json66 "// Step 4: 逐元素加权合并 O = alpha * O_1 + beta * O_2": "// Step 4: element-wise weighted merge O = alpha * O_1 + beta * O_2CODE
LOW⚡docs/readthedocs/_static/code-en.json358 "// Step 1: 加载 Q[Br, d] 到 shared memory(整个外循环只加载一次)": "// Step 1: load Q[Br, d] into shared memory (loaded only once acCODE
LOW⚡docs/readthedocs/_static/code-en.json359 "// Step 2: 预加载前 (kStagesK-1) 个 K tile(多 stage pipeline 预热)": "// Step 2: preload the first (kStagesK-1) K tiles (warm-CODE
LOWdocs/readthedocs/_static/code-en.json386 "// Step 4: 最终 rescale — O_final = (1/l_final) * O_final": "// Step 4: final rescale — O_final = (1/l_final) * O_final"CODE
Structural Annotation Overuse8 hits · 12 pts
SeverityFileLineSnippetContext
LOWkernels/interview/build.sh218 # Step 1: 并行编译全部 TU(wait -n 限流,失败即终止并杀掉其余 job 及其 nvcc 子进程)COMMENT
LOWkernels/interview/build.sh247 # Step 2: weaken base.cuh 派生的重复强符号(base.o 为规范定义)COMMENT
LOWkernels/interview/build.sh258 # Step 3: link(显式 TU 列表,防 stale .o 混入;weaken 后 base.o 的强符号恒胜弱符号)COMMENT
LOW⚡docs/readthedocs/_static/code-en.json64 "// Step 1: max 归一化(与 safe softmax 同理,防 exp 溢出)": "// Step 1: max normalization (same idea as safe softmax, prevents exCODE
LOW⚡docs/readthedocs/_static/code-en.json66 "// Step 4: 逐元素加权合并 O = alpha * O_1 + beta * O_2": "// Step 4: element-wise weighted merge O = alpha * O_1 + beta * O_2CODE
LOW⚡docs/readthedocs/_static/code-en.json358 "// Step 1: 加载 Q[Br, d] 到 shared memory(整个外循环只加载一次)": "// Step 1: load Q[Br, d] into shared memory (loaded only once acCODE
LOW⚡docs/readthedocs/_static/code-en.json359 "// Step 2: 预加载前 (kStagesK-1) 个 K tile(多 stage pipeline 预热)": "// Step 2: preload the first (kStagesK-1) K tiles (warm-CODE
LOWdocs/readthedocs/_static/code-en.json386 "// Step 4: 最终 rescale — O_final = (1/l_final) * O_final": "// Step 4: final rescale — O_final = (1/l_final) * O_final"CODE
Excessive Try-Catch Wrapping7 hits · 8 pts
SeverityFileLineSnippetContext
LOWkernels/hgemm/tools/utils.py134 except Exception:CODE
LOW…hers/pytorch/distributed/test_all_to_all_single_ray.py116 except Exception as e:CODE
MEDIUM…hers/pytorch/distributed/test_all_to_all_single_ray.py49def run(self) -> torch.Tensor:CODE
LOWothers/pytorch/distributed/test_all_to_all_single.py85 except Exception as e:CODE
LOWothers/pytorch/distributed/test_dist_all.py180 except Exception as e:CODE
LOWdocs/readthedocs/tools/visual_check.py245 except Exception: # MathJax 报错时 promise 不会 resolve,这里不该中断验收STRING
LOWdocs/readthedocs/convert/__main__.py198 except Exception: # cairosvg 对个别格式敏感,跳过即可,不影响站点CODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUM…ls/openai-triton/fused-softmax/triton_fused_softmax.py144 # Create a number of persistent programs.COMMENT
MEDIUMkernels/openai-triton/vector-add/triton_vector_add.py47 # Create a mask to guard memory operations against out-of-bounds accesses.COMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHdocs/readthedocs/tools/visual_check.py245except Exception: # MathJax 报错时 promise 不会 resolve,这里不该中断验收CODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWkernels/hgemm/hgemm.py212CODE
LOW…view/book/figures/drawio/fig-23-2-tma-copy-flow/gen.py12CODE
LOW…ls/openai-triton/fused-softmax/triton_fused_softmax.py29CODE
LOWothers/tensorrt/fmha/fmha_pattern_match_ops.py62CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWkernels/interview/build.sh16# Usage:COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWkernels/openai-triton/vector-add/triton_vector_add.py75 # - Don't forget to pass meta-parameters as keywords arguments.COMMENT