Modern CUDA Learn Notes with PyTorch for Beginners, 200+ CUDA Kernels, Tensor Cores, HGEMM, FA-2 MMA.
This report presents the forensic synthetic code analysis of xlite-dev/LeetCUDA, a Cuda project with 11,843 GitHub stars. SynthScan v2.0 examined 16,740 lines of code across 111 source files, recording 89 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 13.1 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 89 distinct pattern matches across 13 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 |
|---|---|---|---|---|
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 48 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 55 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 56 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 60 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 69 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 78 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 87 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 96 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 48 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 55 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 56 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 60 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 69 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 78 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 87 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 96 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM | kernels/interview/build.sh | 19 | # ── ccache detection ────────────────────────────────────────────── | COMMENT |
| MEDIUM | kernels/interview/build.sh | 36 | # ── common flags (shared across all architectures) ──────────────── | COMMENT |
| MEDIUM | kernels/interview/build.sh | 46 | # ── architecture configurations ─────────────────────────────────── | COMMENT |
| MEDIUM | kernels/interview/build.sh | 84 | # ── CLI ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | kernels/interview/build.sh | 119 | # ── clean ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | kernels/interview/build.sh | 135 | # ── build one architecture ──────────────────────────────────────── | COMMENT |
| MEDIUM | kernels/interview/build.sh | 175 | # ── main ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 48 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 55 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 56 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 60 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 69 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 78 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 87 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | kernels/swizzle/print_swizzle_layout.py | 96 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM | kernels/openai-triton/vector-add/triton_vector_add.py | 21 | # -------------- | COMMENT |
| MEDIUM | kernels/cutlass/cute_dsl/sgemm/pipelining.py | 63 | # ========================================================================== | COMMENT |
| MEDIUM | kernels/cutlass/cute_dsl/sgemm/pipelining.py | 65 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | kernels/cutlass/cute_dsl/sgemm/pipelining.py | 118 | # ====================================================================== | COMMENT |
| MEDIUM | kernels/cutlass/cute_dsl/sgemm/pipelining.py | 173 | # =================================================================== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/hgemm/bench/prof.py | 1 | import time | COMMENT |
| LOW | kernels/hgemm/bench/prof.py | 81 | # run_benchmark(lib.hgemm_sliced_k_f16, a, b, "f16(sk)", c) | COMMENT |
| LOW | kernels/hgemm/tools/print_swizzle_layout.py | 41 | rows: int = 16, | COMMENT |
| LOW | kernels/hgemm/tools/print_swizzle_layout.py | 61 | # |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 |
| LOW | kernels/hgemm/tools/print_swizzle_layout.py | 81 | # |bank |b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15| | COMMENT |
| LOW | kernels/hgemm/tools/utils.py | 41 | ) | COMMENT |
| LOW | kernels/flash-attn/tools/print_swizzle_layout.py | 41 | rows: int = 16, | COMMENT |
| LOW | kernels/flash-attn/tools/print_swizzle_layout.py | 61 | # |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 |
| LOW | kernels/flash-attn/tools/print_swizzle_layout.py | 81 | # |bank |b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15| | COMMENT |
| LOW | kernels/flash-attn/utils/utils.h | 1 | #include <algorithm> | COMMENT |
| LOW | kernels/flash-attn/utils/utils.h | 21 | #define DEVICE_INLINE __device__ inline | COMMENT |
| LOW | kernels/interview/build.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | kernels/swizzle/print_swizzle_layout.py | 41 | rows: int = 16, | COMMENT |
| LOW | kernels/swizzle/print_swizzle_layout.py | 61 | # |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 |
| LOW | kernels/swizzle/print_swizzle_layout.py | 81 | # |bank |b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15|b 8~11|b12~15| | COMMENT |
| LOW | kernels/softmax/softmax.py | 61 | out_val = [f"{v:<12}" for v in out_val] | COMMENT |
| LOW | kernels/openai-triton/vector-add/triton_vector_add.py | 41 | # This program will process inputs that are offset from the initial data. | COMMENT |
| LOW | others/tensorrt/fmha/fmha_pattern_match_ops.py | 41 | V = V.permute(0, 2, 1, 3) # [B, S, N, h] -> [B, N, S, h] | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | kernels/hgemm/tools/print_swizzle_layout.py | 0 | ---------------------------------------------------------------- [info] assert smem store layout col_stride <= 16, prefe | STRING |
| HIGH | kernels/flash-attn/tools/print_swizzle_layout.py | 0 | ---------------------------------------------------------------- [info] assert smem store layout col_stride <= 16, prefe | STRING |
| HIGH | kernels/swizzle/print_swizzle_layout.py | 0 | ---------------------------------------------------------------- [info] assert smem store layout col_stride <= 16, prefe | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/hgemm/hgemm.py | 362 | CODE | |
| LOW | kernels/hgemm/tools/print_swizzle_layout.py | 40 | CODE | |
| LOW | kernels/flash-attn/flash_attn_mma.py | 286 | CODE | |
| LOW | kernels/flash-attn/tools/print_swizzle_layout.py | 40 | CODE | |
| LOW | kernels/swizzle/print_swizzle_layout.py | 40 | CODE | |
| LOW | kernels/cutlass/cute_dsl/sgemm/pipelining.py | 17 | CODE | |
| LOW | …hers/pytorch/distributed/test_all_to_all_single_ray.py | 49 | CODE | |
| LOW | others/pytorch/distributed/test_all_to_all_single.py | 16 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/hgemm/hgemm.py | 198 | def make_block_swizzle_stride(N: int, K: int, swizzle_factor: float = None): | CODE |
| LOW | kernels/hgemm/setup.py | 23 | def get_cuda_bare_metal_version(cuda_dir): | CODE |
| LOW⚡ | kernels/hgemm/tools/print_swizzle_layout.py | 40 | def print_smem_swizzle_layout( | CODE |
| LOW⚡ | kernels/flash-attn/tools/print_swizzle_layout.py | 40 | def print_smem_swizzle_layout( | CODE |
| LOW⚡ | kernels/swizzle/print_swizzle_layout.py | 40 | def print_smem_swizzle_layout( | CODE |
| LOW | …i-triton/merge-attn-states/triton_merge_attn_states.py | 119 | def merge_attn_states_kernel_opt( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/hgemm/tools/utils.py | 134 | except Exception: | CODE |
| LOW | …hers/pytorch/distributed/test_all_to_all_single_ray.py | 116 | except Exception as e: | CODE |
| MEDIUM | …hers/pytorch/distributed/test_all_to_all_single_ray.py | 49 | def run(self) -> torch.Tensor: | CODE |
| LOW | others/pytorch/distributed/test_all_to_all_single.py | 85 | except Exception as e: | CODE |
| LOW | others/pytorch/distributed/test_dist_all.py | 180 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …ls/openai-triton/fused-softmax/triton_fused_softmax.py | 144 | # Create a number of persistent programs. | COMMENT |
| MEDIUM | kernels/openai-triton/vector-add/triton_vector_add.py | 47 | # Create a mask to guard memory operations against out-of-bounds accesses. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/hgemm/hgemm.py | 212 | CODE | |
| LOW | …ls/openai-triton/fused-softmax/triton_fused_softmax.py | 29 | CODE | |
| LOW | others/tensorrt/fmha/fmha_pattern_match_ops.py | 62 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/interview/build.sh | 148 | # Step 1: compile (ccache-cached when available) | COMMENT |
| LOW | kernels/interview/build.sh | 164 | # Step 2: link | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/interview/build.sh | 148 | # Step 1: compile (ccache-cached when available) | COMMENT |
| LOW | kernels/interview/build.sh | 164 | # Step 2: link | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/interview/bench_sdpa.py | 11 | CODE | |
| LOW | kernels/interview/bench_sdpa.py | 15 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/interview/build.sh | 8 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | kernels/openai-triton/vector-add/triton_vector_add.py | 75 | # - Don't forget to pass meta-parameters as keywords arguments. | COMMENT |