Repository Analysis

flashinfer-ai/flashinfer

FlashInfer: Kernel Library for LLM Serving

20.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of flashinfer-ai/flashinfer, a Python project with 6,274 GitHub stars. SynthScan v2.0 examined 1,185,501 lines of code across 2129 source files, recording 14715 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 20.1 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.1
Adjusted Score
20.1
Raw Score
100%
Time Factor
2026-08-28
Last Push
6.3K
Stars
Python
Language
1.2M
Lines of Code
2.1K
Files
14.7K
Pattern Hits
2026-08-29
Scan Date
0.35
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 747MEDIUM 3708LOW 10260

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 14715 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 Separators3548 hits · 10558 pts
SeverityFileLineSnippetContext
MEDIUMcsrc/fused_moe/monomoe/src/ptx_utils.h14// ── cp.async scalar helpers (sm_80+) ──────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/ptx_utils.h35// ── Hopper WGMMA (sm_90a) helpers ─────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/ptx_utils.h148// ── Hopper mbarrier helpers (sm_90a) ──────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/ptx_utils.h309// ── 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_interface.h40// ── Single fixed-shape Dims (E=256, N=512, K=2048 block-wise FP8) ─────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h24// ── KernelConfig opt-in detection ───────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h257 // ── Sentinel-based Phase 3 → 4 handoff state (tail fields) ────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h285 // ── Phase 4 → 5 readiness flags (replaces the site-#3 barrier) ────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h285 // ── Phase 4 → 5 readiness flags (replaces the site-#3 barrier) ────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h306// ── Sentinel handoff helpers (Phase 3 → 4) ────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h409 // ── WGMMA tile geometry ───────────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h427 // ── Down-proj outer K-step (K_STEP_DOWN tunable) ──────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h437 // ── Down-proj TMA pipeline depth (DOWN_PIPE_DEPTH tunable) ────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h451 // ── Up-proj outer K-step (K_STEP_UP tunable) ──────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h462 // ── Up-proj weight-TMA lookahead (UP_W_SLOTS tunable) ─────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h483 // ── Up-proj col-halves (M-axis 128-row atoms per block) ───────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h501 // ── Down-projection grid layout ───────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h665 // ── mbarriers (16-B alignment required by SM90 mbarrier PTX) ─────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h678 // ── Phase 3 → Phase 4 (expert, token) reorganization tables ──────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h730 // ── Common fields ────────────────────────────────────────────────────────COMMENT
MEDIUMcsrc/fused_moe/monomoe/src/moe_internal.h781// ── Warp identity helpers ───────────────────────────────────────────────────COMMENT
MEDIUMtests/kda/test_recurrent_kda.py751# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py753# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1467# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1469# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1588# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1590# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1654# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1656# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1686# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1688# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2108# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2110# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2154# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2156# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2226# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2228# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2286# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2288# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2456# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2458# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2467# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2469# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2539# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py2541# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py42# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py44# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py112# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py114# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py133# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py135# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py512# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py514# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py906# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py908# ==============================================================================COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1068# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1070# ------------------------------------------------------------------------------COMMENT
MEDIUMtests/kda/test_recurrent_kda.py1369# ------------------------------------------------------------------------------COMMENT
3488 more matches not shown…
Hyper-Verbose Identifiers4931 hits · 4352 pts
SeverityFileLineSnippetContext
LOWbuild_backend.py349def _synthesize_nccl_builddir(build: Path) -> None:CODE
LOWbuild_backend.py407def _check_nccl_version_drift(wheel: Path) -> None:CODE
LOWbuild_backend.py686def _install_nvep_runtime_wheels(built_nixl: bool) -> None:CODE
LOWbuild_backend.py780def _install_cuda_tile_compile_deps() -> None:CODE
LOWbuild_backend.py1129def get_requires_for_build_wheel(config_settings=None):CODE
LOWbuild_backend.py1134def get_requires_for_build_sdist(config_settings=None):CODE
LOWbuild_backend.py1139def get_requires_for_build_editable(config_settings=None):CODE
LOWbuild_backend.py1144def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):CODE
LOWbuild_backend.py1149def prepare_metadata_for_build_editable(metadata_directory, config_settings=None):CODE
LOWbuild_utils.py35def get_dependency_requirements(CODE
LOWbuild_utils.py61def get_build_dependency_requirements(CODE
LOWbuild_utils.py68def get_cuda_extra_dependency_requirements(CODE
LOWbuild_utils.py75def get_ci_image_dependency_requirements(CODE
LOWflashinfer-cubin/build_backend.py110def get_requires_for_build_wheel(config_settings=None):CODE
LOWflashinfer-cubin/build_backend.py118def get_requires_for_build_editable(config_settings=None):CODE
LOWci/validate_cuda_versions.py116def _validate_dependency_policy(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.py180def pytest_collection_modifyitems(config, items):CODE
LOWtests/test_env.py70def test_env_var_overrides_package(monkeypatch, tmp_path):CODE
LOWtests/test_env.py81def test_package_used_when_no_env_var(monkeypatch, tmp_path):CODE
LOWtests/test_env.py91def test_env_var_used_when_no_package(monkeypatch, tmp_path):CODE
LOWtests/test_env.py99def test_default_when_nothing_set(monkeypatch):CODE
LOWtests/test_artifacts.py13def test_sanity_check_urllib_behavior():CODE
LOWtests/test_artifacts.py217def _mock_file_index_responses():STRING
LOWtests/test_artifacts.py231def test_get_available_cubin_files():STRING
LOWtests/test_artifacts.py282def test_get_checksums_unreachable_pin_raises(monkeypatch, tmp_path):CODE
LOWtests/test_artifacts.py302def test_get_checksums_falls_back_to_cached_manifest(monkeypatch, tmp_path):CODE
LOWtests/test_artifacts.py327def test_get_subdir_file_list(monkeypatch, tmp_path):CODE
LOWtests/test_artifacts.py467def test_get_checksums_keys_by_full_path(monkeypatch, tmp_path):STRING
LOWtests/test_fuzz_ledger.py17def test_fuzz_ledger_requires_tracking_issue():CODE
LOWtests/test_fuzz_ledger.py22def test_fuzz_ledger_quarantine_precedes_tolerated_overlap():CODE
LOWtests/test_fuzz_ledger.py38def test_fuzz_ledger_backend_scope_is_exact():CODE
LOWtests/test_fuzz_ledger.py48def test_fuzz_ledger_global_quarantine_xfails_before_launch():CODE
LOWtests/test_fuzz_ledger.py58def test_fuzz_ledger_reports_accumulated_expected_failures_as_xfail():CODE
LOWtests/test_fuzz_ledger.py70def test_fuzz_ledger_unexpected_pass_is_strict_failure():CODE
LOWtests/kda/test_recurrent_kda_backward.py257def test_exact_supported_shape_table(name, seq_lens, num_heads, packed):CODE
LOWtests/kda/test_recurrent_kda_backward.py277def test_unsupported_shapes_are_rejected(shape, cu_numel):CODE
LOWtests/kda/test_recurrent_kda_backward.py282def test_high_metadata_matches_chunk_schedule():CODE
LOWtests/kda/test_recurrent_kda_backward.py318def test_packed_offsets_with_same_total_and_count_are_rejected(monkeypatch):CODE
LOWtests/kda/test_recurrent_kda_backward.py342def test_scale_and_lower_bound_are_fixed(monkeypatch, scale, lower_bound, match):CODE
LOWtests/kda/test_recurrent_kda_backward.py379def test_high_ffi_abi_and_capture_prepare_flag(monkeypatch):CODE
LOWtests/kda/test_recurrent_kda_backward.py420def test_backward_matches_pytorch_reference(seq_lens, num_heads, packed):CODE
LOWtests/kda/test_recurrent_kda_backward.py448def test_backward_matches_fla_reference_all_supported_shapes(CODE
LOWtests/kda/test_recurrent_kda_backward.py467def test_cuda_graph_capture_after_exact_warmup():CODE
LOWtests/kda/test_recurrent_kda.py763def test_non_contiguous_gate_stride(H: int, D: int):CODE
LOWtests/kda/test_recurrent_kda.py1473def test_spec_decode_padded_cuda_graph(D):CODE
LOWtests/kda/test_recurrent_kda.py1593def test_spec_decode_shape_validation():CODE
LOWtests/kda/test_recurrent_kda.py1659def test_spec_decode_cu_seqlens_validation():CODE
LOWtests/kda/test_recurrent_kda.py1691def test_spec_decode_num_accepted_tokens():CODE
LOWtests/kda/test_recurrent_kda.py2113def test_spec_decode_checkpoint_correctness():CODE
LOWtests/kda/test_recurrent_kda.py2159def test_spec_decode_non_compact_state():CODE
LOWtests/kda/test_recurrent_kda.py2231def test_spec_decode_all_padded():CODE
LOWtests/kda/test_recurrent_kda.py2291def test_spec_decode_validate_slots_collision():CODE
LOWtests/kda/test_recurrent_kda.py2472def test_spec_decode_batched_vs_cuseqlens():CODE
LOWtests/kda/test_recurrent_kda.py2544def test_spec_decode_batched_auto_ssi():CODE
LOWtests/kda/test_recurrent_kda.py97def naive_kda_lowerbound_gate(CODE
LOWtests/kda/test_recurrent_kda.py152def _make_vs_reference_tensors(B, T, H, D, gate_logit_normalizer, dtype):CODE
LOWtests/kda/test_recurrent_kda.py182def test_recurrent_kda_vs_naive(CODE
4871 more matches not shown…
Cross-File Repetition696 hits · 3480 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_nvfp4_attention_sm120.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_workspace_size.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_cake_vsa.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/attention/test_cake_vsa_planning.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/trace/test_b12x_moe_trace.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe_ep/test_sm90_push_fp8_gemm.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/mamba/test_cake_ssd_combined.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/comm/test_mixed_comm_checkpoint.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/comm/test_pcie_ipc_all_reduce.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_collect_env.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_gen_module_symlink_race_condition.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/utils/test_gated_act_mxfp8.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/gemm/test_group_gemm_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_cute_dsl_mxfp8_mxfp4_grouped_gemm.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_b12x_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_unified_moe_mxfp4.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHtests/moe/test_hash_topk.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_moe_autotune_tactics.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/bench_sm120_attention.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/gdn_triton_reference.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/routines/gdn.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/routines/mamba.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/routines/kda.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHbenchmarks/routines/sampling.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/mhc.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/collect_env.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/nvfp4_attention_sm120.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/kda_backward.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/cake_vsa.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/msa_ops/proxy_score.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/msa_ops/sparse_prefill.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/msa_ops/sparse_topk_select.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGH…e_ep/kernel_src/sm90/push_style_megamoe/shim/runner.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGH…/moe_ep/kernel_src/sm90/push_style_megamoe/shim/jit.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGH…_ep/kernel_src/sm90/push_style_megamoe/shim/weights.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/mamba/cake_ssd_combined.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/comm/mixed_comm.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/comm/ulysses_topology.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/comm/pcie_ipc_topology.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/comm/pcie_ipc_ar.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/fused_moe/hash_topk.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/fused_moe/trtllm_gen_routing.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/mla/_core.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/gemm/gemm_mm_fp4_cute_dsl.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/gemm/gemm_mm_mxfp8_cute_dsl.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/gemm/gemm_svdquant.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/rmsnorm_silu.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/gdn_fused_decode.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/cake_flash_kda_packed_t1.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/cake_dcp.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/hash_topk.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/flash_kda_training.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/mhc.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/flash_kda_backward.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/cute_dsl_core.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/cake_router_gemm.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/blackwell_msa.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/flash_kda.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
HIGHflashinfer/jit/nvfp4_attention_sm120.py0copyright (c) 2025 by flashinfer team. licensed under the apache license, version 2.0 (the "license"); you may not use tSTRING
636 more matches not shown…
Unused Imports1979 hits · 1636 pts
SeverityFileLineSnippetContext
LOWdocker/test_ci_image.py4CODE
LOWci/validate_cuda_versions.py4CODE
LOWtests/repro_ikr_zero_token_idle_nvfp4.py23CODE
LOWtests/repro_ikr_zero_token_idle.py46CODE
LOWtests/kda/test_recurrent_kda_prefill_sm120.py37CODE
LOWtests/attention/test_attention_ts_decode.py17CODE
LOWtests/attention/test_sparse_mla_sm120.py31CODE
LOWtests/attention/test_dcp_spec_fp8.py3CODE
LOWtests/attention/test_attention_ts_block_sparse.py17CODE
LOWtests/attention/test_attention_ts_context.py17CODE
LOWtests/attention/cake_dcp_public_validation.py8CODE
LOWtests/attention/test_attention_ts_mla_decode.py17CODE
LOWtests/attention/test_rope.py19CODE
LOWtests/trace/test_moe_shared_experts_trace.py4CODE
LOWtests/trace/reference_utils.py3CODE
LOWtests/trace/test_fi_trace_template_consistency.py727CODE
LOWtests/trace/template_registry.py28CODE
LOWtests/moe_ep/test_mega_cuda_graph.py22CODE
LOWtests/moe_ep/smoke_nixl_ep.py12CODE
LOWtests/moe_ep/test_sm90_push_fp8_packaging.py3CODE
LOWtests/moe_ep/test_fleet_create.py3CODE
LOWtests/moe_ep/test_weight_pack_union.py9CODE
LOWtests/moe_ep/test_moe_ep_fault_tolerance_multirank.py21CODE
LOWtests/moe_ep/conftest.py3CODE
LOWtests/moe_ep/test_moe_ep_bf16_cutedsl_mega_multirank.py8CODE
LOWtests/moe_ep/test_workspace_pool.py10CODE
LOWtests/moe_ep/test_nvfp4_cutedsl_kernel_vs_reference.py23CODE
LOWtests/moe_ep/test_moe_ep_mxfp8_dispatch_multirank.py17CODE
LOWtests/moe_ep/test_bf16_cutedsl_kernel_vs_reference.py3CODE
LOWtests/moe_ep/test_compute_bridge.py18CODE
LOWtests/moe_ep/test_fault_tolerance_api.py7CODE
LOWtests/moe_ep/_sm90_push_fp8_reference.py3CODE
LOW…sts/moe_ep/test_moe_ep_sm90_pull_fp8_mega_multirank.py43CODE
LOWtests/moe_ep/test_sm90_push_fp8_backend.py3CODE
LOWtests/moe_ep/test_layer_factory.py3CODE
LOWtests/moe_ep/test_deep_gemm_mega_kernel_vs_reference.py29CODE
LOWtests/moe_ep/test_fused_quant_stage.py17CODE
LOWtests/moe_ep/test_moe_ep_compute_correctness.py11CODE
LOWtests/moe_ep/test_moe_ep_compute_correctness_nvfp4.py16CODE
LOWtests/moe_ep/test_sm90_push_fp8_kernel.py3CODE
LOWtests/moe_ep/test_fault_tolerance_reconcile.py8CODE
LOWtests/moe_ep/test_sm90_push_fp8_gemm_contract.py3CODE
LOWtests/moe_ep/test_split_kernels.py7CODE
LOWtests/moe_ep/test_constraints.py3CODE
LOW…sts/moe_ep/test_split_fused_moe_kernel_vs_reference.py25CODE
LOWtests/moe_ep/test_moe_ep_ht_correctness.py15CODE
LOWtests/moe_ep/test_deprecated_aliases.py14CODE
LOWtests/moe_ep/_sm90_push_fp8_baseline.py3CODE
LOWtests/moe_ep/test_mxfp8_mxfp4_cutedsl_split_kernel.py16CODE
LOWtests/moe_ep/test_moe_ep_deep_gemm_mega_multirank.py22CODE
LOWtests/moe_ep/test_sm90_pull_fp8_kernel_vs_reference.py27CODE
LOWtests/moe_ep/test_config.py3CODE
LOWtests/moe_ep/test_fused_moe_weights.py3CODE
LOWtests/moe_ep/test_moe_ep_layer_multirank.py12CODE
LOWtests/moe_ep/test_sm90_push_fp8_orchestrator.py3CODE
LOWtests/moe_ep/smoke_ft_ep.py20CODE
LOW…sts/moe_ep/test_moe_ep_mxfp8_cutedsl_mega_multirank.py29CODE
LOWtests/moe_ep/test_sm90_pull_fp8_config.py13CODE
LOWtests/moe_ep/test_arch_and_build.py3CODE
LOWtests/moe_ep/test_knob_cache.py11CODE
1919 more matches not shown…
Over-Commented Block1042 hits · 876 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.py301 # We do NOT stage the base NIXL libraries (libnixl.so, libnixl_capi.so,COMMENT
LOWbuild_backend.py481 dst = _moe_ep_pkg / "backends" / "split" / "comm" / "nccl_ep" / "_libs"COMMENT
LOWcsrc/topk_transform_checks.h21// (radix_topk_page_table_transform and cub_topk_page_table_transform), so the backendsCOMMENT
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#ifdef SKIP_SOFTMAX_STATCOMMENT
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.h341 q_steps,COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/dma.h721 named_barrier_wait(SYNC_BARRIER, NUM_THREADS_IN_DMA_GROUP);COMMENT
LOWcsrc/fmha_v2/fmha/warpspec/dma.h741//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.h141 "wgmma.mma_async.sync.aligned.m64n8k32.f32.e4m3.e4m3 "COMMENT
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_interface.h61 static constexpr uint32_t DOWN_SCALE_COLS = (N + BLOCK_SCALE_COL - 1) / BLOCK_SCALE_COL; // 4COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h241 static constexpr size_t TEMP_FP8_OFFSET = offsetof(MoEGemmSpec<Dims>, temp_fp8);COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h261 // sites): a `temp_act_scale` cell doubles as the readinessCOMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h281 // to preserve the head-field layout invariant documented above.COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h561 static constexpr uint32_t FP8_ACT_NUM_CHUNKS = CoreDims::K_STEP_WGMMA / FP8_ACT_K_CHUNK; // 8COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h601 // trailing sync (before any weight TMA fires), and w_wgmma's lastCOMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h641 // prefetch/epilogue slots hidden behind WGMMA and TMA waits, so paddingCOMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h681 // for expert id (expert-sorted layout).COMMENT
LOWcsrc/fused_moe/monomoe/src/moe_internal.h701 // the top-k index k with topk_ids_flat[tok*MAX_TOPK + k] == id (0xFFCOMMENT
LOW…rc/nv_internal/include/tensorrt_llm/common/cudaUtils.h21#include <cuda.h>COMMENT
982 more matches not shown…
Deep Nesting830 hits · 687 pts
SeverityFileLineSnippetContext
LOWbuild_backend.py544CODE
LOWtests/repro_ikr_zero_token_idle_nvfp4.py40CODE
LOWtests/repro_ikr_zero_token_idle_nvfp4.py41CODE
LOWtests/conftest.py180CODE
LOWtests/conftest.py230CODE
LOWtests/repro_ikr_zero_token_idle.py63CODE
LOWtests/repro_ikr_zero_token_idle.py64CODE
LOWtests/kda/test_recurrent_kda_prefill.py1545CODE
LOWtests/attention/test_attention_ts_decode.py292CODE
LOWtests/attention/conftest.py230CODE
LOWtests/attention/conftest.py367CODE
LOWtests/attention/test_trtllm_gen_sparse_mla_dsv4.py194CODE
LOWtests/attention/test_attention_ts_block_sparse.py513CODE
LOWtests/attention/test_fmha_v2_prefill.py63CODE
LOWtests/attention/test_fmha_v2_prefill.py236CODE
LOWtests/attention/test_fmha_v2_prefill.py921CODE
LOWtests/attention/test_fmha_v2_prefill.py1743CODE
LOWtests/attention/test_batch_prefill_kernels.py113CODE
LOWtests/attention/test_batch_prefill_kernels.py457CODE
LOWtests/attention/test_attention_sink.py36CODE
LOWtests/attention/test_xqa.py164CODE
LOWtests/attention/test_mla_wrapper.py1229CODE
LOWtests/attention/test_mla_wrapper.py1871CODE
LOWtests/attention/test_cute_dsl_hca_dsv4.py671CODE
LOWtests/attention/test_vsa_block_sparse_sm120.py230CODE
LOWtests/attention/test_vsa_block_sparse_sm120.py476CODE
LOWtests/attention/test_cute_dsl_mla_decode.py1623CODE
LOWtests/attention/test_attention_ts_mla_decode.py1136CODE
LOWtests/attention/test_rope.py1417CODE
LOWtests/attention/test_cute_dsl_mla_dcp.py426CODE
LOWtests/attention/test_cute_dsl_mla_dcp.py456CODE
LOWtests/attention/test_trtllm_gen_block_sparse_decode.py115CODE
LOWtests/attention/test_vsa_block_sparse.py301CODE
LOWtests/attention/test_vsa_block_sparse.py1006CODE
LOWtests/attention/test_vsa_block_sparse.py1319CODE
LOWtests/trace/test_fi_trace_template_consistency.py234CODE
LOWtests/msa_ops/test_msa_ops.py39CODE
LOWtests/msa_ops/test_msa_ops.py84CODE
LOWtests/msa_ops/test_msa_ops.py130CODE
LOWtests/msa_ops/test_msa_ops.py299CODE
LOWtests/msa_ops/test_msa_ops.py352CODE
LOWtests/msa_ops/test_msa_ops.py601CODE
LOWtests/msa_ops/test_msa_ops.py1018CODE
LOWtests/msa_ops/test_msa_ops.py1197CODE
LOWtests/msa_ops/test_msa_ops.py1618CODE
LOWtests/msa_ops/test_sparse_prefill.py54CODE
LOWtests/msa_ops/test_sparse_prefill.py137CODE
LOWtests/msa_ops/test_blackwell_msa_sm100.py600CODE
LOWtests/msa_ops/test_proxy_fp4.py61CODE
LOWtests/moe_ep/test_sm90_push_fp8_packaging.py129CODE
LOWtests/moe_ep/test_sm90_push_fp8_kernel.py701CODE
LOWtests/moe_ep/test_sm90_push_fp8_kernel.py1124CODE
LOWtests/autotuner/test_autotuner_core.py1173CODE
LOWtests/mamba/test_cake_selective_state_update.py87CODE
LOWtests/mamba/conftest.py1055CODE
LOWtests/mamba/test_cake_ssd_combined.py1065CODE
LOWtests/mamba/test_cake_ssd_combined.py1260CODE
LOWtests/mamba/test_cake_ssd_combined.py1384CODE
LOWtests/mamba/test_cake_ssd_combined.py1507CODE
LOWtests/mamba/triton_reference/ssd_chunk_scan.py88CODE
770 more matches not shown…
Excessive Try-Catch Wrapping431 hits · 418 pts
SeverityFileLineSnippetContext
LOWbuild_backend.py140 except Exception:CODE
LOWbuild_backend.py211 except Exception:CODE
LOWbuild_backend.py226 except Exception:CODE
LOWbuild_backend.py345 except Exception:CODE
LOWbuild_backend.py422 except Exception:CODE
LOWbuild_backend.py576 except Exception:CODE
LOWbuild_backend.py985 except Exception as e:CODE
LOWbuild_utils.py103 except Exception:CODE
LOWtests/kda/test_recurrent_kda_prefill_sm120.py1061 except Exception as exc: # noqa: BLE001 -- the type and text are the assertionCODE
LOWtests/kda/test_recurrent_kda_prefill_sm120.py1447 except Exception as exc: # noqa: BLE001 -- reported belowCODE
MEDIUMtests/kda/test_recurrent_kda_prefill_sm120.py1058def outcome(backend):CODE
LOWtests/attention/conftest.py439 except Exception as e:CODE
LOWtests/attention/conftest.py493 except Exception: # pragma: no cover - diagnostics must never fail the runCODE
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.py303 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.py466except Exception:CODE
LOWtests/trace/example.py477except Exception:CODE
LOWtests/trace/example.py495except Exception:CODE
LOWtests/trace/example.py505except Exception:CODE
LOWtests/trace/example.py444except Exception:CODE
LOWtests/trace/example.py523except Exception:CODE
LOWtests/trace/example.py537except Exception:CODE
LOWtests/trace/example.py549except Exception:CODE
LOWtests/trace/example.py1190except 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.py91 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/moe_ep/test_sm90_push_fp8_backend.py25 except Exception:CODE
LOWtests/moe_ep/test_sm90_push_fp8_kernel.py28 except Exception:CODE
LOWtests/moe_ep/test_fault_tolerance_reconcile.py43 except Exception as e: # noqa: BLE001 - surfaced to the assertion belowCODE
LOWtests/moe_ep/test_fault_tolerance_reconcile.py174 except Exception as e: # noqa: BLE001 - asserted on belowCODE
MEDIUMtests/moe_ep/test_fault_tolerance_reconcile.py32def work(r):CODE
MEDIUMtests/moe_ep/test_fault_tolerance_reconcile.py163def run(r, timeout_s):CODE
LOWtests/moe_ep/test_sm90_push_fp8_gemm_contract.py356 except Exception:CODE
371 more matches not shown…
AI Structural Patterns417 hits · 322 pts
SeverityFileLineSnippetContext
LOWtests/kda/test_recurrent_kda_decode_export.py930CODE
LOWtests/attention/test_modular_fmha_prefill_paged.py127CODE
LOWtests/attention/test_dcp_spec_fp8.py622CODE
LOWtests/attention/test_dcp_spec_jit.py352CODE
LOWtests/attention/test_attention_ts_block_sparse.py741CODE
LOWtests/attention/test_fmha_v2_prefill.py63CODE
LOWtests/attention/test_mla_decode_kernel.py177CODE
LOWtests/attention/test_mla_decode_kernel.py398CODE
LOWtests/attention/test_xqa.py120CODE
LOWtests/attention/test_cute_dsl_mla_decode.py327CODE
LOWtests/attention/test_trtllm_gen_attention_decode.py623CODE
LOWtests/attention/test_batch_attention.py91CODE
LOWtests/msa_ops/test_blackwell_msa_sm100.py31CODE
LOWtests/moe_ep/test_sm90_push_fp8_kernel.py109CODE
LOWtests/moe_ep/test_sm90_push_fp8_gemm_contract.py442CODE
LOWtests/mamba/test_chunk_scan_combined.py27CODE
LOWtests/mamba/utils.py16CODE
LOWtests/mamba/test_checkpointing_ssu.py168CODE
LOW…amba/triton_reference/selective_state_update_varlen.py272CODE
LOWtests/mamba/triton_reference/selective_state_update.py431CODE
LOW…amba/triton_reference/replay_selective_state_update.py1976CODE
LOW…amba/triton_reference/replay_selective_state_update.py3653CODE
LOWtests/mamba/triton_reference/ssd_combined.py32CODE
LOWtests/mamba/triton_reference/ssd_combined.py197CODE
LOWtests/mamba/triton_reference/causal_conv1d_triton.py1004CODE
LOWtests/comm/test_all_gather_matmul.py45CODE
LOWtests/comm/test_mixed_comm.py36CODE
LOWtests/gemm/test_cute_dsl_gemm_allreduce_two_shot.py139CODE
LOWtests/gemm/test_groupwise_scaled_gemm_mxfp4.py73CODE
LOWtests/gdn/test_fused_decode.py393CODE
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/test_unified_moe_fp8.py740CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py2561CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py2709CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py3501CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py321CODE
LOWtests/moe/trtllm_gen_fused_moe_utils.py3118CODE
LOWtests/moe/test_unified_moe_mxint4.py88CODE
LOWtests/moe/utils.py322CODE
LOWdocs/tutorials/jax_tvm_ffi/gemma3_flashinfer_jax.py834CODE
LOWflashinfer-jit-cache/build_backend.py237CODE
LOWexamples/pytorch/wan/transformer_wan_flashinfer.py318CODE
LOWexamples/pytorch/wan/transformer_wan_flashinfer.py563CODE
LOWbenchmarks/bench_gdn_decode.py337CODE
LOWbenchmarks/bench_gdn_decode.py1046CODE
LOWbenchmarks/bench_gdn_decode.py1477CODE
LOWbenchmarks/bench_topk.py509CODE
LOWbenchmarks/bench_moe_deepseek.py320CODE
LOWbenchmarks/bench_moe_deepseek.py572CODE
LOWbenchmarks/bench_moe_deepseek.py695CODE
LOWbenchmarks/bench_moe_deepseek.py949CODE
LOWbenchmarks/bench_moe_deepseek.py1086CODE
LOWscripts/codeowner_analyzer.py22CODE
LOWflashinfer/xqa.py188CODE
LOWflashinfer/gdn_prefill.py116CODE
LOWflashinfer/tactics_blocklist_gen.py511CODE
LOWflashinfer/kda.py54CODE
357 more matches not shown…
Modern Structural Boilerplate280 hits · 264 pts
SeverityFileLineSnippetContext
LOWflashinfer-cubin/flashinfer_cubin/__init__.py80__all__ = ["get_cubin_dir", "list_cubins", "get_cubin_path", "CUBIN_DIR"]CODE
LOWtests/attention/conftest.py24logger = logging.getLogger(__name__)CODE
LOWtests/comm/test_nvshmem_allreduce.py12logger = logging.getLogger(__name__)CODE
LOWtests/comm/test_vllm_custom_allreduce.py18logger = logging.getLogger(__name__)CODE
LOWtests/utils/test_topk.py668 def set_selected_scores(use_prefix: bool) -> None: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.py63logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/wan/transformer_wan_flashinfer.py303def set_ulysses_communicator(comm: Optional["UlyssesCommunicator"]) -> None:CODE
LOWscripts/aot_memory_monitor.py265def update_stats(stats: MemoryStats, sample: dict[str, int]) -> None:CODE
LOWscripts/test_sharding/__init__.py5__all__ = ["ALGORITHM_VERSION", "SCHEMA_VERSION"]CODE
LOWflashinfer/gated_act_mxfp8.py281__all__ = [STRING
LOWflashinfer/cake_dcp.py681__all__ = [CODE
LOWflashinfer/fp8_quantization.py20__all__ = [CODE
LOWflashinfer/compilation_context.py25logger = logging.getLogger(__name__)CODE
LOWflashinfer/_kda_training_impl.py1696__all__ = [CODE
LOWflashinfer/kda_prefill_cute.py492__all__ = [CODE
LOWflashinfer/kda_training.py19__all__ = [CODE
LOWflashinfer/utils.py34logger = logging.getLogger(__name__)CODE
LOWflashinfer/utils.py827def set_log_level(lvl_str: str) -> None:CODE
LOWflashinfer/fp4_quantization.py45__all__ = [CODE
LOWflashinfer/artifacts.py309 def update_pbar_cb(_) -> None:CODE
LOWflashinfer/_kda_training_dispatch.py277__all__ = ["_TrainingRouteSpec", "_select_training_route"]CODE
LOWflashinfer/deep_gemm.py45logger = logging.getLogger(__name__)CODE
LOWflashinfer/kda_backward.py1235__all__ = [STRING
LOWflashinfer/cake_vsa.py991__all__ = ["plan_cake_vsa", "run_cake_vsa"]CODE
LOWflashinfer/attention/__init__.py20__all__ = [CODE
LOWflashinfer/attention/prims_ts/__init__.py42__all__ = [CODE
LOWflashinfer/attention/prims_ts/context.py2235__all__ = [CODE
LOWflashinfer/attention/prims_ts/block_sparse.py834__all__ = [CODE
LOWflashinfer/attention/prims_ts/mla_decode.py2012__all__ = [CODE
LOWflashinfer/attention/prims_ts/decode.py2645__all__ = [CODE
LOWflashinfer/attention/prims_ts/_tensor_aliasing.py104__all__ = [CODE
LOWflashinfer/attention/prims_ts/kernels/tensor_map.py563__all__ = [CODE
LOWflashinfer/attention/prims_ts/kernels/tcgen05_compat.py77__all__ = ["tcgen05_mma_ws"]CODE
LOW…n/prims_ts/kernels/fmha_decode/block_sparse_inspect.py276__all__ = ["compile_block_sparse_inspection"]CODE
LOW…/kernels/fmha_decode/fmha_decode_resources/__init__.py139__all__ = [CODE
LOW…de/fmha_decode_resources/smem_block_sparse_metadata.py1074__all__ = [CODE
LOW…ims_ts/kernels/mla_decode/throughput_2cta/resources.py234 def update_from(self, other) -> None:CODE
LOW…a_decode/throughput_latency_1cta/resources/__init__.py35__all__ = [CODE
LOW…ention/prims_ts/kernels/fmha_context/fmha_resources.py4035 def set_p_base(self, stage_info: StageInfo, *, tmem_p_base: Int32) -> None:CODE
LOWflashinfer/attention/prims_ts/_block_sparse/plan.py392__all__ = [CODE
LOWflashinfer/attention/prims_ts/_block_sparse/config.py552__all__ = [CODE
LOWflashinfer/attention/prims_ts/_block_sparse/compiler.py341__all__ = [CODE
LOWflashinfer/attention/prims_ts/_block_sparse/prepared.py250__all__ = [CODE
LOWflashinfer/attention/prims_ts/_block_sparse/runtime.py522__all__ = [CODE
LOW…shinfer/attention/prims_ts/_block_sparse/inspection.py151__all__ = ["_BlockSparseInspection", "_inspect_block_sparse_bsr"]CODE
LOWflashinfer/trace/solution.py278__all__ = [CODE
LOWflashinfer/trace/__init__.py42__all__ = [CODE
LOWflashinfer/trace/templates/gated_act_mxfp8.py362__all__ = [CODE
LOWflashinfer/trace/templates/_init_helpers.py258__all__ = [CODE
LOWflashinfer/msa_ops/_blackwell_sm100.py2726__all__ = [CODE
LOWflashinfer/msa_ops/_blackwell_sm100_reverse_plan.py683__all__ = [CODE
LOWflashinfer/msa_ops/__init__.py33__all__ = [CODE
LOWflashinfer/moe_ep/__init__.py160__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.py118__all__ = [CODE
LOWflashinfer/moe_ep/core/runtime/bootstrap.py291__all__ = [CODE
LOWflashinfer/moe_ep/core/runtime/__init__.py17__all__ = [CODE
220 more matches not shown…
Structural Annotation Overuse158 hits · 242 pts
SeverityFileLineSnippetContext
LOWtests/attention/test_rope.py888 # Step 1: Pre-populate cache with existing tokensCOMMENT
LOWtests/attention/test_rope.py1099 # 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.py310 # Step 1: Quantize with fp4_quantizeCOMMENT
LOWtests/utils/test_fp4_quantize.py320 # Step 2: Dequantize with e2m1_and_ufp8sf_scale_to_floatCOMMENT
LOWtests/utils/test_fp4_quantize.py335 # 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.md63### Step 1: Choose Your Test RoutineCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md70### Step 2: Run a Single BenchmarkCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md118### Step 3: Understand the OutputCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md134### Step 4: Run Batch BenchmarksCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md156### Step 5: Common FlagsCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md174### Step 1: Write Your Benchmark ScriptCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md210### Step 2: Run Your BenchmarkCOMMENT
LOW.claude/skills/benchmark-kernel/SKILL.md229### 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
98 more matches not shown…
Verbosity Indicators135 hits · 209 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.py888 # Step 1: Pre-populate cache with existing tokensCOMMENT
LOWtests/attention/test_rope.py1099 # 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.py310 # Step 1: Quantize with fp4_quantizeCOMMENT
LOWtests/utils/test_fp4_quantize.py320 # Step 2: Dequantize with e2m1_and_ufp8sf_scale_to_floatCOMMENT
LOWtests/utils/test_fp4_quantize.py335 # 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.py1312 # Step 2: RMSNorm on residualCOMMENT
LOWscripts/pr_checks/check_api_docs.py65# Step 1: collect all @flashinfer_api-decorated function names via ASTCOMMENT
LOWscripts/pr_checks/check_api_docs.py93# Step 2: collect documented symbols from docs/api/*.rstCOMMENT
LOWscripts/pr_checks/check_api_docs.py164# Step 3: compare and reportCOMMENT
LOWflashinfer/trace/templates/rope.py1018 # Step 3: append into paged cache (GQA/MHA) — materialize the quantizedCOMMENT
LOW…e_cutedsl_megakernel/src/moe_hopper_fp8/mega_runner.py196 # Step 1: deterministic FP8 input + weight generationCOMMENT
LOW…e_cutedsl_megakernel/src/moe_hopper_fp8/mega_runner.py599 # Step 2: FP8 referenceCOMMENT
LOW…e_cutedsl_megakernel/src/moe_hopper_fp8/mega_runner.py660 # Step 5: FP8 validationCOMMENT
LOW…e_cutedsl_megakernel/src/moe_hopper_fp8/mega_runner.py752 # Step 4: FP8 kernel launchCOMMENT
LOW…le_cutedsl_megakernel/src/moe_nvfp4_swapab/epilogue.py871 # Step 1: absmax over the weighted regs.COMMENT
LOW…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py1407 # Step 0: load tmemCOMMENT
LOW…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py1454 # Step 1: perform swiglu on the first part, interleave with the second's 32x32 tmem transpose.COMMENT
LOW…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py1482 # Step 2: QuantCOMMENT
LOW…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py1493 # Step 3: TMASTGCOMMENT
LOW…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py774 # Step 1: deterministic input + weight generationCOMMENT
LOW…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py984 # Step 2: referenceCOMMENT
LOW…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py1015 # Step 3: workspace allocationCOMMENT
LOW…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py1053 # Step 4: kernel launchCOMMENT
LOW…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py1457 # Step 5: validationCOMMENT
LOW…cutedsl_megakernel/src/moe_nvfp4_swapab/kernel_fc12.py1913 # Step 1: coarse-grain spin on ``fc1_done_counter[slot]``COMMENT
LOW…cutedsl_megakernel/src/moe_nvfp4_swapab/kernel_fc12.py2014 # Step 3: K-loop with 2x cute.copy per tile (B +COMMENT
75 more matches not shown…
Cross-Language Confusion34 hits · 169 pts
SeverityFileLineSnippetContext
HIGHtests/trace/test_paged_mqa_logits_checker.py76 With rnorm == 0 the relative error is undefined; substituting 0.0 madeSTRING
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.py189 if (qo_idx < qo_len && kv_idx < kv_len) {CODE
HIGHtests/gdn/test_decode_ucache.py57 source env.sh && pytest tests/gdn/test_decode_ucache.py -vSTRING
HIGHtests/jit/test_flash_kda_packed_t1_jit.py184 assert "minor == 0 || minor == 3" in bindingCODE
HIGHtests/jit/test_flash_kda_decode_jit.py262 assert "else if (has_token && k_lane == 0)" in generated_bodyCODE
HIGHtests/jit/test_flash_kda_decode_jit.py306 assert "major == 10 && (minor == 0 || minor == 3)" in commonCODE
HIGHtests/jit/test_flash_kda_decode_jit.py307 assert "major == 10 && minor == expected_minor" in commonCODE
HIGHbenchmarks/bench_monomoe.py86 Uses mono_moe's `[gate || up]` fc1 half-ordering and the given (alreadySTRING
HIGHbenchmarks/bench_gdn_ucache_flush.py30 source env.sh && python benchmarks/bench_gdn_ucache_flush.py [--iters 200]STRING
HIGHbenchmarks/routines/attention.py3771 # Leave empty (null) when not explicitly overridden so legacyCOMMENT
HIGHflashinfer/collect_env.py156 _run("grep -sq -e docker -e containerd -e kubepods /proc/1/cgroup && echo 1")CODE
HIGHflashinfer/utils.py699 include/flashinfer/mamba/conversion.cuh (SM100_ALL || SM103_ALL).STRING
HIGHflashinfer/trace/templates/attn_scores.py230 # An all-zero reference makes the relative error undefined; the oldCOMMENT
HIGHflashinfer/trace/templates/moe.py3130 description="Up/gate projection weights (FP8, [gate || up] rows).",CODE
HIGHflashinfer/trace/templates/moe.py2981 up-projection weights use the [gate || up] half ordering (monomoe'sSTRING
HIGH…90/pull_style_cutedsl_megakernel/src/src/flag_batch.py21 flag_addr: Int64 # per-lane counter-slot address (0 == null)CODE
HIGH…oe_ep/kernel_src/cutedsl_megamoe/src/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.py1050 # _v7e_a/b regs are undefined), so they must keep log_alpha=beta=0. The causalCOMMENT
HIGH…shinfer/gdn_kernels/gdn_decode_bf16_wy_ucache_flush.py1666 # _v7e_a/b regs are undefined), so they must keep log_alpha=beta=0. The causalCOMMENT
HIGHflashinfer/gdn_kernels/gdn_decode_bf16_wy_ucache.py1134 # _v7e_a/b regs are undefined), so they must keep log_alpha=beta=0. The causalCOMMENT
HIGHflashinfer/fused_moe/cute_dsl/moe_utils.py387 ``!enable_alltoall || ep_size <= top_k`` branch). FunctionallySTRING
HIGHflashinfer/mla/_core.py3769 Accepts the concatenated ``(q_nope || q_rope)`` query and ``(ckv || kpe)`` paged KVCODE
HIGHflashinfer/jit/cake_router_gemm.py66 TVM_FFI_CHECK(out_is_bf16 == 0 || out_is_bf16 == 1, ValueError)CODE
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.py1543 USE_TMA_STORE && false,CODE
HIGHflashinfer/jit/attention/fmha_v2/generator_utils.py1564 USE_TMA_STORE && false,CODE
HIGHflashinfer/jit/attention/fmha_v2/generator_utils.py2424 code = "if (!{has_noloop} || (!force_unroll && (ignore_b1opt || b > {unroll_threshold})))".format(CODE
HIGHflashinfer/jit/attention/fmha_v2/generator_utils.py2428 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
Self-Referential Comments61 hits · 163 pts
SeverityFileLineSnippetContext
MEDIUMtests/conftest.py243 # 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.py1967 # Create a larger tensor with 2*D in the last dimensionCOMMENT
MEDIUMtests/trace/test_fi_trace.py1026 # Create a dummy instance — we don't call run(), only fi_trace()COMMENT
MEDIUMtests/autotuner/test_autotuner_configs.py718 # Create a cache file with a known configCOMMENT
MEDIUMtests/autotuner/test_autotuner_configs.py909 # 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.py514 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_trtllm_moe_alltoall.py1186 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_mnnvl_memory.py135 # Create a random input tensorCOMMENT
MEDIUMtests/comm/test_quantized_allreduce.py213 # This file is single-node spawn-managed; use a file store to avoidCOMMENT
MEDIUMtests/utils/test_fp4_quantize.py248 # Create a test scale factors tensor with uint8 dtypeCOMMENT
MEDIUMtests/utils/test_fp4_quantize.py298 # 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.py916 # 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.py200 # Create a temporary JIT directory with some dummy cache filesCOMMENT
MEDIUMtests/cli/test_cli_cmds.py243 # 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.sh1020 # Create a bash array with the node IDsCOMMENT
MEDIUMscripts/test_utils.sh1190 # Create a temporary directory for parallel job stateCOMMENT
MEDIUMscripts/test_utils.sh1205 # Create a results file for each testCOMMENT
MEDIUM…e_cutedsl_megakernel/src/moe_nvfp4_swapab/moe_utils.py221 # Create a new cute.Pointer with generic address space, preserving alignmentCOMMENT
MEDIUM…e_cutedsl_megakernel/src/moe_nvfp4_swapab/moe_utils.py249 # Create a new cute.Pointer with gmem address space, preserving alignmentCOMMENT
MEDIUM…_src/cutedsl_megamoe/src/moe_nvfp4_swapab/moe_utils.py229 # Create a new cute.Pointer with generic address space, preserving alignmentCOMMENT
MEDIUM…_src/cutedsl_megamoe/src/moe_nvfp4_swapab/moe_utils.py257 # 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.py504 # Create the outputCOMMENT
MEDIUMflashinfer/fused_moe/cute_dsl/rubin/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/rubin/utils.py146 # Create a numpy arraySTRING
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
MEDIUM…blockscaled_contiguous_grouped_gemm_finalize_fusion.py317 """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.py332 """This class implements contiguous grouped matrix multiplication with gather operation and SwiGLU fusionSTRING
MEDIUMflashinfer/fused_moe/cute_dsl/common/kernel_utils.py44# This file is copied and modified from cutlass https://github.com/NVIDIA/cutlass/blob/main/python/CuTeDSL/cutlass/cute/COMMENT
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.py54 """This class implements batched matrix multiplication (C = A x SFA x B x SFB) with support for FP4 data typesSTRING
MEDIUMflashinfer/gemm/kernels/epilogue_utils.py4# This file contains modified versions of epilogue utility functions fromCOMMENT
MEDIUMflashinfer/gemm/kernels/dense_blockscaled_gemm_sm107.py29# This file is ported from CUTLASS's Rubin dense_blockscaled_gemm_persistent.pyCOMMENT
MEDIUMflashinfer/gemm/kernels/bmm_fp8_blackwell.py140 """This class implements batched matrix multiplication (C = A x B) with support for various data typesSTRING
MEDIUM…ashinfer/gemm/kernels/grouped_gemm_masked_blackwell.py589 """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.py541 # 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
1 more matches not shown…
AI Slop Vocabulary54 hits · 151 pts
SeverityFileLineSnippetContext
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
LOWtests/mamba/triton_reference/causal_conv1d_triton.py171 # first chunk and does not have prior-token, so just set to 0COMMENT
MEDIUMtests/gemm/test_unified_gemm_fuzz.py595# + tight tolerance. Same model as the MoE harness: with exact-grid inputs the oracle measures theCOMMENT
MEDIUMtests/gemm/test_unified_gemm_fuzz.py549 # layout_128x4 / mxfp4 default this harness prepares). Toggling it on the cutlass/cudnn/autoCOMMENT
MEDIUMtests/gdn/test_decode_delta_rule.py1310# 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.py2509# different shape would produce a wrong answer here. (Shares the harness's snap/reference/prep.)COMMENT
MEDIUMtests/moe/test_unified_moe_fuzz.py1014# Covers the in-kernel-routing bug cluster the pre-routed harness structurally can't reach:COMMENT
MEDIUMtests/moe/test_unified_moe_fuzz.py1170 # separate validation, and EP collectives are out of scope for this single-GPU harness.COMMENT
MEDIUMtests/moe/test_unified_moe_fuzz.py1320 # In-kernel routing (FromLogits) headline cases the pre-routed harness can't reach:COMMENT
MEDIUMtests/moe/test_unified_moe_fuzz.py1017 RoutingMethodType.RenormalizeNaive, # == the harness's original host routingCODE
MEDIUMbenchmarks/bench_mamba_ssd_combined.py257# Layer 2: bench_mode — batched or varlen harnessCOMMENT
MEDIUMbenchmarks/bench_silu_and_mul_nvfp4_quantize.py132 # more comprehensive correctness coverage.COMMENT
MEDIUMbenchmarks/bench_recurrent_kda_prefill.py575 # harness while keeping route logging out of every timed call.COMMENT
MEDIUMbenchmarks/routines/kda.py329 # difference between the two APIs, not an artifact of this harness, and itCOMMENT
MEDIUMbenchmarks/routines/kda.py560 # published combination. They need a protocol this harness cannotCOMMENT
MEDIUMbenchmarks/routines/kda.py567 # what this harness is actually able to set up.COMMENT
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.py294 # The holistic (persistent) batch-attention kernelCOMMENT
MEDIUMflashinfer/attention/_core.py160 # head_dim > 256 is for holistic (persistent) kernel.STRING
MEDIUM…_megakernel/src/moe_hopper_fp8/run_functional_tests.sh2# Functional test harness for the FP8 GLU fused fc1+fc2 runner.COMMENT
MEDIUM…utedsl_megakernel/src/moe_hopper_fp8/run_mega_tests.sh2# Functional test harness for the FP8 distributed MegaMoE fused dispatch + fc1/fc2COMMENT
MEDIUM…cutedsl_megakernel/src/moe_hopper_fp8/run_perf_test.sh2# DSV4 performance harness for moe_hopper_fp8.COMMENT
MEDIUM…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py944 _EpilogueTokenTileSize = 64 # Fundamentally the epi_tile_nCODE
MEDIUM…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py945 _EpilogueFc1IntermediateGateUpTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py946 _EpilogueFc1IntermediateDownTileSize = 64 # Fundamentally epi_tile_m // 2CODE
MEDIUM…l_megakernel/src/moe_nvfp4_swapab/epilogue_refactor.py947 _EpilogueFc2HiddenTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…egakernel/src/moe_nvfp4_swapab/run_functional_tests.sh2# Functional test harness for the local fused fc1+fc2 MoE NVFP4 swap-AB runner.COMMENT
MEDIUM…edsl_megakernel/src/moe_nvfp4_swapab/run_mega_tests.sh2# Functional test harness for the distributed MegaMoE fused dispatch + fc1/fc2COMMENT
MEDIUM…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py1972 # to avoid recomputing it the harness keeps the globalCOMMENT
MEDIUM…ull_style_cutedsl_megakernel/src/src/inputs_process.py579# Correctness harness (GPU only; needs cutlass + torch fp4/e8m0 dtypes).COMMENT
MEDIUM…ull_style_cutedsl_megakernel/src/src/inputs_process.py728 except Exception as exc: # noqa: BLE001 -- smoke harness, report and continueCODE
MEDIUM…edsl_megamoe/src/moe_nvfp4_swapab/epilogue_refactor.py989 _EpilogueTokenTileSize = 64 # Fundamentally the epi_tile_nCODE
MEDIUM…edsl_megamoe/src/moe_nvfp4_swapab/epilogue_refactor.py990 _EpilogueFc1IntermediateGateUpTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…edsl_megamoe/src/moe_nvfp4_swapab/epilogue_refactor.py991 _EpilogueFc1IntermediateDownTileSize = 64 # Fundamentally epi_tile_m // 2CODE
MEDIUM…edsl_megamoe/src/moe_nvfp4_swapab/epilogue_refactor.py992 _EpilogueFc2HiddenTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…l_megamoe/src/moe_nvfp4_swapab/run_functional_tests.sh2# Functional test harness for the local fused fc1+fc2 MoE NVFP4 swap-AB runner.COMMENT
MEDIUM…cutedsl_megamoe/src/moe_nvfp4_swapab/run_mega_tests.sh2# Functional test harness for the distributed MegaMoE fused dispatch + fc1/fc2COMMENT
MEDIUM…rc/cutedsl_megamoe/src/moe_nvfp4_swapab/mega_runner.py2121 # to avoid recomputing it the harness keeps the globalCOMMENT
MEDIUM…edsl_megamoe/src/moe_mxfp8_glu/run_functional_tests.sh2# Functional test harness for the MXFP8 GLU fused fc1+fc2 runner.COMMENT
MEDIUM…rc/cutedsl_megamoe/src/moe_mxfp8_glu/run_mega_tests.sh2# Functional test harness for the MXFP8 distributed MegaMoE fused dispatch +COMMENT
MEDIUM…tedsl_megamoe/src/moe_bf16_glu/run_functional_tests.sh2# Functional test harness for the BF16 GLU fused fc1+fc2 runner.COMMENT
MEDIUM…src/cutedsl_megamoe/src/moe_bf16_glu/run_mega_tests.sh2# Functional test harness for the BF16 distributed MegaMoE fused dispatch +COMMENT
MEDIUM…p/kernel_src/cutedsl_megamoe/src/src/inputs_process.py516# Correctness harness (GPU only; needs cutlass + torch fp4/e8m0 dtypes).COMMENT
MEDIUM…p/kernel_src/cutedsl_megamoe/src/src/inputs_process.py656 except Exception as exc: # noqa: BLE001 -- smoke harness, report and continueCODE
MEDIUMflashinfer/fused_moe/da_tuner.py628 # Singleton compares robust worst cases; switch charges its control overhead once to eachCOMMENT
MEDIUMflashinfer/gemm/gemm_base.py6958 # 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.py1783 // distribute m steps to multiple blocks (fully utilize SMs)COMMENT
MEDIUMflashinfer/kda_kernels/kda_chunked_bt16.py758# Gate ABI dtype selectable from the CLI harness. BF16 is the default (see theCOMMENT
MEDIUMflashinfer/kda_kernels/kda_chunked_bt16.py10304 # The gate is materialized in FP32 (RNG parity with the historical harness,COMMENT
MEDIUMflashinfer/kda_kernels/kda_chunked_bt16.py10325 # byte-for-byte vs the original harness.COMMENT
Redundant / Tautological Comments63 hits · 94 pts
SeverityFileLineSnippetContext
LOWbuild_backend.py1035 # 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.py659 # 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.py276 # 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.sh1670 # 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
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/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.py332 # Check if it's a CUDA deviceCOMMENT
LOWflashinfer/prefill.py517 # Check if FP8 by presence of scale tensorsCOMMENT
LOWflashinfer/__main__.py828 # 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
LOW…ention/prims_ts/kernels/fmha_context/fmha_resources.py4314 # Check if we should skip correction (when old_max == new_max)COMMENT
LOW…utedsl_megamoe/src/moe_bf16_glu/mega_reference_bf16.py561 # Check if input data types are compatible with MMA instructionCOMMENT
LOWflashinfer/autotuner/autotuner.py1861 # 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.py748 # Check if cuda.cudart is available and import accordinglyCOMMENT
LOWflashinfer/comm/mnnvl.py785 # Check if device supports multicastingCOMMENT
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
LOWflashinfer/gemm/gemm_base.py7471 # Check if dimensions are aligned for cute-dsl (16-byte alignment)COMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py363 # Check if input data types are compatible with MMA instructionCOMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py998 # Check if we're not at the last buffer of the last k_tileCOMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm103.py1083 # Check if we're not at the last stage of the last k_tileCOMMENT
LOWflashinfer/gemm/kernels/epilogue_utils.py241 # Check if tile_sched is StaticPersistentTileScheduler or any subclass inheriting from itCOMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm107.py713 # Check if prefetch is enabled (prefetch_dist > 0)COMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm107.py2028 # Check if the current combination is validCOMMENT
LOWflashinfer/gemm/kernels/dense_blockscaled_gemm_sm107.py2752 # Check if prefetch is enabled (prefetch_dist > 0)COMMENT
LOWflashinfer/gemm/kernels/grouped_gemm_masked_rubin.py691 # Check if input data types are compatible with MMA instructionCOMMENT
LOWflashinfer/gemm/kernels/grouped_gemm_masked_rubin.py1947 # Check if the current combination is validCOMMENT
LOWflashinfer/gemm/kernels/bmm_fp8_rubin.py547 # Check if we should use Bkeep-Breuse patternCOMMENT
LOWflashinfer/gemm/kernels/bmm_fp8_blackwell.py310 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…ashinfer/gemm/kernels/grouped_gemm_masked_blackwell.py907 # 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.py607 # 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.py215 # Check if module provides architecture flagsCOMMENT
LOWflashinfer/jit/fused_moe.py264 # Check if checksums.txt exists in the cubin directoryCOMMENT
3 more matches not shown…
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.py316 Get GPU memory bandwidth in GB/s for the specified CUDA device. Args: device: torch.device object, e.gSTRING
HIGHflashinfer/autotuner/autotuner.py101Map *x* to the nearest bucket using floor or ceil semantics. Args: x: The value to map. buckets: BuSTRING
HIGHflashinfer/autotuner/autotuner.py145Create a mapper function for :class:`DynamicTensorSpec.map_to_tuning_buckets`. The returned callable maps any integSTRING
HIGHflashinfer/autotuner/autotuner.py790Context manager for autotuning with optional file-based caching. Controls how FlashInfer profiles and selects the bSTRING
HIGHflashinfer/autotuner/autotuner.py2658Load autotuner configs from a JSON file. Populates the internal config lookup table so that ``search_cache()`` STRING
HIGH…blockscaled_contiguous_grouped_gemm_finalize_fusion.py384Blockscaled contiguous grouped GEMM for MoE GEMM2 workloads. Fused mode applies routing weights and atomically reduSTRING
HIGH…ockscaled_contiguous_gather_grouped_gemm_act_fusion.py461Blockscaled contiguous gather grouped GEMM with fused FC1 activation. Performs grouped matrix multiplication with fSTRING
HIGHflashinfer/gemm/gemm_bf16_fp4.py138Prepare 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.py419Quantize a batched tensor to FP4 (E2M1x2) with per-block scale factors. This function converts a float/bfloat16STRING
HIGHflashinfer/quantization/fp4_quantization.py567Quantize 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
Modern AI Meta-Vocabulary9 hits · 32 pts
SeverityFileLineSnippetContext
MEDIUMtests/autotuner/test_autotuner_core.py1206 # TODO: Let AutoTuner orchestrate multiple same-shaped value samples within one tuning transaction.COMMENT
MEDIUM…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py2405 # Top-level orchestrationCOMMENT
MEDIUM…cutedsl_megakernel/src/moe_nvfp4_swapab/mega_runner.py2649 # orchestration above is the part being smoke-tested for now.COMMENT
MEDIUM…rc/cutedsl_megamoe/src/moe_nvfp4_swapab/mega_runner.py2539 # Top-level orchestrationCOMMENT
MEDIUM…rc/cutedsl_megamoe/src/moe_nvfp4_swapab/mega_runner.py2804 # orchestration above is the part being smoke-tested for now.COMMENT
MEDIUMflashinfer/fused_moe/da_runtime.py770 # Strip orchestration-owned keywords before delegating dtype-specific allocation andCOMMENT
MEDIUMflashinfer/cute_dsl/attention/roles/epilogue.py74 # Prefill orchestration — proven-correct inline implementationCOMMENT
MEDIUMflashinfer/cute_dsl/attention/roles/loader_tma.py282 # Prefill orchestration — proven-correct inline implementationCOMMENT
MEDIUMflashinfer/cute_dsl/attention/roles/mma.py198 # Prefill orchestration — uses primitives for GEMMs and TMEM lifecycleCOMMENT
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
Example Usage Blocks13 hits · 20 pts
SeverityFileLineSnippetContext
LOWcsrc/fmha_v2/fmha/utils.h66// Example usage:COMMENT
LOWscripts/list_apis.sh6# Usage:COMMENT
LOW…_megakernel/src/moe_hopper_fp8/run_functional_tests.sh12# Usage:COMMENT
LOW…utedsl_megakernel/src/moe_hopper_fp8/run_mega_tests.sh20# Usage:COMMENT
LOW…cutedsl_megakernel/src/moe_hopper_fp8/run_perf_test.sh18# Usage:COMMENT
LOW…egakernel/src/moe_nvfp4_swapab/run_functional_tests.sh10# Usage:COMMENT
LOW…edsl_megakernel/src/moe_nvfp4_swapab/run_mega_tests.sh17# Usage:COMMENT
LOW…l_megamoe/src/moe_nvfp4_swapab/run_functional_tests.sh10# Usage:COMMENT
LOW…cutedsl_megamoe/src/moe_nvfp4_swapab/run_mega_tests.sh17# Usage:COMMENT
LOW…edsl_megamoe/src/moe_mxfp8_glu/run_functional_tests.sh18# Usage:COMMENT
LOW…rc/cutedsl_megamoe/src/moe_mxfp8_glu/run_mega_tests.sh22# Usage:COMMENT
LOW…tedsl_megamoe/src/moe_bf16_glu/run_functional_tests.sh18# Usage:COMMENT
LOW…src/cutedsl_megamoe/src/moe_bf16_glu/run_mega_tests.sh33# Usage:COMMENT
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.py2425 ... def my_function(x, y):STRING
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 Data4 hits · 3 pts
SeverityFileLineSnippetContext
LOWflashinfer/gdn_kernels/gdn_decode_mtp.py2691 dummy_key = (q.device, h0_source.dtype)CODE
LOWflashinfer/gdn_kernels/gdn_decode_mtp.py2692 if dummy_key not in dummy_intermediate_states:CODE
LOWflashinfer/gdn_kernels/gdn_decode_mtp.py2693 dummy_intermediate_states[dummy_key] = torch.empty(CODE
LOWflashinfer/gdn_kernels/gdn_decode_mtp.py2696 intermediate_states = dummy_intermediate_states[dummy_key]CODE