Repository Analysis

flashinfer-ai/flashinfer

FlashInfer: Kernel Library for LLM Serving

20.0 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of flashinfer-ai/flashinfer, a Python project with 5,957 GitHub stars. SynthScan v2.0 examined 667,312 lines of code across 1440 source files, recording 7735 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 20.0 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).

20.0
Adjusted Score
20.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
6.0K
Stars
Python
Language
667.3K
Lines of Code
1.4K
Files
7.7K
Pattern Hits
2026-07-14
Scan Date
0.31
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 450MEDIUM 2160LOW 5125

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 7735 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.

Decorative Section Separators2049 hits · 6183 pts
SeverityFileLineSnippetContext
MEDIUMcsrc/fused_moe/monomoe/src/ptx_utils.h14// ── Hopper WGMMA (sm_90a) helpers ─────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/ptx_utils.h175// ── Hopper mbarrier helpers (sm_90a) ──────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/ptx_utils.h321// ── Hopper TMA bulk-tensor copy (sm_90a) ──────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_tma.h214// ─── Device-side TMA load helpers ────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_tma.h437// ─── Down-projection (Phase 4) TMA load helpers ──────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h19// ── Default pipeline variants ───────────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h66// ── KernelConfig accessors ───────────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h106 // ── WGMMA-path-only up-proj → down-proj scratchpad ───────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h182// ── Block-wise quantization detection (forward declaration) ──────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h224// ── WGMMA opt-in detection ───────────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h235// ── TMA opt-in detection ────────────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h262 // ── WGMMA-only tile dimensions (v1 dual-WG K=128 streaming) ──────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h354 // ── WGMMA down-projection grid layout ────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h491 // ── K-substep constants ────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h548 // ── NEW: single-buffer fp8_act covering all K substeps ──────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h744 // ── TMA-only extensions ─────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h789 // ── routing-window mbarrier ─────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h806 // ── Phase 3 → Phase 4 (expert, token) reorganization tables ─────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h884 // ── Routing-time inverse map: (expert id, token) → top-k rank ────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h941 // ── Aliasing safety static_asserts ─────────────────COMMENT
MEDIUMtests/kda/test_recurrent_kda.py745# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py747# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1263# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1265# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1384# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1386# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1460# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1462# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1492# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1494# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1895# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1897# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1941# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1943# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2011# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2013# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2071# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2073# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2173# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2175# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2184# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2186# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2256# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2258# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py36# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py38# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py106# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py108# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py127# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py129# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py506# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py508# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py900# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py902# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1062# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1064# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1165# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1167# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2107# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2109# ------------------------------------------------------------------------------COMMENT
1989 more matches not shown…
Cross-File Repetition410 hits · 2050 pts
SeverityFileLineSnippetContext
HIGHbuild_backend.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_batch_prefill_kernels.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_alibi.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_batch_decode_kernels.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_shared_prefix_kernels.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_decode_fp8_calibration_scale.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_deepseek_mla.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_pod_kernels.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/test_helpers/jit_utils.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/routines/__init__.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/version.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/pod.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/__init__.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/page.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/utils.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/prefill.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/decode.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/cascade.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/comm/nvshmem_allreduce.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/testing/__init__.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/testing/utils.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbuild_utils.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer-cubin/flashinfer_cubin/__init__.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_attention_sink_blackwell.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_attention_sink.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_batch_attention.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_vsa_block_sparse.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/trace/test_fi_trace.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/mamba/__init__.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_logging.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_fp4_kv_quantization.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_logging_replay.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_load_cubin_compile_race_condition.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gemm/test_groupwise_scaled_gemm_fp8.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gemm/test_groupwise_scaled_gemm_mxfp4.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gdn/conftest.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gdn/test_prefill_cp_delta_rule.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gdn/test_prefill_delta_rule.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gdn/test_decode_delta_rule.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gdn/reference_delta_rule.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGH…sts/gdn/test_decode_pretranspose_noncontiguous_pool.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/test_helpers/sink_attention_reference.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_trtllm_cutlass_fused_moe.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGH…e/test_trtllm_gen_fused_moe_routing_renormalize_fp8.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/trtllm_gen_fused_moe_utils.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGH…/test_trtllm_gen_fused_moe_routing_renormalize_bf16.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_cute_dsl_fused_moe.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/utils.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGH…e/test_trtllm_gen_fused_moe_routing_renormalize_fp4.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_trtllm_gen_routed_fused_moe.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_trtllm_gen_per_token_moe.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_bgmv_moe.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_trtllm_gen_fused_moe.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/grouped_mm/test_cute_sm120_mxfp8.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer-jit-cache/build_backend.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer-jit-cache/flashinfer_jit_cache/__init__.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/bench_deepgemm_blackwell.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/bench_gdn_decode.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/bench_gdn_prefill.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/bench_groupwise_gemm_fp8_blackwell.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
350 more matches not shown…
Hyper-Verbose Identifiers2039 hits · 1824 pts
SeverityFileLineSnippetContext
LOWbuild_backend.py317def _synthesize_nccl_builddir(build: Path) -> None:CODE
LOWbuild_backend.py375def _check_nccl_version_drift(wheel: Path) -> None:CODE
LOWbuild_backend.py623def _install_nvep_runtime_wheels(built_nixl: bool) -> None:CODE
LOWbuild_backend.py690def _install_cuda_tile_compile_deps() -> None:CODE
LOWbuild_backend.py1027def get_requires_for_build_wheel(config_settings=None):CODE
LOWbuild_backend.py1032def get_requires_for_build_sdist(config_settings=None):CODE
LOWbuild_backend.py1037def get_requires_for_build_editable(config_settings=None):CODE
LOWbuild_backend.py1042def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):CODE
LOWbuild_backend.py1047def prepare_metadata_for_build_editable(metadata_directory, config_settings=None):CODE
LOWtests/conftest.py13def _patch_cutlass_dsl_operand_major_mode():CODE
LOWtests/conftest.py81def _set_torch_compile_options():CODE
LOWtests/conftest.py87def _monkeypatch_add_torch_compile(func):CODE
LOWtests/conftest.py175def pytest_collection_modifyitems(config, items):CODE
LOWtests/test_artifacts.py12def test_sanity_check_urllib_behavior():CODE
LOWtests/test_artifacts.py216def _mock_file_index_responses():STRING
LOWtests/test_artifacts.py230def test_get_available_cubin_files():STRING
LOWtests/test_artifacts.py282def test_get_subdir_file_list(monkeypatch, tmp_path):CODE
LOWtests/test_jit_cpp_ext.py18def test_nvcc_parallelism_flags_use_flashinfer_nvcc_threads(monkeypatch):CODE
LOWtests/test_jit_cpp_ext.py24def test_nvcc_parallelism_flags_ignore_sccache_launcher(monkeypatch):CODE
LOWtests/test_jit_cpp_ext.py31def test_generate_ninja_uses_sccache_compatible_nvcc_depfile_flag(CODE
LOWtests/test_jit_cpp_ext.py51def test_debug_jit_uses_sccache_compatible_nvcc_device_debug_flag(monkeypatch):CODE
LOWtests/test_jit_cpp_ext.py69def test_release_jit_propagates_ndebug_to_host_cflags(monkeypatch):CODE
LOWtests/test_jit_cpp_ext.py88def test_debug_jit_does_not_propagate_ndebug(monkeypatch):CODE
LOWtests/test_jit_cpp_ext.py106def test_run_ninja_uses_max_jobs(monkeypatch, tmp_path):CODE
LOWtests/test_jit_cpp_ext.py132def test_jit_spec_build_rewrites_ninja_before_build(monkeypatch):CODE
LOWtests/test_jit_cpp_ext.py232 def fake_single_prefill_module(CODE
LOWtests/test_jit_cpp_ext.py244 def fake_batch_prefill_module(CODE
LOWtests/kda/test_recurrent_kda.py757def test_non_contiguous_gate_stride(H: int, D: int):CODE
LOWtests/kda/test_recurrent_kda.py1269def test_spec_decode_padded_cuda_graph(D):CODE
LOWtests/kda/test_recurrent_kda.py1389def test_spec_decode_shape_validation():CODE
LOWtests/kda/test_recurrent_kda.py1465def test_spec_decode_cu_seqlens_validation():CODE
LOWtests/kda/test_recurrent_kda.py1497def test_spec_decode_num_accepted_tokens():CODE
LOWtests/kda/test_recurrent_kda.py1900def test_spec_decode_checkpoint_correctness():CODE
LOWtests/kda/test_recurrent_kda.py1946def test_spec_decode_non_compact_state():CODE
LOWtests/kda/test_recurrent_kda.py2016def test_spec_decode_all_padded():CODE
LOWtests/kda/test_recurrent_kda.py2076def test_spec_decode_validate_slots_collision():CODE
LOWtests/kda/test_recurrent_kda.py2189def test_spec_decode_batched_vs_cuseqlens():CODE
LOWtests/kda/test_recurrent_kda.py2261def test_spec_decode_batched_auto_ssi():CODE
LOWtests/kda/test_recurrent_kda.py91def naive_kda_lowerbound_gate(CODE
LOWtests/kda/test_recurrent_kda.py146def _make_vs_reference_tensors(B, T, H, D, gate_logit_normalizer, dtype):CODE
LOWtests/kda/test_recurrent_kda.py176def test_recurrent_kda_vs_naive(CODE
LOWtests/kda/test_recurrent_kda.py235def test_recurrent_kda_vs_fla(CODE
LOWtests/kda/test_recurrent_kda.py442def test_standard_decode_state_indices_update_pool():CODE
LOWtests/kda/test_recurrent_kda.py521def test_vllm_padded_cuda_graph(CODE
LOWtests/kda/test_recurrent_kda.py669def test_non_compact_state_stride(H: int, D: int):CODE
LOWtests/kda/test_recurrent_kda.py944def spec_decode_naive_reference(CODE
LOWtests/kda/test_recurrent_kda.py1178def test_spec_decode_gate_modes(gate_mode):CODE
LOWtests/kda/test_recurrent_kda.py1589def test_spec_decode_nat_equals_one_matches_no_nat():CODE
LOWtests/kda/test_recurrent_kda.py1633def test_spec_decode_nat_heterogeneous(D):CODE
LOWtests/kda/test_recurrent_kda.py1695def test_spec_decode_nat_with_padding():CODE
LOWtests/kda/test_recurrent_kda.py1815def test_spec_decode_nat_gate_modes(gate_mode):CODE
LOWtests/attention/test_nvfp4_attention_sm120.py24def _patch_cutlass_dsl_operand_major_mode():CODE
LOWtests/attention/test_hopper.py66def test_batch_ragged_prefill(CODE
LOWtests/attention/test_trtllm_gen_mla.py22def trtllm_gen_workspace_softmax_end_bytes_decode(CODE
LOWtests/attention/test_trtllm_gen_mla.py111def sparse_mla_reference_torch(CODE
LOWtests/attention/test_trtllm_gen_mla.py151 def scaled_dot_product_attention(CODE
LOWtests/attention/test_trtllm_gen_mla.py662def trtllm_batch_decode_mla_sparse(CODE
LOWtests/attention/test_trtllm_gen_mla.py962def test_trtllm_batch_decode_mla(CODE
LOWtests/attention/test_trtllm_gen_mla.py1009def test_trtllm_batch_decode_mla_cum_seq_lens_q(CODE
LOWtests/attention/test_trtllm_gen_mla.py1044def test_trtllm_batch_decode_mla_sparse(CODE
1979 more matches not shown…
Unused Imports1214 hits · 1008 pts
SeverityFileLineSnippetContext
LOWtests/attention/test_sparse_mla_sm120.py31CODE
LOWtests/attention/test_rope.py19CODE
LOWtests/trace/reference_utils.py3CODE
LOWtests/trace/test_fi_trace_template_consistency.py411CODE
LOWtests/moe_ep/smoke_nixl_ep.py12CODE
LOWtests/moe_ep/test_fleet_create.py3CODE
LOWtests/moe_ep/conftest.py3CODE
LOWtests/moe_ep/test_compute_bridge.py18CODE
LOWtests/moe_ep/test_layer_factory.py3CODE
LOWtests/moe_ep/test_moe_ep_compute_correctness.py11CODE
LOWtests/moe_ep/test_moe_ep_compute_correctness_nvfp4.py12CODE
LOWtests/moe_ep/test_split_kernels.py7CODE
LOWtests/moe_ep/test_constraints.py3CODE
LOWtests/moe_ep/test_moe_ep_ht_correctness.py11CODE
LOWtests/moe_ep/test_moe_ep_deep_gemm_mega_multirank.py14CODE
LOWtests/moe_ep/test_config.py3CODE
LOWtests/moe_ep/test_fused_moe_weights.py3CODE
LOWtests/moe_ep/test_moe_ep_layer_multirank.py12CODE
LOW…sts/moe_ep/test_moe_ep_mxfp8_cutedsl_mega_multirank.py20CODE
LOWtests/moe_ep/test_arch_and_build.py3CODE
LOW…sts/moe_ep/test_moe_ep_nvfp4_cutedsl_mega_multirank.py20CODE
LOWtests/moe_ep/test_layer_single_gpu.py3CODE
LOWtests/moe_ep/smoke_nccl_ep.py17CODE
LOWtests/moe_ep/test_mega_layer_validation.py3CODE
LOW…s/moe_ep/test_mxfp8_cutedsl_preprocess_vs_reference.py17CODE
LOWtests/moe_ep/nixl_ep/test_fleet_mock.py17CODE
LOWtests/moe_ep/nccl_ep/conftest.py9CODE
LOWtests/moe_ep/nccl_ep/test_handle_mock.py14CODE
LOWtests/moe_ep/nccl_ep/test_fleet_mock.py9CODE
LOWtests/moe_ep/nccl_ep/test_ndtensor.py9CODE
LOWtests/comm/test_mnnvl_dcp_alltoall.py64CODE
LOWtests/gdn/test_decode_pretranspose_bf16_padded_pool.py29CODE
LOWtests/gdn/test_prefill_delta_rule.py17CODE
LOWtests/gdn/test_decode_delta_rule.py17CODE
LOW…sts/gdn/test_decode_pretranspose_noncontiguous_pool.py17CODE
LOWtests/trace_apply/test_trace_apply.py15CODE
LOWtests/moe/test_unified_moe.py31CODE
LOWtests/moe/test_unified_moe_fuzz.py140CODE
LOWflashinfer-jit-cache/flashinfer_jit_cache/__init__.py17CODE
LOWflashinfer-jit-cache/flashinfer_jit_cache/__init__.py19CODE
LOWflashinfer-jit-cache/flashinfer_jit_cache/__init__.py19CODE
LOWbenchmarks/bench_batch_attention.py1CODE
LOWbenchmarks/bench_ep_matrix.py27CODE
LOWbenchmarks/bench_moe_ep.py49CODE
LOWflashinfer/fp8_quantization.py12CODE
LOWflashinfer/fp8_quantization.py12CODE
LOWflashinfer/fp8_quantization.py12CODE
LOWflashinfer/fp8_quantization.py12CODE
LOWflashinfer/__init__.py18CODE
LOWflashinfer/__init__.py20CODE
LOWflashinfer/__init__.py21CODE
LOWflashinfer/__init__.py24CODE
LOWflashinfer/__init__.py25CODE
LOWflashinfer/__init__.py26CODE
LOWflashinfer/__init__.py27CODE
LOWflashinfer/__init__.py28CODE
LOWflashinfer/__init__.py31CODE
LOWflashinfer/__init__.py32CODE
LOWflashinfer/__init__.py35CODE
LOWflashinfer/__init__.py36CODE
1154 more matches not shown…
Over-Commented Block558 hits · 483 pts
SeverityFileLineSnippetContext
LOWrequirements.txt1apache-tvm-ffi>=0.1.6,!=0.1.8,!=0.1.8.post0,<0.2COMMENT
LOW.pre-commit-config.yaml1# To use:COMMENT
LOWpyproject.toml1# Copyright (c) 2024 by FlashInfer team.COMMENT
LOWbuild_backend.py461COMMENT
LOWcsrc/fmha_v2/fused_multihead_attention.h201 int64_t softmax_stats_stride_in_bytes;COMMENT
LOW…/fmha_v2/fused_multihead_attention_kernel_4x1_hopper.h461 // Create buffer_full barriers with 1 arrive countCOMMENT
LOWcsrc/fmha_v2/fused_multihead_attention_utils.h801 int const* cu_mask_rows) {COMMENT
LOW…/fused_multihead_flash_attention_kernel_noloop_tiled.h241 float global_sum[Softmax::ROWS_PER_THREAD];COMMENT
LOWcsrc/fmha_v2/fused_multihead_attention_kernel.h21#include <fmha/smem_tile_o.h>COMMENT
LOWcsrc/fmha_v2/fused_multihead_attention_kernel.h41// - P = norm * K^T * Q , where norm is the normalization term (a scalar),COMMENT
LOW…c/fmha_v2/fused_multihead_attention_demo_bert_params.h101 // The stride between matrices of packed mask.COMMENT
LOW…c/fmha_v2/fused_multihead_attention_demo_bert_params.h181 // Paged KV uses 4D tensor, the tensor size is:COMMENT
LOWcsrc/fmha_v2/fmha/softmax.h1041 }COMMENT
LOWcsrc/fmha_v2/fmha/mask.h341 }COMMENT
LOWcsrc/fmha_v2/fmha/utils.h21#include <__clang_cuda_builtin_vars.h>COMMENT
LOWcsrc/fmha_v2/fmha/utils.h61 using Unpack_remaining = typename Unpack<Ns...>::Type;COMMENT
LOWcsrc/fmha_v2/fmha/utils.h81// (84): hereCOMMENT
LOWcsrc/fmha_v2/fmha/utils.h101struct Cond_inspect_ns {COMMENT
LOWcsrc/fmha_v2/fmha/utils.h801// asm volatile("fma.rn.f16x2.relu %0, %1, %2, %3;" : "=r"(c) : "r"(a), "r"(one),COMMENT
LOWcsrc/fmha_v2/fmha/utils.h821// return dst;COMMENT
LOWcsrc/fmha_v2/fmha/paged_kv_cache.h21struct Kv_block_array {COMMENT
LOWcsrc/fmha_v2/fmha/gmem_tile_o_packed.h1281 // The scale.COMMENT
LOWcsrc/fmha_v2/fmha/kernel_traits.h21#include <fmha/gmem_tile_qkv.h>COMMENT
LOWcsrc/fmha_v2/fmha/fragment.h141 f.reg(4 * ii + 0) = tmp.x;COMMENT
LOWcsrc/fmha_v2/fmha/smem_tile_v.h481 t[3] = y;COMMENT
LOWcsrc/fmha_v2/fmha/smem_tile_v.h601 // Jump by 8*16 rows per K but account for packing.COMMENT
LOWcsrc/fmha_v2/fmha/smem_tile_v.h921 uint2 tmp_0;COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/dma.h301 if (q_step_idx == 0 && kv_step_idx == kv_idx_start) {COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/dma.h681 // expected phase, while slow DMA warps are still waiting on the old expected phase of theCOMMENT
LOWcsrc/fmha_v2/fmha/warpspec/dma.h701//COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/compute.h581// results once. For example, STEP_KV=256, qgmma.K=32, then 256/32=8 MMAs are needs,COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/kernel_traits.h41 int Q_BUFFERS_,COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/kernel_traits.h201 // Apply the exp2f optimization (fuse bmm1_scale and -max into FMAs).COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/kernel_traits.h421 // The step size in key/value sequence dimension (N of BMM1 and K of BMM2).COMMENT
LOWcsrc/fmha_v2/fmha/hopper/arrive_wait.h21COMMENT
LOWcsrc/fmha_v2/fmha/hopper/arrive_wait.h41#endifCOMMENT
LOWcsrc/fmha_v2/fmha/hopper/smem_tile.h1801 tmp[nii][ki].w); // PRMT 2+3COMMENT
LOWcsrc/fmha_v2/fmha/hopper/smem_tile.h1821 // [g0, g1] [o0, o1] => y: [g0, h0, o0, p0], i.e. col 0COMMENT
LOWcsrc/fmha_v2/fmha/hopper/smem_tile.h2001 // [00, 01]COMMENT
LOWcsrc/fmha_v2/fmha/hopper/smem_tile.h2121 BYTES_PER_STS, 1, 0, ROWS_PER_XOR_PATTERN, 1>;COMMENT
LOWcsrc/fmha_v2/fmha/hopper/smem_tile.h2321 // w: +24 (o)COMMENT
LOWcsrc/fmha_v2/fmha/hopper/gmem_tile_o_packed.h601 int64_t row_offset =COMMENT
LOWcsrc/fmha_v2/fmha/hopper/fragment.h281 Gmma_single_desc_b::TRANS_MODE == fmha::Gmma_descriptor_transpose::TRANS ? true : false,COMMENT
LOWcsrc/fused_moe/monomoe/src/ptx_utils.h1#ifndef PTX_UTILS_HCOMMENT
LOWcsrc/fused_moe/monomoe/src/ptx_utils.h21// * Issued by a full **warpgroup** (4 consecutive warps = 128 threads).COMMENT
LOWcsrc/fused_moe/monomoe/src/ptx_utils.h181// 1. Arrival counter — decremented by `mbarrier.arrive*`.COMMENT
LOWcsrc/fused_moe/monomoe/src/ptx_utils.h321// ── Hopper TMA bulk-tensor copy (sm_90a) ──────────────────────────────────COMMENT
LOWcsrc/fused_moe/monomoe/src/ptx_utils.h341// covers every TMA issue pointing at this same barrier, beforeCOMMENT
LOWcsrc/fused_moe/monomoe/src/moe_tma.h1#ifndef MOE_TMA_HCOMMENT
LOWcsrc/fused_moe/monomoe/src/moe_tma.h21// CUDA Driver API: provides `CUtensorMap` and `cuTensorMapEncodeTiled`.COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_tma.h441// `create_down_weight_tma_desc` and `create_down_activation_tma_desc`.COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_grid_barrier.h1#pragma onceCOMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h1COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h21// pipeline / data-movement reschedules — they do not change the kernel'sCOMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h101COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h221 static constexpr uint32_t value = Dims::DOWN_SCALE_COLS;COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h261COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h321 "down-projection (one outer K-step consumes K_STEP_DOWN "COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h341 static_assert(!use_wgmma_v<Dims> || Dims::HIDDEN_STATES % K_STEP_UP == 0,COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h361 // the single-buffer `spec->down_partial_out[BS][HIDDEN_STATES]`.COMMENT
498 more matches not shown…
Deep Nesting409 hits · 355 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py175CODE
LOWtests/conftest.py221CODE
LOWtests/attention/test_trtllm_gen_sparse_mla_dsv4.py194CODE
LOWtests/attention/test_fmha_v2_prefill.py62CODE
LOWtests/attention/test_fmha_v2_prefill.py208CODE
LOWtests/attention/test_fmha_v2_prefill.py464CODE
LOWtests/attention/test_fmha_v2_prefill.py1177CODE
LOWtests/attention/test_batch_prefill_kernels.py76CODE
LOWtests/attention/test_batch_prefill_kernels.py416CODE
LOWtests/attention/test_attention_sink.py36CODE
LOWtests/attention/test_xqa.py164CODE
LOWtests/attention/test_cute_dsl_mla_decode.py758CODE
LOWtests/attention/test_rope.py1392CODE
LOWtests/attention/test_vsa_block_sparse.py264CODE
LOWtests/attention/test_vsa_block_sparse.py919CODE
LOWtests/attention/test_vsa_block_sparse.py1230CODE
LOWtests/trace/test_fi_trace_template_consistency.py191CODE
LOWtests/mamba/conftest.py720CODE
LOWtests/mamba/triton_reference/ssd_chunk_scan.py88CODE
LOW…amba/triton_reference/selective_state_update_varlen.py272CODE
LOWtests/mamba/triton_reference/ssd_chunk_state.py387CODE
LOWtests/mamba/triton_reference/selective_state_update.py81CODE
LOWtests/mamba/triton_reference/ssd_state_passing.py36CODE
LOW…s/mamba/triton_reference/checkpointing_state_update.py436CODE
LOW…s/mamba/triton_reference/checkpointing_state_update.py925CODE
LOWtests/comm/test_trtllm_alltoall.py536CODE
LOWtests/comm/test_trtllm_alltoall.py584CODE
LOWtests/comm/test_trtllm_allreduce_fusion.py27CODE
LOWtests/comm/test_trtllm_moe_alltoall.py703CODE
LOWtests/comm/test_trtllm_allreduce.py31CODE
LOWtests/comm/test_allreduce_fusion_moe_unified_api.py79CODE
LOWtests/comm/test_trtllm_moe_allreduce_fusion_finalize.py25CODE
LOWtests/comm/test_mnnvl_moe_alltoall.py124CODE
LOWtests/comm/test_mnnvl_moe_alltoall.py440CODE
LOWtests/comm/test_trtllm_mnnvl_allreduce.py793CODE
LOW…s/comm/test_trtllm_allreduce_fusion_group_fp8_quant.py297CODE
LOWtests/comm/test_mixed_comm.py46CODE
LOWtests/comm/test_mixed_comm.py204CODE
LOWtests/comm/test_trtllm_moe_allreduce_fusion.py25CODE
LOWtests/comm/test_vllm_custom_allreduce.py35CODE
LOWtests/utils/test_fp4_quantize.py808CODE
LOWtests/utils/test_gen_module_symlink_race_condition.py66CODE
LOWtests/utils/test_logging_replay.py366CODE
LOWtests/utils/test_logging_replay.py440CODE
LOWtests/utils/test_logging_replay.py514CODE
LOWtests/utils/test_logging_replay.py587CODE
LOWtests/utils/test_logging_replay.py644CODE
LOWtests/utils/test_logging_replay.py721CODE
LOWtests/utils/test_logging_replay.py825CODE
LOWtests/utils/test_logging_replay.py912CODE
LOWtests/utils/test_sampling.py773CODE
LOWtests/utils/test_sampling.py1064CODE
LOWtests/utils/test_topk.py1083CODE
LOWtests/model_optimizations/test_dsv3_fused_routing.py133CODE
LOWtests/test_helpers/sink_attention_reference.py39CODE
LOWtests/moe/test_trtllm_cutlass_fused_moe.py312CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py2480CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py3275CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py1110CODE
LOWtests/moe/test_b12x_fused_moe.py665CODE
349 more matches not shown…
Excessive Try-Catch Wrapping255 hits · 245 pts
SeverityFileLineSnippetContext
LOWbuild_backend.py131 except Exception:CODE
LOWbuild_backend.py193 except Exception:CODE
LOWbuild_backend.py208 except Exception:CODE
LOWbuild_backend.py313 except Exception:CODE
LOWbuild_backend.py390 except Exception:CODE
LOWbuild_backend.py883 except Exception as e:CODE
LOWbuild_utils.py45 except Exception:CODE
LOWtests/attention/test_deepseek_mla.py102 except Exception as e:CODE
MEDIUMtests/attention/test_deepseek_mla.py42def warmup_jit():CODE
LOW…sts/trace/test_tgv_gemm_sm100_reference_correctness.py39 except Exception as exc:CODE
LOW…sts/trace/test_mxfp8_quantize_reference_correctness.py25 except Exception as exc:CODE
LOWtests/trace/test_mm_bf16_fp4_reference_correctness.py44 except Exception as exc:CODE
LOWtests/trace/test_single_decode_reference_correctness.py31 except Exception as exc:CODE
LOW…ize_fp8_append_paged_kv_cache_reference_correctness.py69 except Exception as exc:CODE
LOWtests/trace/test_bmm_fp8_reference_correctness.py38 except Exception as exc:CODE
LOW…/trace/test_cutlass_fused_moe_reference_correctness.py62 except Exception as exc:CODE
LOW…s/trace/test_segment_gemm_run_reference_correctness.py34 except Exception as exc:CODE
LOW…s/trace/test_block_sparse_run_reference_correctness.py58 except Exception as exc:CODE
LOW…s/trace/test_xqa_batch_decode_reference_correctness.py74 except Exception as exc:CODE
LOW…sts/trace/test_mxfp4_quantize_reference_correctness.py33 except Exception as exc:CODE
LOW…ace/test_var_block_sparse_run_reference_correctness.py67 except Exception as exc:CODE
LOWtests/trace/test_bmm_bf16_reference_correctness.py29 except Exception as exc:CODE
LOWtests/trace/test_mm_bf16_reference_correctness.py29 except Exception as exc:CODE
LOWtests/trace/test_fi_trace_template_consistency.py260 except Exception as exc: # noqa: BLE001CODE
LOW…ace/test_xqa_batch_decode_mla_reference_correctness.py72 except Exception as exc:CODE
LOW…trace/test_cudnn_batch_decode_reference_correctness.py80 except Exception as exc:CODE
LOWtests/trace/example.py389except Exception:CODE
LOWtests/trace/example.py400except Exception:CODE
LOWtests/trace/example.py414except Exception:CODE
LOWtests/trace/example.py426except Exception:CODE
LOWtests/trace/example.py798except Exception:CODE
LOW…race/test_batch_attention_run_reference_correctness.py61 except Exception as exc:CODE
LOW…e/test_trtllm_fmha_v2_prefill_reference_correctness.py62 except Exception as exc:CODE
LOWtests/trace/test_concat_mla_k_reference_correctness.py30 except Exception as exc:CODE
LOW…/test_trtllm_batch_decode_mla_reference_correctness.py68 except Exception as exc:CODE
LOW…sts/trace/test_single_prefill_reference_correctness.py31 except Exception as exc:CODE
LOW…/test_multi_level_cascade_run_reference_correctness.py61 except Exception as exc:CODE
LOW…race/test_cudnn_batch_prefill_reference_correctness.py84 except Exception as exc:CODE
LOW…/test_fused_add_rmsnorm_quant_reference_correctness.py32 except Exception as exc:CODE
LOW…t_pod_with_paged_kv_cache_run_reference_correctness.py70 except Exception as exc:CODE
LOWtests/trace/test_rmsnorm_quant_reference_correctness.py27 except Exception as exc:CODE
LOW…sts/trace/test_nvfp4_quantize_reference_correctness.py26 except Exception as exc:CODE
LOWtests/trace/test_batch_pod_run_reference_correctness.py76 except Exception as exc:CODE
LOWtests/autotuner/test_autotuner_distributed.py250 except Exception as e:CODE
MEDIUMtests/autotuner/test_autotuner_configs.py888def do_search():CODE
MEDIUMtests/autotuner/test_autotuner_configs.py926def do_load():CODE
MEDIUMtests/autotuner/test_autotuner_configs.py934def do_search():CODE
MEDIUMtests/autotuner/test_autotuner_configs.py967def run_autotune():CODE
LOWtests/autotuner/test_autotuner_configs.py897 except Exception as e:CODE
LOWtests/autotuner/test_autotuner_configs.py931 except Exception as e:CODE
LOWtests/autotuner/test_autotuner_configs.py939 except Exception as e:CODE
LOWtests/autotuner/test_autotuner_configs.py973 except Exception as e:CODE
LOWtests/mamba/conftest.py748 except Exception as exc: # noqa: BLE001 — best-effort prewarmCODE
LOWtests/mamba/conftest.py781 except Exception as exc: # noqa: BLE001 — best-effort prewarmCODE
LOWtests/comm/conftest.py70 except Exception:CODE
LOWtests/comm/test_allreduce_unified_api.py260 except Exception as e:CODE
LOWtests/comm/test_nvshmem_allreduce.py59 except Exception as e:CODE
LOWtests/comm/test_trtllm_mnnvl_allreduce_custom_comm.py197 except Exception as e:CODE
MEDIUMtests/comm/test_trtllm_mnnvl_allreduce_custom_comm.py70def get_open_port() -> int:CODE
LOWtests/comm/test_dcp_alltoall.py48 except Exception:CODE
195 more matches not shown…
AI Structural Patterns250 hits · 204 pts
SeverityFileLineSnippetContext
LOWtests/attention/test_fmha_v2_prefill.py62CODE
LOWtests/attention/test_mla_decode_kernel.py177CODE
LOWtests/attention/test_mla_decode_kernel.py398CODE
LOWtests/attention/test_xqa.py120CODE
LOWtests/attention/test_trtllm_gen_attention_decode.py615CODE
LOWtests/attention/test_batch_attention.py91CODE
LOWtests/mamba/test_chunk_scan_combined.py27CODE
LOWtests/mamba/utils.py16CODE
LOW…amba/triton_reference/selective_state_update_varlen.py272CODE
LOWtests/mamba/triton_reference/selective_state_update.py431CODE
LOWtests/mamba/triton_reference/ssd_combined.py32CODE
LOWtests/mamba/triton_reference/ssd_combined.py197CODE
LOW…s/mamba/triton_reference/checkpointing_state_update.py925CODE
LOWtests/comm/test_all_gather_matmul.py45CODE
LOWtests/comm/test_mixed_comm.py43CODE
LOWtests/gemm/test_cute_dsl_gemm_allreduce_two_shot.py139CODE
LOWtests/gemm/test_groupwise_scaled_gemm_mxfp4.py73CODE
LOWtests/gdn/reference_delta_rule.py125CODE
LOWtests/test_helpers/utils_fp4.py51CODE
LOWtests/moe/test_dpsk_fused_moe_fp8.py279CODE
LOWtests/moe/test_dpsk_fused_moe_fp8.py370CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py2291CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py2439CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py3275CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py238CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py2818CODE
LOWdocs/tutorials/jax_tvm_ffi/gemma3_flashinfer_jax.py834CODE
LOWflashinfer-jit-cache/build_backend.py237CODE
LOWexamples/pytorch/wan/transformer_wan_flashinfer.py294CODE
LOWexamples/pytorch/wan/transformer_wan_flashinfer.py509CODE
LOWbenchmarks/bench_gdn_decode.py337CODE
LOWbenchmarks/bench_gdn_decode.py1046CODE
LOWbenchmarks/bench_gdn_decode.py1477CODE
LOWbenchmarks/bench_moe_deepseek.py198CODE
LOWbenchmarks/bench_moe_deepseek.py660CODE
LOWscripts/codeowner_analyzer.py22CODE
LOWflashinfer/xqa.py155CODE
LOWflashinfer/gdn_prefill.py103CODE
LOWflashinfer/tactics_blocklist_gen.py511CODE
LOWflashinfer/pod.py269CODE
LOWflashinfer/pod.py453CODE
LOWflashinfer/pod.py906CODE
LOWflashinfer/pod.py1127CODE
LOWflashinfer/kda_decode.py41CODE
LOWflashinfer/rope.py1286CODE
LOWflashinfer/rope.py1364CODE
LOWflashinfer/rope.py1504CODE
LOWflashinfer/sampling.py1579CODE
LOWflashinfer/prefill.py1130CODE
LOWflashinfer/prefill.py1158CODE
LOWflashinfer/prefill.py1186CODE
LOWflashinfer/prefill.py4061CODE
LOWflashinfer/prefill.py4082CODE
LOWflashinfer/prefill.py4102CODE
LOWflashinfer/prefill.py4478CODE
LOWflashinfer/prefill.py4940CODE
LOWflashinfer/prefill.py224CODE
LOWflashinfer/prefill.py661CODE
LOWflashinfer/prefill.py843CODE
LOWflashinfer/prefill.py1608CODE
190 more matches not shown…
Structural Annotation Overuse117 hits · 180 pts
SeverityFileLineSnippetContext
LOWtests/attention/test_rope.py863 # Step 1: Pre-populate cache with existing tokensCOMMENT
LOWtests/attention/test_rope.py1074 # Step 2: Append new tokens to the pre-populated cacheCOMMENT
LOW…_quantize_fp8_append_paged_kv_cache_h8_kv2_rope64.json194 "reference": "from __future__ import annotations\nimport math\nimport torch\nimport torch.nn.functional as F\n\n@torchCODE
LOW…tize_fp8_append_paged_kv_cache_h8_kv2_rope64_ps16.json195 "reference": "from __future__ import annotations\nimport math\nimport torch\nimport torch.nn.functional as F\n\n@torchCODE
LOWtests/utils/test_fp4_quantize.py309 # Step 1: Quantize with fp4_quantizeCOMMENT
LOWtests/utils/test_fp4_quantize.py319 # Step 2: Dequantize with e2m1_and_ufp8sf_scale_to_floatCOMMENT
LOWtests/utils/test_fp4_quantize.py334 # Step 3: Compare resultsCOMMENT
LOWtests/gdn/reference_delta_rule.py1081 # Step 1: Compute g = -exp(A_log) * softplus(a + dt_bias)COMMENT
LOWtests/gdn/reference_delta_rule.py1136 # Step 1: Apply gating to hidden state: h *= exp(g)COMMENT
LOWtests/gdn/reference_delta_rule.py1139 # Step 2: Delta rule: v -= k^T @ h ([B,H,K] x [B,H,K,V] -> [B,H,V])COMMENT
LOWtests/gdn/reference_delta_rule.py1142 # Step 3: Apply beta gating: v *= betaCOMMENT
LOWtests/gdn/reference_delta_rule.py1145 # Step 4: Update hidden state with outer product: h += k ⊗ v_newCOMMENT
LOWtests/gdn/reference_delta_rule.py1148 # Step 5: Compute output: o = q^T @ hCOMMENT
LOWtests/gdn/reference_delta_rule.py1098 # Step 2: Compute beta = sigmoid(b)COMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md53### Step 1: Choose Your Test RoutineCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md60### Step 2: Run a Single BenchmarkCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md108### Step 3: Understand the OutputCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md124### Step 4: Run Batch BenchmarksCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md146### Step 5: Common FlagsCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md164### Step 1: Write Your Benchmark ScriptCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md200### Step 2: Run Your BenchmarkCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md219### Step 3: Advanced OptionsCOMMENT
LOW.claude/skills/debug-cuda-crash/SKILL.md24## Step 1: Enable API LoggingCOMMENT
LOW.claude/skills/debug-cuda-crash/SKILL.md109## Step 2: Reproduce the CrashCOMMENT
LOW.claude/skills/debug-cuda-crash/SKILL.md146## Step 3: Common CUDA Errors and How to DebugCOMMENT
LOW.claude/skills/debug-cuda-crash/SKILL.md249## Step 4: Multi-Process DebuggingCOMMENT
LOW.claude/skills/debug-cuda-crash/SKILL.md268## Step 5: Advanced Debugging with compute-sanitizerCOMMENT
LOW.claude/skills/debug-cuda-crash/SKILL.md309## Step 6: Kernel-Level Debugging with printf()COMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md18## Step 1: Define CUDA Kernel in `include/`COMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md76## Step 2: Create Launcher in `csrc/`COMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md163## Step 3: Create TVM-FFI Binding in `csrc/`COMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md183## Step 4: Create JIT Generator (No Jinja for Simple Case)COMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md387## Step 5: Create Python API in `flashinfer/`COMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md628## Step 6: Add a Trace TemplateCOMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md776## Step 7: Write Tests in `tests/`COMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md846## Step 7: Register in AOTCOMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md872## Step 8: Export APICOMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md883## Step 9: Run and TestCOMMENT
LOW.claude/skills/add-cuda-kernel/SKILL.md893## Step 10: Add BenchmarkCOMMENT
LOWdocs/tutorials/jax_tvm_ffi/flashinfer_jax_tvm_ffi.py176# Step 1 - Compile and load the TVM FFI moduleCOMMENT
LOWdocs/tutorials/jax_tvm_ffi/flashinfer_jax_tvm_ffi.py197# Step 2 - Register as a JAX FFI targetCOMMENT
LOWdocs/tutorials/jax_tvm_ffi/flashinfer_jax_tvm_ffi.py240# Step 3 - Call as a regular JAX expressionCOMMENT
LOWbenchmarks/bench_cute_dsl_add_rmsnorm_fp4quant.py149 # Step 1: AddCOMMENT
LOWbenchmarks/bench_cute_dsl_add_rmsnorm_fp4quant.py151 # Step 2: RMSNormCOMMENT
LOWbenchmarks/bench_cute_dsl_add_rmsnorm_fp4quant.py153 # Step 3: FP4 quantize (with global_scale for NVFP4)COMMENT
LOWbenchmarks/gdn_triton_reference.py179 # Step 1: Apply decay to hidden state: h *= exp(g)COMMENT
LOWbenchmarks/gdn_triton_reference.py182 # Step 2: Delta rule: v -= sum(h * k, dim=0) = k @ hCOMMENT
LOWbenchmarks/gdn_triton_reference.py187 # Step 3: Apply beta gating: v *= betaCOMMENT
LOWbenchmarks/gdn_triton_reference.py190 # Step 4: Update hidden state: h += outer(k, v) = k[:, None] * v[None, :]COMMENT
LOWbenchmarks/gdn_triton_reference.py193 # Step 5: Compute output: o = q @ h = sum(q[:, None] * h, dim=0)COMMENT
LOWbenchmarks/gdn_triton_reference.py361 # Step 1: Apply decay: h *= exp(g)COMMENT
LOWbenchmarks/gdn_triton_reference.py364 # Step 2: Delta rule: v -= h @ k (h is [BV, BK], k is [BK])COMMENT
LOWbenchmarks/gdn_triton_reference.py369 # Step 3: Apply beta gatingCOMMENT
LOWbenchmarks/gdn_triton_reference.py372 # Step 4: Update state: h += outer(v, k) = v[:, None] * k[None, :]COMMENT
LOWbenchmarks/gdn_triton_reference.py376 # Step 5: Compute output: o = h @ q = sum(h * q[None, :], axis=1) -> [BV]COMMENT
LOWbenchmarks/gdn_triton_reference.py633 # Step 1: Apply decay to hidden state: h *= exp(g)COMMENT
LOWbenchmarks/gdn_triton_reference.py636 # Step 2: Delta rule: v -= h @ k = sum(h * k[None, :], axis=1)COMMENT
LOWbenchmarks/gdn_triton_reference.py640 # Step 3: Apply beta gating: v *= betaCOMMENT
LOWbenchmarks/gdn_triton_reference.py643 # Step 4: Update hidden state: h += outer(v, k) = v[:, None] * k[None, :]COMMENT
LOWbenchmarks/gdn_triton_reference.py646 # Step 5: Compute output: o = h @ q = sum(h * q[None, :], axis=1)COMMENT
57 more matches not shown…
Self-Referential Comments55 hits · 147 pts
SeverityFileLineSnippetContext
MEDIUMtests/conftest.py234 # Create a dict with module info for reportingCOMMENT
MEDIUMtests/attention/test_attention_sink.py287 # Create a fragmented page allocation patternCOMMENT
MEDIUMtests/attention/test_trtllm_gen_attention_decode.py1562 # Create a larger tensor with 2*D in the last dimensionCOMMENT
MEDIUMtests/trace/test_fi_trace.py576 # Create a dummy instance — we don't call run(), only fi_trace()COMMENT
MEDIUMtests/autotuner/test_autotuner_configs.py725 # Create a cache file with a known configCOMMENT
MEDIUMtests/autotuner/test_autotuner_configs.py916 # Create a cache fileCOMMENT
MEDIUMtests/mamba/utils.py266 # Create a simple linear chain structure by defaultCOMMENT
MEDIUMtests/comm/test_trtllm_alltoall.py114 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_trtllm_alltoall.py177 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_trtllm_moe_alltoall.py265 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_trtllm_moe_alltoall.py506 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_trtllm_moe_alltoall.py745 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_mnnvl_memory.py135 # Create a random input tensorCOMMENT
MEDIUMtests/utils/test_fp4_quantize.py247 # Create a test scale factors tensor with uint8 dtypeCOMMENT
MEDIUMtests/utils/test_fp4_quantize.py297 # Create a reasonable test tensorCOMMENT
MEDIUMtests/utils/test_logging.py400 # Create a tensor with specific propertiesCOMMENT
MEDIUMtests/utils/test_logging_replay.py1016 # Create a mock dump with safetensors filesCOMMENT
MEDIUMtests/utils/test_norm.py719 # Create a JIT spec for norm module without ENABLE_FP8 flagCOMMENT
MEDIUMtests/utils/test_load_cubin_compile_race_condition.py40 # Define the target file - same for all processesCOMMENT
MEDIUMtests/utils/test_load_cubin_compile_race_condition.py75 # Create a temporary directory for FLASHINFER_CUBIN_DIRCOMMENT
MEDIUMtests/cli/test_cli_cmds.py139 # Create a temporary JIT directory with some dummy cache filesCOMMENT
MEDIUMtests/cli/test_cli_cmds.py182 # Create a temporary cubin directory with some dummy cubin filesCOMMENT
MEDIUMtests/test_helpers/rope_reference.py113# The following code is from the vLLM's implementation of RoPE.COMMENT
MEDIUMtests/moe/test_dpsk_fused_moe_fp8.py596 # Create a mock MoE implementation for skip_checksCOMMENT
MEDIUMdocs/tutorials/jax_tvm_ffi/flashinfer_jax_tvm_ffi.py1# This file is the canonical Sphinx-Gallery source for the tutorial.COMMENT
MEDIUMdocs/tutorials/jax_tvm_ffi/gemma3_flashinfer_jax.py1# This file is the canonical Sphinx-Gallery source for the tutorial.COMMENT
MEDIUMexamples/pytorch/wan/transformer_wan_flashinfer.py4# This file is adapted from the diffusers WanTransformer3DModel implementation:COMMENT
MEDIUMscripts/task_test_multi_gpu_comm_kernels.sh22# Define the specific test files for multi-GPU comm tests (single-node)COMMENT
MEDIUMscripts/task_test_multi_node_comm_kernels.sh25# Define the specific test files for multi-node comm testsCOMMENT
MEDIUMscripts/test_utils.sh3# This file is meant to be sourced by test runner scriptsCOMMENT
MEDIUMscripts/test_utils.sh975 # Create a bash array with the node IDsCOMMENT
MEDIUMscripts/test_utils.sh1145 # Create a temporary directory for parallel job stateCOMMENT
MEDIUMscripts/test_utils.sh1160 # Create a results file for each testCOMMENT
MEDIUM…/cutedsl_backend_kernels/moe_nvfp4_swapab/moe_utils.py219 # Create a new cute.Pointer with generic address space, preserving alignmentCOMMENT
MEDIUM…/cutedsl_backend_kernels/moe_nvfp4_swapab/moe_utils.py247 # Create a new cute.Pointer with gmem address space, preserving alignmentCOMMENT
MEDIUMflashinfer/comm/dlpack_utils.py224 # Create a new capsule each timeSTRING
MEDIUMflashinfer/fused_moe/core.py152 # Create a unique cache key (weight_type, weight_shape)COMMENT
MEDIUMflashinfer/fused_moe/core.py184 # Create a unique cache key (weight_type, weight_shape)COMMENT
MEDIUMflashinfer/fused_moe/core.py221 # Create the outputCOMMENT
MEDIUM…hinfer/fused_moe/cute_dsl/blackwell/custom_pipeline.py44# This file is copied and modified from https://github.com/NVIDIA/cutlass/tree/main/python/CuTeDSL/cutlass/pipelineCOMMENT
MEDIUMflashinfer/fused_moe/cute_dsl/blackwell/utils.py44# This file is copied and modified from cutlass https://github.com/NVIDIA/cutlass/blob/main/python/CuTeDSL/cutlass/cute/COMMENT
MEDIUMflashinfer/fused_moe/cute_dsl/blackwell/utils.py174 # Create a numpy arraySTRING
MEDIUM…blockscaled_contiguous_grouped_gemm_finalize_fusion.py315 """This class implements batched matrix multiplication (C = A x SFA x B x SFB) with support for various data typesSTRING
MEDIUM…ockscaled_contiguous_gather_grouped_gemm_act_fusion.py322 """This class implements contiguous grouped matrix multiplication with gather operation and SwiGLU fusionSTRING
MEDIUMflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py29# This file is ported from CUTLASS's sm103_dense_blockscaled_gemm_persistent.pyCOMMENT
MEDIUMflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py50 """This class implements batched matrix multiplication (C = A x SFA x B x SFB) with support for FP4 data typesSTRING
MEDIUM…ashinfer/gemm/kernels/grouped_gemm_masked_blackwell.py586 """This class implements batched matrix multiplication (C = A x SFA x B x SFB) with support for various data typesSTRING
MEDIUM…nfer/gemm/kernels/dense_blockscaled_gemm_sm120_b12x.py29# This file is ported from the CUTLASS dense block-scaled GEMM exampleCOMMENT
MEDIUMflashinfer/gemm/kernels/dense_blockscaled_gemm_sm100.py29# This file is ported from TensorRT-LLM's dense_blockscaled_gemm_persistent.pyCOMMENT
MEDIUMflashinfer/cute_dsl/gemm_allreduce_two_shot.py217 """This class implements batched matrix multiplication (C = A x B) with support for various data typesSTRING
MEDIUMflashinfer/cute_dsl/utils.py330 # Create a numpy arraySTRING
MEDIUMflashinfer/jit/cubin_loader.py311 # Define the correct callback typeCOMMENT
MEDIUMflashinfer/jit/cubin_loader.py321 # Create the callback and keep a reference to prevent GCCOMMENT
MEDIUMflashinfer/jit/gemm/cutlass/cutlass_library.py40# The following block implements enum.auto() for Python 3.5 variants that don't include it suchCOMMENT
MEDIUMflashinfer/logits_processor/processors.py42 >>> # Create a pipeline that legalizes to a fused op.STRING
Verbosity Indicators94 hits · 147 pts
SeverityFileLineSnippetContext
LOW…mha_v2/fused_multihead_flash_attention_kernel_noloop.h286 // Do we need to check if there are negative inf for softmax row_max ?COMMENT
LOW…/fused_multihead_flash_attention_kernel_noloop_tiled.h92 // Do we need to check if there are negative inf for softmax row_max ?COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/epilogue.h73 // Whether we need to check if local_max could be -inf or not.COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/epilogue.h543 // Whether we need to check if local_max could be -inf or not.COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/epilogue.h734 // Whether we need to check if local_max could be -inf or not.COMMENT
LOWtests/attention/test_rope.py863 # Step 1: Pre-populate cache with existing tokensCOMMENT
LOWtests/attention/test_rope.py1074 # Step 2: Append new tokens to the pre-populated cacheCOMMENT
LOW…_quantize_fp8_append_paged_kv_cache_h8_kv2_rope64.json194 "reference": "from __future__ import annotations\nimport math\nimport torch\nimport torch.nn.functional as F\n\n@torchCODE
LOW…tize_fp8_append_paged_kv_cache_h8_kv2_rope64_ps16.json195 "reference": "from __future__ import annotations\nimport math\nimport torch\nimport torch.nn.functional as F\n\n@torchCODE
LOWtests/utils/test_fp4_quantize.py309 # Step 1: Quantize with fp4_quantizeCOMMENT
LOWtests/utils/test_fp4_quantize.py319 # Step 2: Dequantize with e2m1_and_ufp8sf_scale_to_floatCOMMENT
LOWtests/utils/test_fp4_quantize.py334 # Step 3: Compare resultsCOMMENT
LOWtests/gdn/reference_delta_rule.py1081 # Step 1: Compute g = -exp(A_log) * softplus(a + dt_bias)COMMENT
LOWtests/gdn/reference_delta_rule.py1136 # Step 1: Apply gating to hidden state: h *= exp(g)COMMENT
LOWtests/gdn/reference_delta_rule.py1139 # Step 2: Delta rule: v -= k^T @ h ([B,H,K] x [B,H,K,V] -> [B,H,V])COMMENT
LOWtests/gdn/reference_delta_rule.py1142 # Step 3: Apply beta gating: v *= betaCOMMENT
LOWtests/gdn/reference_delta_rule.py1145 # Step 4: Update hidden state with outer product: h += k ⊗ v_newCOMMENT
LOWtests/gdn/reference_delta_rule.py1148 # Step 5: Compute output: o = q^T @ hCOMMENT
LOWtests/gdn/reference_delta_rule.py1098 # Step 2: Compute beta = sigmoid(b)COMMENT
LOWbenchmarks/bench_cute_dsl_add_rmsnorm_fp4quant.py149 # Step 1: AddCOMMENT
LOWbenchmarks/bench_cute_dsl_add_rmsnorm_fp4quant.py151 # Step 2: RMSNormCOMMENT
LOWbenchmarks/bench_cute_dsl_add_rmsnorm_fp4quant.py153 # Step 3: FP4 quantize (with global_scale for NVFP4)COMMENT
LOWbenchmarks/gdn_triton_reference.py179 # Step 1: Apply decay to hidden state: h *= exp(g)COMMENT
LOWbenchmarks/gdn_triton_reference.py182 # Step 2: Delta rule: v -= sum(h * k, dim=0) = k @ hCOMMENT
LOWbenchmarks/gdn_triton_reference.py187 # Step 3: Apply beta gating: v *= betaCOMMENT
LOWbenchmarks/gdn_triton_reference.py190 # Step 4: Update hidden state: h += outer(k, v) = k[:, None] * v[None, :]COMMENT
LOWbenchmarks/gdn_triton_reference.py193 # Step 5: Compute output: o = q @ h = sum(q[:, None] * h, dim=0)COMMENT
LOWbenchmarks/gdn_triton_reference.py361 # Step 1: Apply decay: h *= exp(g)COMMENT
LOWbenchmarks/gdn_triton_reference.py364 # Step 2: Delta rule: v -= h @ k (h is [BV, BK], k is [BK])COMMENT
LOWbenchmarks/gdn_triton_reference.py369 # Step 3: Apply beta gatingCOMMENT
LOWbenchmarks/gdn_triton_reference.py372 # Step 4: Update state: h += outer(v, k) = v[:, None] * k[None, :]COMMENT
LOWbenchmarks/gdn_triton_reference.py376 # Step 5: Compute output: o = h @ q = sum(h * q[None, :], axis=1) -> [BV]COMMENT
LOWbenchmarks/gdn_triton_reference.py633 # Step 1: Apply decay to hidden state: h *= exp(g)COMMENT
LOWbenchmarks/gdn_triton_reference.py636 # Step 2: Delta rule: v -= h @ k = sum(h * k[None, :], axis=1)COMMENT
LOWbenchmarks/gdn_triton_reference.py640 # Step 3: Apply beta gating: v *= betaCOMMENT
LOWbenchmarks/gdn_triton_reference.py643 # Step 4: Update hidden state: h += outer(v, k) = v[:, None] * k[None, :]COMMENT
LOWbenchmarks/gdn_triton_reference.py646 # Step 5: Compute output: o = h @ q = sum(h * q[None, :], axis=1)COMMENT
LOWbenchmarks/bench_cute_dsl_rmsnorm_fp4quant.py157 # Step 1: RMSNormCOMMENT
LOWbenchmarks/bench_cute_dsl_rmsnorm_fp4quant.py159 # Step 2: FP4 quantize (with global_scale for NVFP4)COMMENT
LOWbenchmarks/routines/norm.py1120 # Step 2: RMSNorm on residualCOMMENT
LOWflashinfer/trace/templates/rope.py1018 # Step 3: append into paged cache (GQA/MHA) — materialize the quantizedCOMMENT
LOW…l/cutedsl_backend_kernels/moe_nvfp4_swapab/epilogue.py889 # Step 1: absmax over the weighted regs.COMMENT
LOW…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py1062 # Step 0: load tmemCOMMENT
LOW…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py1116 # Step 1: perform swiglu on the first part, interleave with the second's 32x32 tmem transpose.COMMENT
LOW…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py1148 # Step 2: QuantCOMMENT
LOW…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py1159 # Step 3: TMASTGCOMMENT
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py911 # Step 1: deterministic input + weight generationCOMMENT
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py1265 # Step 2: referenceCOMMENT
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py1297 # Step 3: workspace allocationCOMMENT
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py1338 # Step 4: kernel launchCOMMENT
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py1910 # Step 5: validationCOMMENT
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/kernel_fc12.py1884 # Step 1: coarse-grain spin on ``fc1_done_counter[slot]``COMMENT
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/kernel_fc12.py1979 # Step 3: K-loop with 2x cute.copy per tile (B +COMMENT
LOW…l/cutedsl_backend_kernels/moe_mxfp8_glu/mega_runner.py221 # Step 1: deterministic input + weight generation (MXFP8)COMMENT
LOW…l/cutedsl_backend_kernels/moe_mxfp8_glu/mega_runner.py403 # Step 2: reference (MXFP8)COMMENT
LOW…l/cutedsl_backend_kernels/moe_mxfp8_glu/mega_runner.py430 # Step 5: validation (MXFP8)COMMENT
LOW…l/cutedsl_backend_kernels/moe_mxfp8_glu/mega_runner.py470 # Step 4: kernel launch (MXFP8)COMMENT
LOWflashinfer/gdn_kernels/gdn_decode_pretranspose.py278 # Step 1: Wait for current stage to completeCOMMENT
LOWflashinfer/gdn_kernels/gdn_decode_pretranspose.py282 # Step 2: Issue async load for next tile (after compute)COMMENT
LOWflashinfer/gdn_kernels/gdn_decode_pretranspose.py589 # Step 1: Wait for current stage to completeCOMMENT
34 more matches not shown…
Modern Structural Boilerplate137 hits · 130 pts
SeverityFileLineSnippetContext
LOWflashinfer-cubin/flashinfer_cubin/__init__.py80__all__ = ["get_cubin_dir", "list_cubins", "get_cubin_path", "CUBIN_DIR"]CODE
LOWtests/comm/test_nvshmem_allreduce.py12logger = logging.getLogger(__name__)CODE
LOWtests/comm/test_vllm_custom_allreduce.py18logger = logging.getLogger(__name__)CODE
LOWtests/gemm/test_cute_dsl_gemm_allreduce_two_shot.py36logger = logging.getLogger(__name__)CODE
LOWflashinfer-jit-cache/flashinfer_jit_cache/__init__.py38__all__ = [CODE
LOWexamples/pytorch/wan/transformer_wan_flashinfer.py60logger = logging.getLogger(__name__)CODE
LOWscripts/aot_memory_monitor.py265def update_stats(stats: MemoryStats, sample: dict[str, int]) -> None:CODE
LOWflashinfer/fp8_quantization.py20__all__ = [CODE
LOWflashinfer/compilation_context.py24logger = logging.getLogger(__name__)CODE
LOWflashinfer/utils.py736def set_log_level(lvl_str: str) -> None:CODE
LOWflashinfer/fp4_quantization.py43__all__ = [CODE
LOWflashinfer/artifacts.py289 def update_pbar_cb(_) -> None:CODE
LOWflashinfer/deep_gemm.py45logger = logging.getLogger(__name__)CODE
LOWflashinfer/attention/__init__.py20__all__ = [CODE
LOWflashinfer/trace/solution.py278__all__ = [CODE
LOWflashinfer/trace/__init__.py42__all__ = [CODE
LOWflashinfer/trace/templates/_init_helpers.py258__all__ = [CODE
LOWflashinfer/moe_ep/__init__.py103__all__ = [CODE
LOWflashinfer/moe_ep/layer.py16__all__ = ["MoEEpLayer", "MoEEpMegaLayer", "MoEEpSplitLayer"]CODE
LOWflashinfer/moe_ep/core/__init__.py13__all__ = [CODE
LOWflashinfer/moe_ep/core/bootstrap_utils.py48__all__ = [CODE
LOWflashinfer/moe_ep/core/runtime/bootstrap.py258__all__ = [CODE
LOWflashinfer/moe_ep/core/runtime/__init__.py15__all__ = [CODE
LOWflashinfer/moe_ep/core/comm/__init__.py6__all__ = ["Fleet", "Handle", "create_fleet"]CODE
LOWflashinfer/moe_ep/core/kernel/__init__.py13__all__ = [CODE
LOWflashinfer/moe_ep/core/validation/__init__.py18__all__ = [CODE
LOWflashinfer/moe_ep/modes/config.py10__all__ = [CODE
LOWflashinfer/moe_ep/modes/__init__.py11__all__ = [CODE
LOWflashinfer/moe_ep/backends/__init__.py5__all__ = ["mega", "split"]CODE
LOWflashinfer/moe_ep/backends/split/__init__.py6__all__ = [CODE
LOWflashinfer/moe_ep/backends/split/comm/__init__.py8__all__ = ["NCCLEPConfig", "NcclEpConfig", "NvepConfig"]CODE
LOWflashinfer/moe_ep/backends/split/comm/nccl_ep/fleet.py39logger = logging.getLogger(__name__)CODE
LOWflashinfer/moe_ep/backends/split/kernel/__init__.py5__all__ = ["fused_moe", "identity"]CODE
LOW…nfer/moe_ep/backends/split/kernel/identity/__init__.py4__all__ = ["IdentityConfig", "IdentitySplitKernelBackend"]CODE
LOW…fer/moe_ep/backends/split/kernel/fused_moe/__init__.py4__all__ = ["FusedMoeKernelConfig", "FusedMoeSplitKernelBackend"]CODE
LOWflashinfer/moe_ep/backends/mega/__init__.py5__all__ = ["kernel"]CODE
LOWflashinfer/moe_ep/backends/mega/kernel/__init__.py5__all__ = ["deep_gemm_mega", "mxfp8_cutedsl", "nvfp4_cutedsl"]CODE
LOW…infer/moe_ep/backends/mega/kernel/weight_validation.py91__all__ = ["check_transformed_mega_weights_structure", "check_transformed_weight_pair"]CODE
LOW…moe_ep/backends/mega/kernel/deep_gemm_mega/__init__.py5__all__ = [CODE
LOW…/moe_ep/backends/mega/kernel/deep_gemm_mega/weights.py159__all__ = [CODE
LOW…/moe_ep/backends/mega/kernel/deep_gemm_mega/staging.py38__all__ = ["stage_mega_moe_inputs"]CODE
LOW…/moe_ep/backends/mega/kernel/mxfp8_cutedsl/__init__.py5__all__ = [CODE
LOW…r/moe_ep/backends/mega/kernel/mxfp8_cutedsl/weights.py350__all__ = [CODE
LOW…ckends/mega/kernel/cutedsl_backend_kernels/__init__.py11__all__ = ["bootstrap_paths"]CODE
LOW…ga/kernel/cutedsl_backend_kernels/frontend/__init__.py50__all__ = [CODE
LOW…backend_kernels/frontend/megamoe_frontend/api_mxfp8.py173 def set_gate_up_clamp(self, clamp: Optional[float]) -> None:CODE
LOW…_backend_kernels/frontend/megamoe_frontend/__init__.py24__all__ = [CODE
LOW…tedsl_backend_kernels/frontend/megamoe_frontend/api.py23__all__ = [CODE
LOW…backend_kernels/frontend/megamoe_frontend/api_nvfp4.py231 def set_gate_up_clamp(self, clamp: Optional[float]) -> None:CODE
LOW…dsl_backend_kernels/moe_nvfp4_swapab/mega_reference.py2613__all__ = ["MegaMoEReference", "compute_megamoe_reference", "Nvfp4BlockSize"]CODE
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py869 def set_torch_profiler_enabled(self, enabled: bool) -> None:CODE
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py873 def set_perf_iters(self, warmup: int, iters: int) -> None:CODE
LOW…utedsl_backend_kernels/moe_nvfp4_swapab/kernel_fc12.py270 def _setup_attributes(self) -> None:CODE
LOW…backend_kernels/moe_mxfp8_glu/kernel_mxfp8_glu_fc12.py293 def _setup_attributes(self) -> None:CODE
LOW…_backend_kernels/moe_mxfp8_glu/mega_reference_mxfp8.py180__all__ = ["compute_megamoe_reference_mxfp8", "Mxfp8BlockSize"]CODE
LOW…/moe_ep/backends/mega/kernel/nvfp4_cutedsl/__init__.py5__all__ = [CODE
LOW…r/moe_ep/backends/mega/kernel/nvfp4_cutedsl/weights.py314__all__ = [CODE
LOW…ashinfer/gdn_kernels/gdn_decode_bf16_wy_output_only.py2255__all__ = ["gated_delta_rule_mtp", "GdnDecodeKernel", "K_DIM", "V_DIM_C"]CODE
LOWflashinfer/gdn_kernels/__init__.py91__all__ = [CODE
LOWflashinfer/gdn_kernels/blackwell/__init__.py13__all__ = [CODE
77 more matches not shown…
Cross-Language Confusion23 hits · 102 pts
SeverityFileLineSnippetContext
HIGHtests/comm/test_trtllm_allreduce_reduction.py43 TORCH_CHECK(num_threads > 0 && num_threads <= 1024, "invalid block size");CODE
HIGHtests/comm/test_trtllm_mnnvl_allreduce.py306 ordinary data; a `val == 0.F && signbit(val)` check would FTZ-flushSTRING
HIGHtests/utils/test_jit_example.py193 if (qo_idx < qo_len && kv_idx < kv_len) {CODE
HIGHbenchmarks/bench_monomoe.py86 Uses mono_moe's `[gate || up]` fc1 half-ordering and the given (alreadySTRING
HIGHbenchmarks/routines/attention.py2790 # Leave empty (null) when not explicitly overridden so legacyCOMMENT
HIGHflashinfer/trace/templates/moe.py2516 description="Up/gate projection weights (FP8, [gate || up] rows).",CODE
HIGHflashinfer/trace/templates/moe.py2367 up-projection weights use the [gate || up] half ordering (monomoe'sSTRING
HIGH…tedsl_backend_kernels/frontend/megamoe_frontend/run.py11 cd cutedsl_megamoe/front_end && pip install -e .STRING
HIGH…backend_kernels/moe_mxfp8_glu/kernel_mxfp8_glu_fc12.py107 f"Expected one of: {[t.__name__ for t in valid_ab_tuple]}." # type: ignore[name-defined] # noqa: FCODE
HIGH…/mega/kernel/cutedsl_backend_kernels/src/flag_batch.py21 flag_addr: Int64 # per-lane counter-slot address (0 == null)CODE
HIGH…ashinfer/gdn_kernels/gdn_decode_bf16_wy_output_only.py1028 # _v7e_a/b regs are undefined), so they must keep log_alpha=beta=0. The causalCOMMENT
HIGHflashinfer/fused_moe/monomoe.py23 N (== N_half) = 512 (up-projection produces 2*N = 1024 rows: gate || up)STRING
HIGHflashinfer/fused_moe/cute_dsl/moe_utils.py359 ``!enable_alltoall || ep_size <= top_k`` branch). FunctionallySTRING
HIGHflashinfer/mla/_core.py3180 Accepts the concatenated ``(q_nope || q_rope)`` query and ``(ckv || kpe)`` paged KVCODE
HIGHflashinfer/jit/attention/variants.py39 float log_sink = (kv_tile_idx == 0 && qo_head_idx < params.num_qo_heads) ? params.sink[qo_head_idx] * math::log2e : CODE
HIGHflashinfer/jit/attention/fmha_v2/utils.py543 code = "if (!{has_noloop} || (!force_unroll && (ignore_b1opt || b > {unroll_threshold})))".format(STRING
HIGHflashinfer/jit/attention/fmha_v2/utils.py547 code = "if (!{has_noloop} || (!force_unroll && (ignore_b1opt || b * h > {unroll_threshold})))".format(STRING
HIGHflashinfer/jit/attention/fmha_v2/generator_utils.py1520 USE_TMA_STORE && false,CODE
HIGHflashinfer/jit/attention/fmha_v2/generator_utils.py1541 USE_TMA_STORE && false,CODE
HIGHflashinfer/jit/attention/fmha_v2/generator_utils.py2401 code = "if (!{has_noloop} || (!force_unroll && (ignore_b1opt || b > {unroll_threshold})))".format(CODE
HIGHflashinfer/jit/attention/fmha_v2/generator_utils.py2405 code = "if (!{has_noloop} || (!force_unroll && (ignore_b1opt || b * h > {unroll_threshold})))".format(CODE
HIGHflashinfer/jit/attention/fmha_v2/fmha_library.py761 code = "if (!{has_noloop} || (!force_unroll && (ignore_b1opt || b > {unroll_threshold})))".format(CODE
HIGHflashinfer/jit/attention/fmha_v2/fmha_library.py765 code = "if (!{has_noloop} || (!force_unroll && (ignore_b1opt || b * h > {unroll_threshold})))".format(CODE
Redundant / Tautological Comments58 hits · 87 pts
SeverityFileLineSnippetContext
LOWbuild_backend.py933 # Check if we're in a git repositoryCOMMENT
LOWflashinfer-cubin/build_backend.py75 # Check if we're in a git repositoryCOMMENT
LOWtests/attention/test_attention_sink.py918 # Check if any request has qo_len > kv_len for causal caseCOMMENT
LOW…s/comm/test_trtllm_allreduce_fusion_group_fp8_quant.py218 # Check if current workspace is large enough; recreate if notCOMMENT
LOWtests/utils/test_fp8_quantize.py651 # Check if the bits of paddings are zero.COMMENT
LOWtests/utils/test_load_cubin_compile_race_condition.py44 # Read the file from FLASHINFER_CUBIN_DIRCOMMENT
LOWtests/model_optimizations/test_dsv3_fused_routing.py274 # Check if kernel's selection matches expected experts (exact or tied)COMMENT
LOWtests/test_helpers/sink_attention_reference.py95 # Check if variable length mode is indicated by presence of indptrCOMMENT
LOWflashinfer-jit-cache/build_backend.py57 # Check if we're in a git repositoryCOMMENT
LOWbenchmarks/bench_tgv_gemm.py184 # Check if results are close enoughCOMMENT
LOWbenchmarks/bench_logging_overhead.py224 # Check if CUDA is availableCOMMENT
LOWbenchmarks/bench_dcp_alltoall.py297 # Print results (rank 0 only)COMMENT
LOWscripts/xfails_tracker.py52 # Check if this is a test function (starts with "test_" or has @pytest marks)COMMENT
LOWscripts/xfails_tracker.py70 # Check if this is a pytest.param callCOMMENT
LOWscripts/xfails_tracker.py77 # Check if this is a runtime pytest.xfail() callCOMMENT
LOWscripts/test_utils.sh1625 # Check if parallel execution is enabledCOMMENT
LOWscripts/codeowner_analyzer.py89 # Check if gh CLI is availableCOMMENT
LOWscripts/codeowner_analyzer.py114 # Check if it's already in our cacheCOMMENT
LOWscripts/codeowner_analyzer.py220 # Check if username is in allowed list (case-insensitive)COMMENT
LOWscripts/codeowner_analyzer.py290 # Check if it's a relevant code fileCOMMENT
LOWscripts/codeowner_analyzer.py420 # Check if contributor is in allowed users listCOMMENT
LOWscripts/codeowner_analyzer.py629 # Write file-level overrides LAST (CODEOWNERS uses last-match-wins)COMMENT
LOWscripts/task_run_unit_tests.sh64 # Check if this file's directory should be excludedCOMMENT
LOW.github/workflows/update-xfails-report.yml43 # Check if xfails report file is new (unstaged) or has changesCOMMENT
LOW.github/workflows/update-codeowners.yml50 # Check if CODEOWNERS file is new (unstaged) or has changesCOMMENT
LOW.github/workflows/pr-test.yml80 # Check if PR has run-ci labelCOMMENT
LOW.github/workflows/pr-test.yml87 # Check if PR author is a member of ci-users teamCOMMENT
LOW.github/workflows/issue-claim.yml86 # Check if issue already has assigneesCOMMENT
LOW.github/workflows/issue-claim.yml301 # Check if user is now a collaborator (accepted invitation)COMMENT
LOWflashinfer/api_logging.py2083 # Check if this parameter was providedCOMMENT
LOWflashinfer/utils.py300 # Check if it's a CUDA deviceCOMMENT
LOWflashinfer/prefill.py523 # Check if FP8 by presence of scale tensorsCOMMENT
LOWflashinfer/__main__.py460 # Check if this is a single dump or a session / sequence rootCOMMENT
LOWflashinfer/cuda_utils.py20 # Check if cuda.cudart module is available and import accordinglyCOMMENT
LOWflashinfer/autotuner/autotuner.py1582 # Set time_measured to inf to notify the failure of the tactic. This can happen whenCOMMENT
LOWflashinfer/triton/sm_constraint_gemm.py66 # Set num_sms to be 100% of the available SMsCOMMENT
LOWflashinfer/comm/mnnvl.py988 # Check if cuda.cudart is available and import accordinglyCOMMENT
LOWflashinfer/comm/mnnvl.py1025 # Check if device supports multicastingCOMMENT
LOW…ockscaled_contiguous_gather_grouped_gemm_act_fusion.py510 # Check if we're doing FP4 quantizationCOMMENT
LOW…hinfer/fused_moe/cute_dsl/blackwell/custom_pipeline.py357 # Set mask to None if not using clusters (i.e. 1CTA kernels)COMMENT
LOW…hinfer/fused_moe/cute_dsl/blackwell/custom_pipeline.py363 # Set mask to None if not using 2CTA instructionsCOMMENT
LOW…blockscaled_contiguous_grouped_gemm_finalize_fusion.py688 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…ockscaled_contiguous_gather_grouped_gemm_act_fusion.py853 # Check if input data types are compatible with MMA instructionCOMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py359 # Check if input data types are compatible with MMA instructionCOMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py994 # Check if we're not at the last buffer of the last k_tileCOMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py1079 # Check if we're not at the last stage of the last k_tileCOMMENT
LOW…ashinfer/gemm/kernels/grouped_gemm_masked_blackwell.py904 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…er/gemm/kernels/dense_blockscaled_gemm_sm100_common.py102 # Check if input data types are compatible with MMA instructionCOMMENT
LOWflashinfer/quantization/kernels/mxfp8_quantize.py605 # Check if this thread's row is validCOMMENT
LOWflashinfer/cute_dsl/gemm_allreduce_two_shot.py519 # Check if input data types are compatible with MMA instructionCOMMENT
LOWflashinfer/testing/utils.py867 # Check if args are provided (determines how we call fn)COMMENT
LOWflashinfer/testing/utils.py1164 # Check if args are provided (determines how we call fn)COMMENT
LOWflashinfer/testing/utils.py1432 # Check if args are provided (determines how we call fn)COMMENT
LOWflashinfer/jit/cpp_ext.py213 # Check if module provides architecture flagsCOMMENT
LOWflashinfer/jit/fused_moe.py253 # Check if checksums.txt exists in the cubin directoryCOMMENT
LOWflashinfer/jit/attention/modules.py1869 # Check if checksums.txt exists in the cubin directoryCOMMENT
LOWflashinfer/jit/gemm/core.py673 # Check if checksums.txt exists in the cubin directoryCOMMENT
LOWflashinfer/jit/gemm/core.py847 # Check if checksums.txt exists in the cubin directoryCOMMENT
Docstring Block Structure13 hits · 65 pts
SeverityFileLineSnippetContext
HIGHflashinfer/green_ctx.py129 Split the device into multiple `green contexts <https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__GREEN__COSTRING
HIGHflashinfer/green_ctx.py199 Split the device into multiple green contexts, each with a fixed number of SMs, return the corresponding streamSTRING
HIGHflashinfer/utils.py284 Get GPU memory bandwidth in GB/s for the specified CUDA device. Args: device: torch.device object, e.gSTRING
HIGHflashinfer/autotuner/autotuner.py96Map *x* to the nearest bucket using floor or ceil semantics. Args: x: The value to map. buckets: BuSTRING
HIGHflashinfer/autotuner/autotuner.py140Create a mapper function for :class:`DynamicTensorSpec.map_to_tuning_buckets`. The returned callable maps any integSTRING
HIGHflashinfer/autotuner/autotuner.py578Context manager for autotuning with optional file-based caching. Controls how FlashInfer profiles and selects the bSTRING
HIGHflashinfer/autotuner/autotuner.py2092Load autotuner configs from a JSON file. Populates the internal config lookup table so that ``search_cache()`` STRING
HIGH…blockscaled_contiguous_grouped_gemm_finalize_fusion.py283Blockscaled Contiguous Grouped GEMM with Finalize Fusion for MoE workloads. Performs grouped matrix multiplication STRING
HIGH…ockscaled_contiguous_gather_grouped_gemm_act_fusion.py362Blockscaled Contiguous Gather Grouped GEMM with SwiGLU Fusion for MoE workloads. Performs grouped matrix multiplicaSTRING
HIGHflashinfer/gemm/gemm_bf16_fp4.py130Prepare FP4 weights for the bf16 x fp4 GEMM, for a specific backend. The caller is expected to start with weights iSTRING
HIGHflashinfer/quantization/fp4_quantization.py408Quantize a batched tensor to FP4 (E2M1x2) with per-block scale factors. This function converts a float/bfloat16STRING
HIGHflashinfer/quantization/fp4_quantization.py556Quantize a silu and matmul with masked batched tensor to FP4 (E2M1x2) with per-block scale factors. This functiSTRING
HIGHflashinfer/parallel_attention/utils.py356Create a device mesh and return the Ring and Ulysses process groups. Builds a ``DeviceMesh`` with up to three dimenSTRING
AI Slop Vocabulary23 hits · 60 pts
SeverityFileLineSnippetContext
LOWtests/trace/test_fi_trace_template_consistency.py313# To add a new kernel: no changes needed here — simply addCOMMENT
MEDIUMtests/autotuner/test_autotuner_distributed.py220# independent of how the harness imported the tests (a ``spawn`` worker thatCOMMENT
MEDIUMtests/mamba/test_philox_rounding.py785 """Software e4m3 SR matches hardware PTX path bitwise across a comprehensiveSTRING
MEDIUMtests/gdn/test_decode_delta_rule.py1266# Test MTP kernel with FP32 state, cache ON, state update ON (comprehensive)COMMENT
LOWtests/test_helpers/alibi_reference.py78 # Since it's causal mask we can just use $[0, 1, \dots, N]$ too.STRING
MEDIUMtests/moe/test_unified_moe_fuzz.py692# different shape would produce a wrong answer here. (Shares the harness's snap/reference/prep.)COMMENT
MEDIUMbenchmarks/bench_mamba_ssd_combined.py257# Layer 2: bench_mode — batched or varlen harnessCOMMENT
MEDIUMscripts/task_test_moe_ep_smoke.sh4# Run the moe_ep smoke + multi-rank harness via torchrun.COMMENT
LOWflashinfer/api_logging.py1547 # The safest way is to just call the class constructor.COMMENT
MEDIUMflashinfer/aot.py277 # The holistic (persistent) batch-attention kernelCOMMENT
MEDIUMflashinfer/attention/_core.py160 # head_dim > 256 is for holistic (persistent) kernel.STRING
MEDIUM…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py517 _EpilogueTokenTileSize = 64 # Fundamentally the epi_tile_nCODE
MEDIUM…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py518 _EpilogueFc1IntermediateGateUpTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py519 _EpilogueFc1IntermediateDownTileSize = 64 # Fundamentally epi_tile_m // 2CODE
MEDIUM…_backend_kernels/moe_nvfp4_swapab/epilogue_refactor.py520 _EpilogueFc2HiddenTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…ckend_kernels/moe_nvfp4_swapab/run_functional_tests.sh2# Functional test harness for the local fused fc1+fc2 MoE NVFP4 swap-AB runner.COMMENT
MEDIUM…dsl_backend_kernels/moe_nvfp4_swapab/run_mega_tests.sh2# Functional test harness for the distributed MegaMoE fused dispatch + fc1/fc2COMMENT
MEDIUM…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py2486 # to avoid recomputing it the harness keeps the globalCOMMENT
MEDIUM…_backend_kernels/moe_mxfp8_glu/run_functional_tests.sh2# Functional test harness for the MXFP8 GLU fused fc1+fc2 runner.COMMENT
MEDIUM…utedsl_backend_kernels/moe_mxfp8_glu/run_mega_tests.sh2# Functional test harness for the MXFP8 distributed MegaMoE fused dispatch +COMMENT
MEDIUMflashinfer/gemm/gemm_base.py6211 # stays row-major (m, n). Pass swap_ab=False to the harness so it keepsSTRING
MEDIUMflashinfer/jit/monomoe.py123 # robust choice for a kernel that is SM90a-only by construction (itCOMMENT
MEDIUMflashinfer/jit/attention/fmha_v2/generator_utils.py1760 // distribute m steps to multiple blocks (fully utilize SMs)COMMENT
AI Response Leakage3 hits · 22 pts
SeverityFileLineSnippetContext
HIGHdocs/tutorials/jax_tvm_ffi/flashinfer_jax_tvm_ffi.py304# In this example, you should learn how minimal the JAX-TVM bridge can be when the function signature and ``arg_spec`` aCOMMENT
HIGHdocs/tutorials/jax_tvm_ffi/flashinfer_jax_tvm_ffi.py427# In this example, you should learn how to handle two new complications that were absent in Example 1: a TVM function thCOMMENT
HIGHdocs/tutorials/jax_tvm_ffi/flashinfer_jax_tvm_ffi.py644# In this example, you should learn about three patterns that appear together for the first time: a kernel **compiled seCOMMENT
Modern AI Meta-Vocabulary6 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUM…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py2893 # Top-level orchestrationCOMMENT
MEDIUM…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py1151 # P0 scaffolding: tile-wise low-precision combine staging buffers.COMMENT
MEDIUM…utedsl_backend_kernels/moe_nvfp4_swapab/mega_runner.py3167 # orchestration above is the part being smoke-tested for now.COMMENT
MEDIUMflashinfer/cute_dsl/attention/roles/epilogue.py80 # Prefill orchestration — proven-correct inline implementationCOMMENT
MEDIUMflashinfer/cute_dsl/attention/roles/loader_tma.py141 # Prefill orchestration — proven-correct inline implementationCOMMENT
MEDIUMflashinfer/cute_dsl/attention/roles/mma.py202 # Prefill orchestration — uses primitives for GEMMs and TMEM lifecycleCOMMENT
Overly Generic Function Names13 hits · 12 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_decorators.py15 def my_function(x, y):CODE
LOWtests/utils/test_logging.py109 def test_function(x, y):CODE
LOWtests/utils/test_logging.py135 def test_function(tensor, value):CODE
LOWtests/utils/test_logging.py173 def test_function(tensor):CODE
LOWtests/utils/test_logging.py201 def test_function(mode: TestEnum, strategy: StringEnum):CODE
LOWtests/utils/test_logging.py231 def test_function(x, y=10, z=20, mode=TestEnum.OPTION_A):CODE
LOWtests/utils/test_logging.py262 def test_function(x, y=10, z=20):CODE
LOWtests/utils/test_logging.py359 def test_function(CODE
LOWtests/utils/test_logging.py397 def test_function(tensor):CODE
LOWtests/utils/test_logging.py430 def test_function(nested):CODE
LOWtests/utils/test_logging.py495 def test_function(x):CODE
LOWtests/utils/test_logging.py520 def test_function(a, b, c):CODE
LOWflashinfer/api_logging.py2415 ... def my_function(x, y):STRING
Example Usage Blocks6 hits · 9 pts
SeverityFileLineSnippetContext
LOWcsrc/fmha_v2/fmha/utils.h66// Example usage:COMMENT
LOWscripts/list_apis.sh6# Usage:COMMENT
LOW…ckend_kernels/moe_nvfp4_swapab/run_functional_tests.sh10# Usage:COMMENT
LOW…dsl_backend_kernels/moe_nvfp4_swapab/run_mega_tests.sh17# Usage:COMMENT
LOW…_backend_kernels/moe_mxfp8_glu/run_functional_tests.sh18# Usage:COMMENT
LOW…utedsl_backend_kernels/moe_mxfp8_glu/run_mega_tests.sh22# Usage:COMMENT
Synthetic Comment Markers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGH.github/workflows/update-codeowners.yml76 Auto-generated CODEOWNERS update based on commit activity over the last ${{ env.DAYS_BACK }} days.CODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWflashinfer/comm/mnnvl.py798 dummy_data = b"\x00"CODE
LOWflashinfer/comm/mnnvl.py805 self.sock.sendmsg([dummy_data], ancillary, 0, dest_path)CODE