AI Slop Code Risk Monitor

lightseekorg/tokenspeed

SlopCodeMonitor badge for lightseekorg/tokenspeed Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

TokenSpeed is a speed-of-light LLM inference engine.

17.0 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for lightseekorg/tokenspeed, a Python project with 2,832 GitHub stars. SynthScan examined 1,207,236 lines of code across 2953 source files, recording 16718 pattern matches distributed across 23 syntactic categories. The legacy adjusted pattern signal is 17.0 (Elevated pattern signal); it is not an authorship estimate.

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

17.0
Adjusted Signal
17.0
Raw Pattern Score
100%
Time Factor
2026-11-01
Last Push
2.8K
Stars
Python
Language
1.2M
Lines of Code
3.0K
Files
16.7K
Pattern Hits
2026-10-31
Scan Date
0.12
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 40.5/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 9.7/100 · LOW

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

Agent Over-Engineering Ratio 44.7/100 · MEDIUM

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

PR Review Velocity Impact 57.8/100 · HIGH

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 6HIGH 335MEDIUM 1187LOW 15190

Directory Score Breakdown

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

Pattern Findings

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

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

Hyper-Verbose Identifiers8747 hits · 8555 pts
SeverityFileLineSnippetContext
LOWtokenspeed-kernel-npu/test/test_weight_nz.py50def test_weight_nz_exact_shapes_eager_and_graph(shape, transpose, batch_size):CODE
LOWtokenspeed-kernel-npu/test/test_weight_nz.py87def test_weight_nz_restores_internal_format_setting():CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed_prefill.py115def test_execution_error_is_not_retried(monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_dsa_prefill_prologue.py57def test_storeless_prefill_matches_original_write(tokens, style, sanitize):CODE
LOWtokenspeed-kernel-npu/test/test_dsa_indexer_metadata.py34def test_grouped_metadata_graph_reads_changed_and_restored_causal_ends(rank):CODE
LOWtokenspeed-kernel-npu/test/test_dsa_indexer_metadata.py164def test_fused_dsa_cp_metadata_exact_replay(CODE
LOWtokenspeed-kernel-npu/test/test_dsa_indexer_metadata.py271def test_metadata_temporaries_survive_foreign_stream_allocator_reuse():CODE
LOWtokenspeed-kernel-npu/test/test_mla_cache_mask.py34def test_mla_cache_mask_graph(tokens: int, masked: bool):CODE
LOWtokenspeed-kernel-npu/test/test_mla_cache_mask.py84def test_fused_mla_layout_masks_and_value_projection_graph(heads, rows):CODE
LOWtokenspeed-kernel-npu/test/test_dsa_contract.py40def native_constructor_dependencies(monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_dsa_contract.py50def test_partial_merge_handles_all_empty_and_mixed_rows(monkeypatch, dtype):CODE
LOWtokenspeed-kernel-npu/test/test_dsa_contract.py83def test_cp_startup_requires_every_execution_operator(monkeypatch, missing):CODE
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py120def test_prolog_uses_backend_owned_write_locations(dispatch):CODE
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py131def test_prolog_preserves_pre_attention_communication(dispatch, needs_gather):CODE
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py148def test_prolog_retains_fallback_for_exclusions(dispatch, exclusion):CODE
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py163def test_forward_keeps_current_comm_manager_signature(dispatch):CODE
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py172def test_forward_passes_selected_cache_to_packaged_path(dispatch, fuse_value_gate):CODE
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py207def test_projection_helper_only_runs_prolog_and_query_concat(dispatch):CODE
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py232def test_operator_admission_rejection_keeps_primitive_forward(dispatch):CODE
LOWtokenspeed-kernel-npu/test/test_stop_conditions.py50def test_stop_conditions_match_cpu(CODE
LOWtokenspeed-kernel-npu/test/test_mla_prolog.py50def test_lite_mla_prolog_nope_packed_cache_and_graph_replay(CODE
LOWtokenspeed-kernel-npu/test/test_moe.py149def test_ascend_softmax_bias_topk_matches_torch(tokens: int):CODE
LOWtokenspeed-kernel-npu/test/test_moe.py302def test_ascend_local_expert_npu_graph_replay(batch_size: int):CODE
LOWtokenspeed-kernel-npu/test/test_layernorm.py53def test_add_rmsnorm_updates_residual(dtype: torch.dtype) -> None:CODE
LOWtokenspeed-kernel-npu/test/test_triton.py27def test_triton_adapter_allows_optional_modules_to_be_missing(monkeypatch) -> None:CODE
LOWtokenspeed-kernel-npu/test/test_mha.py83def test_mha_prefill_from_fused_qkv() -> None:CODE
LOWtokenspeed-kernel-npu/test/test_mha.py115def test_mha_extend_with_paged_cache() -> None:CODE
LOWtokenspeed-kernel-npu/test/test_mha.py155def test_mha_decode_with_paged_cache() -> None:CODE
LOWtokenspeed-kernel-npu/test/test_mha.py181def test_mha_decode_npugraph_updates_sequence_lengths() -> None:CODE
LOWtokenspeed-kernel-npu/test/test_flash_mla_prolog.py179def test_exact_packaged_nope_call(inputs, monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_flash_mla_prolog.py199def test_query_norm_can_be_returned_for_indexer_reuse(inputs, monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_flash_mla_prolog.py212def test_large_lite_metadata_admission(inputs):CODE
LOWtokenspeed-kernel-npu/test/test_flash_mla_prolog.py221def test_ineligible_inputs_do_not_write(inputs, monkeypatch):CODE
LOW⚡tokenspeed-kernel-npu/test/test_flash_mla_prolog.py232def test_missing_package_keeps_fallback(inputs, monkeypatch):CODE
LOW⚡tokenspeed-kernel-npu/test/test_flash_mla_prolog.py240def test_operator_errors_are_not_retried(inputs, monkeypatch):CODE
LOW⚡tokenspeed-kernel-npu/test/test_flash_mla_prolog.py249def test_local_head_prolog_admission(inputs, heads):CODE
LOWtokenspeed-kernel-npu/test/test_oe_table_placement.py38def test_append_packed_lookup_accepts_host_or_device_tables(CODE
LOWtokenspeed-kernel-npu/test/test_oe_table_placement.py146def test_host_lookup_supports_npu_graph_replay() -> None:CODE
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py39def test_signed_nibble_order_and_range():CODE
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py48def test_grouped_plan_shares_weights_and_encodes_scales_without_numeric_cast():CODE
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py71def test_prepare_preserves_layout_scales_and_matrix_orientation(CODE
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py143def test_flatquant_rejects_invalid_clip(clip):CODE
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py156def test_real_nz_weights_match_integer_gmm(transposed, h, i, activation_range):CODE
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py229def test_old_smooth_only_abi_is_rejected():CODE
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py244def test_fused_invocation_preserves_flatquant_inputs(transposed):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py64def test_supported_geometry_ignores_legacy_flag(CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py106def test_broken_dependency_not_hidden(monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py116def test_missing_capability_falls_back(monkeypatch, capability):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py144def test_registered_handler_updates_only_lengths(monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py190def test_packed_graph_live_updates(monkeypatch, batch, heads, page_size, return_lse):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py270def test_fused_prolog_to_packed_graph(CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py351def test_prefill_capability_geometry(monkeypatch, queries, page_size):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py362def test_prefill_unsupported_geometry_falls_back(monkeypatch, case):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py384def test_prefill_missing_package(monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py393def test_prefill_broken_dependency_propagates(monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py404def test_prefill_package_capability(monkeypatch, capability):CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py429def test_packed_graph_service_geometry(monkeypatch):CODE
LOWtokenspeed-kernel-npu/test/test_dsa.py29def test_full_scan_chunk_hints_are_cached_by_shape():CODE
LOWtokenspeed-kernel-npu/test/test_dsa.py42def test_missing_fused_cp_operators_fail_at_device_boundary(monkeypatch, missing):CODE
LOWtokenspeed-kernel-npu/test/test_dsa.py52def test_fused_cp_topology_is_validated_by_the_installed_operators(degree):CODE
8687 more matches not shown…
Decorative Section Separators1124 hits · 3797 pts
SeverityFileLineSnippetContext
MEDIUM⚡test/runtime/test_dspark_proposal.py37# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py39# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py73# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py75# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py149# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_proposal.py151# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py522# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py524# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py549# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py553# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py835# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py837# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py927# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py929# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py985# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_device_handle.py988# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py866# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py868# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py1326# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_device_handle.py1328# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_qwen4_exp.py2236# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_qwen4_exp.py2238# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py342# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py344# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py414# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py416# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py468# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py470# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py960# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_retraction_image_executor.py962# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_retraction_image_executor.py82# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_retraction_image_executor.py84# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_drafter_accept_indexing.py680# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_drafter_accept_indexing.py684# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_expert_location.py489# ----------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_expert_location.py492# ----------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_input_logprobs.py50# --------------------------------------------------------------------------COMMENT
MEDIUMtest/runtime/test_input_logprobs.py52# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py115# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py117# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py154# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py156# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py180# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py182# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py204# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_kimi_k3_dspark_model.py206# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py56# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py58# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py100# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py102# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py158# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py160# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py197# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py199# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py249# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py251# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py272# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py274# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py285# --------------------------------------------------------------------------COMMENT
MEDIUM⚡test/runtime/test_dspark_config.py287# --------------------------------------------------------------------------COMMENT
1064 more matches not shown…
Over-Commented Block2697 hits · 2634 pts
SeverityFileLineSnippetContext
LOWtokenspeed-kernel-npu/test/test_weight_nz.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_mla_packed_prefill.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_dsa_prefill_prologue.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_dsa_indexer_metadata.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_mla_cache_mask.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_dsa_contract.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_rotary_embedding.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_dsa_prefill_indexer.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_stop_conditions.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_moe_int8.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_mla_prolog.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_moe.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_layernorm.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_triton.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_mha.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_flash_mla_prolog.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_oe_table_placement.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_w4a4_weights.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_mla_packed.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_dsa.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-kernel-npu/test/test_mla_cp_transport.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ed-kernel-npu/python/tokenspeed_kernel_npu/__init__.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/_triton.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…npu/python/tokenspeed_kernel_npu/ops/over_embedding.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…rnel-npu/python/tokenspeed_kernel_npu/ops/layernorm.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ed-kernel-npu/python/tokenspeed_kernel_npu/ops/w4a4.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…nel-npu/python/tokenspeed_kernel_npu/ops/mla_packed.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ed-kernel-npu/python/tokenspeed_kernel_npu/ops/gemm.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…nel-npu/python/tokenspeed_kernel_npu/ops/mla_prolog.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/__init__.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…nel-npu/python/tokenspeed_kernel_npu/ops/activation.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…u/python/tokenspeed_kernel_npu/ops/rotary_embedding.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/dsa.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/moe.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mla.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOW…kernel-npu/python/tokenspeed_kernel_npu/ops/mla_dcp.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/setup.py1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-grammar/CMakeLists.txt1# Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-grammar/build.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-grammar/tests/grammar.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-grammar/cxx/facade.h1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-grammar/src/lib.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-grammar/src/table.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-grammar/src/table.rs21//! The process's matchers, by handle, and the C entries the data planeCOMMENT
LOWtokenspeed-engine/crates/ts-metrics/tests/prometheus.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-metrics/src/prom.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-metrics/src/prom.rs21//! Prometheus multiprocess files, in the format `prometheus_client` readsCOMMENT
LOWtokenspeed-engine/crates/ts-metrics/src/lib.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-metrics/src/lib.rs21//! The engine's metrics (`metrics/collector.py`), produced in Rust (RFCCOMMENT
LOWtokenspeed-engine/crates/ts-metrics/src/relay.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-wire/tests/conformance.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-wire/src/request.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-wire/src/request.rs61 /// Return the sampled tokens' logprobs.COMMENT
LOWtokenspeed-engine/crates/ts-wire/src/multimodal.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-wire/src/multimodal.rs121COMMENT
LOWtokenspeed-engine/crates/ts-wire/src/control.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
LOWtokenspeed-engine/crates/ts-wire/src/error.rs1// Copyright (c) 2026 LightSeek FoundationCOMMENT
2637 more matches not shown…
Unused Imports2081 hits · 1998 pts
SeverityFileLineSnippetContext
LOWtokenspeed-kernel-npu/test/test_weight_nz.py21CODE
LOWtokenspeed-kernel-npu/test/test_moe_int8.py21CODE
LOWtokenspeed-kernel-npu/test/test_moe.py21CODE
LOWtokenspeed-kernel-npu/test/test_mla_cp_transport.py30CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/_triton.py27CODE
LOW…npu/python/tokenspeed_kernel_npu/ops/over_embedding.py23CODE
LOW…npu/python/tokenspeed_kernel_npu/ops/over_embedding.py30CODE
LOW…rnel-npu/python/tokenspeed_kernel_npu/ops/layernorm.py23CODE
LOW…ed-kernel-npu/python/tokenspeed_kernel_npu/ops/w4a4.py112CODE
LOW…ed-kernel-npu/python/tokenspeed_kernel_npu/ops/w4a4.py342CODE
LOW…ed-kernel-npu/python/tokenspeed_kernel_npu/ops/gemm.py21CODE
LOW…nel-npu/python/tokenspeed_kernel_npu/ops/mla_prolog.py24CODE
LOW…u/python/tokenspeed_kernel_npu/ops/rotary_embedding.py23CODE
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py23CODE
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py28CODE
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py28CODE
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py28CODE
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py28CODE
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py28CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/dsa.py23CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/dsa.py816CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/dsa.py260CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/moe.py23CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mla.py23CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py23CODE
LOW…kernel-npu/python/tokenspeed_kernel_npu/ops/mla_dcp.py23CODE
LOW…kernel-npu/python/tokenspeed_kernel_npu/ops/mla_dcp.py160CODE
LOW…kernel-npu/python/tokenspeed_kernel_npu/ops/mla_dcp.py196CODE
LOWtokenspeed-engine/python/tokenspeed_engine/__init__.py39CODE
LOWtokenspeed-engine/python/tokenspeed_engine/__init__.py39CODE
LOWtokenspeed-engine/python/tokenspeed_engine/__init__.py39CODE
LOWtokenspeed-engine/python/tokenspeed_engine/__init__.py39CODE
LOWtokenspeed-engine/python/tokenspeed_engine/__init__.py39CODE
LOWtokenspeed-engine/python/tokenspeed_engine/__init__.py39CODE
LOWtest/test_l3_tail_roundtrip.py30CODE
LOWtest/l3_test_utils.py25CODE
LOWtest/test_host_cache_storage.py21CODE
LOWtest/test_l2_layerwise_load.py21CODE
LOWtest/test_cache_transfer_layout.py21CODE
LOWtest/test_l3_kvstore.py21CODE
LOWtest/ci/npu/tests/scatter-test.py29CODE
LOWtest/ci/npu/tests/scatter-test.py116CODE
LOWtest/ci/npu/tests/virtual_slots_to_local-test.py29CODE
LOWtest/ci/npu/tests/virtual_slots_to_local-test.py109CODE
LOWtest/ci/deepswe/test_kimi_code.py3CODE
LOWtest/ci/deepswe/kimi_code_environment.py3CODE
LOWtest/ci/deepswe/kimi_code_pier_agent.py3CODE
LOWtest/ci/deepswe/summarize.py4CODE
LOWtest/runtime/test_unified_decode_path.py34CODE
LOWtest/runtime/test_dspark_proposal.py11CODE
LOWtest/runtime/test_update_weights_from_disk.py32CODE
LOWtest/runtime/test_kimi_k3_eagle3.py3CODE
LOWtest/runtime/test_block_tables_bridge.py1CODE
LOWtest/runtime/test_device_handle.py38CODE
LOWtest/runtime/test_launcher_rocm_tool_registration.py29CODE
LOWtest/runtime/test_host_executor.py3CODE
LOWtest/runtime/test_workspace_allreduce_gates.py27CODE
LOWtest/runtime/test_glm53_flash_cache_spec.py3CODE
LOWtest/runtime/test_cudagraph_probe_ladder.py23CODE
LOWtest/runtime/test_kimi_mxfp4_dense_linear.py3CODE
2021 more matches not shown…
Cross-File Repetition118 hits · 590 pts
SeverityFileLineSnippetContext
HIGH…tic_benchmark/minimax_m3/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…gentic_benchmark/kimi_k3/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…gentic_benchmark/inkling/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…st/agentic_benchmark/kimi_k2.5/vllm/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…ntic_benchmark/kimi_k2.5/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…/agentic_benchmark/kimi_k2.5/sglang/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…/agentic_benchmark/kimi_k2.5/trtllm/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…agentic_benchmark/glm5.2/tokenspeed/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGHtest/agentic_benchmark/glm5.2/trtllm/collect_outputs.py0collect a sweep's per-config benchmark_summary.json files into one csv.STRING
HIGH…tic_benchmark/minimax_m3/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…gentic_benchmark/kimi_k3/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…gentic_benchmark/inkling/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…st/agentic_benchmark/kimi_k2.5/vllm/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…ntic_benchmark/kimi_k2.5/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…/agentic_benchmark/kimi_k2.5/sglang/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…/agentic_benchmark/kimi_k2.5/trtllm/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…agentic_benchmark/glm5.2/tokenspeed/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGHtest/agentic_benchmark/glm5.2/trtllm/collect_outputs.py0iteration-weighted accept length: sum(completion-1) / sum(n_chunks-1). the "decoded tok/iter" in benchmark_summary.json STRING
HIGH…time/layers/attention/backends/paged/tokenspeed_mla.py0per-bs decode metadata views over the persistent buffers. one builder for capture and refresh; cached per bs — pointer-sSTRING
HIGH…/runtime/layers/attention/backends/paged/trtllm_mla.py0per-bs decode metadata views over the persistent buffers. one builder for capture and refresh; cached per bs — pointer-sSTRING
HIGH…enspeed/runtime/layers/attention/backends/paged/mla.py0per-bs decode metadata views over the persistent buffers. one builder for capture and refresh; cached per bs — pointer-sSTRING
HIGH…st/nvidia/ops/moe/test_mxfp4_situ_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…st/nvidia/ops/moe/test_nvfp4_situ_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…st/nvidia/ops/moe/test_bf16_relu2_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…t/nvidia/ops/moe/test_nvfp4_relu2_flashinfer_trtllm.py0minimal module carrying what the preprocessor and apply consume.STRING
HIGH…d-kernel/test/nvidia/thirdparty/bench_mnnvl_vs_nccl.py0true when the world spans hosts. cross-node cuda-ipc workspace creation fails and poisons the cuda context ('invalid resSTRING
HIGH…ernel/test/nvidia/thirdparty/test_trtllm_mnnvl_comm.py0true when the world spans hosts. cross-node cuda-ipc workspace creation fails and poisons the cuda context ('invalid resSTRING
HIGH…el/test/nvidia/thirdparty/test_trtllm_mnnvl_twoshot.py0true when the world spans hosts. cross-node cuda-ipc workspace creation fails and poisons the cuda context ('invalid resSTRING
HIGH…python/tokenspeed_kernel/ops/attention/kda/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/qsa/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/msa/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…ython/tokenspeed_kernel/ops/attention/rmha/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/dsa/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/mla/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…python/tokenspeed_kernel/ops/attention/gdn/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…thon/tokenspeed_kernel/ops/attention/kpool/__init__.py0pick dense vs mxfp8 signature and build the scale kwargs splat. q_scale selects the block-scaled path; k_scale/v_scale mSTRING
HIGH…l/ops/attention/rmha/_cute_dsl/flash_fwd_sm100_bias.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/fmha.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0set up configurations and parameters for the mla kernel operation. this method initializes and configures various attribSTRING
HIGH…/communication/_cute_dsl/fused_tp_projection_kernel.py0set up configurations that are dependent on gemm inputs this method configures various attributes based on the input tenSTRING
HIGH…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py0set up configurations that are dependent on gemm inputs this method configures various attributes based on the input tenSTRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py0set up configurations that are dependent on gemm inputs this method configures various attributes based on the input tenSTRING
HIGH…/communication/_cute_dsl/fused_tp_projection_kernel.py0gpu device kernel performing the persistent batched gemm computation.STRING
HIGH…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py0gpu device kernel performing the persistent batched gemm computation.STRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py0gpu device kernel performing the persistent batched gemm computation.STRING
HIGH…/communication/_cute_dsl/fused_tp_projection_kernel.py0make tiledcopy for shared memory store, then use it to partition register array (source) and shared memory (destination)STRING
HIGH…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py0make tiledcopy for shared memory store, then use it to partition register array (source) and shared memory (destination)STRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py0make tiledcopy for shared memory store, then use it to partition register array (source) and shared memory (destination)STRING
HIGH…/communication/_cute_dsl/fused_tp_projection_kernel.py0make tiledcopy for global memory store, then use it to: partition shared memory (source) and global memory (destination)STRING
HIGH…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py0make tiledcopy for global memory store, then use it to: partition shared memory (source) and global memory (destination)STRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py0make tiledcopy for global memory store, then use it to: partition shared memory (source) and global memory (destination)STRING
HIGH…/communication/_cute_dsl/fused_tp_projection_kernel.py0computes the number of stages for a/b/c operands based on heuristics. :param tiled_mma: the tiled mma object defining thSTRING
HIGH…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py0computes the number of stages for a/b/c operands based on heuristics. :param tiled_mma: the tiled mma object defining thSTRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py0computes the number of stages for a/b/c operands based on heuristics. :param tiled_mma: the tiled mma object defining thSTRING
HIGH…/communication/_cute_dsl/fused_tp_projection_kernel.py0use persistent tile scheduler to compute the grid size for the output tensor c. :param c: the output tensor c :type c: cSTRING
HIGH…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py0use persistent tile scheduler to compute the grid size for the output tensor c. :param c: the output tensor c :type c: cSTRING
HIGH…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py0use persistent tile scheduler to compute the grid size for the output tensor c. :param c: the output tensor c :type c: cSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp8.py0the device split_kv kernel implementation of the multi-head latent attention. this kernel coordinates multiple specializSTRING
HIGH…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py0the device split_kv kernel implementation of the multi-head latent attention. this kernel coordinates multiple specializSTRING
HIGHtokenspeed-mla/python/tokenspeed_mla/mla_decode_fp16.py0the device split_kv kernel implementation of the multi-head latent attention. this kernel coordinates multiple specializSTRING
58 more matches not shown…
Modern Structural Boilerplate545 hits · 550 pts
SeverityFileLineSnippetContext
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/_triton.py68__all__ = ["libdevice", "proton", "tl", "triton"]CODE
LOW…npu/python/tokenspeed_kernel_npu/ops/over_embedding.py95__all__ = ["append_packed_lookup", "register_host_tables"]CODE
LOW…rnel-npu/python/tokenspeed_kernel_npu/ops/layernorm.py79__all__ = ["qk_rmsnorm", "rmsnorm"]CODE
LOW…u/python/tokenspeed_kernel_npu/ops/rotary_embedding.py54__all__ = ["apply_rope"]CODE
LOW…ernel-npu/python/tokenspeed_kernel_npu/ops/sampling.py69__all__ = [CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/moe.py577__all__ = [CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mla.py368__all__ = [CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py203__all__ = [CODE
LOWtokenspeed-engine/python/tokenspeed_engine/__init__.py48__all__ = [CODE
LOWtest/runtime/cache_pool_test_utils.py111 def set_kv_buffer(self, layer, loc, cache_k, cache_v) -> None:CODE
LOWtest/runtime/test_logits_processor.py353def _set_fabric(monkeypatch, supported: bool) -> None:CODE
LOWtest/runtime/distributed/test_comm_ops.py49 def _set_fabric(monkeypatch, supported: bool) -> None:CODE
LOWtest/ci_system/ci_utils.py20logger = logging.getLogger(__name__)CODE
LOWtest/ci_system/ci_register.py23__all__ = [CODE
LOWpython/tokenspeed/runtime/hf_hub_retry.py43logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/pd/cache_protocol.py185__all__ = [CODE
LOWpython/tokenspeed/runtime/metrics/service.py51logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/metrics/registry.py38logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/epd/prefill_receive.py66logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/epd/encode_host.py85logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/hyperconnection.py351__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/rotary_embedding.py37logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/parameter.py35__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/qwen4_exp_ple.py1128__all__ = [CODE
LOW…speed/runtime/layers/attention/mm_encoder_attention.py55logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/attention/registry.py86logger = logging.getLogger(__name__)CODE
LOW…on/tokenspeed/runtime/layers/attention/qsa/__init__.py34__all__ = [CODE
LOW…okenspeed/runtime/layers/attention/qsa/verify_state.py218__all__ = ["QSAVerifyState"]CODE
LOW…hon/tokenspeed/runtime/layers/attention/qsa/indexer.py490__all__ = ["QSAIndexer"]CODE
LOW⚡…n/tokenspeed/runtime/layers/attention/backends/base.py549 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…n/tokenspeed/runtime/layers/attention/backends/base.py136 def set_cache_pool(self, cache_pool: CachePool) -> None:CODE
LOW⚡…/runtime/layers/attention/backends/specific/inkling.py702 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…/runtime/layers/attention/backends/specific/inkling.py92logger = logging.getLogger(__name__)CODE
LOW⚡…time/layers/attention/backends/specific/qsa_indexer.py346 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW⚡…untime/layers/attention/backends/specific/qwen4_exp.py264 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…untime/layers/attention/backends/specific/qwen4_exp.py292__all__ = ["Qwen4ExpBackend", "qwen4_exp_backend"]CODE
LOW…enspeed/runtime/layers/attention/backends/paged/msa.py65logger = logging.getLogger(__name__)CODE
LOW⚡…enspeed/runtime/layers/attention/backends/paged/msa.py500 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…runtime/layers/attention/backends/paged/tree_verify.py42__all__ = ["TreeCascadeRows", "TreeDraftInputs", "TreeVerifyInputs"]CODE
LOW…runtime/layers/attention/backends/paged/tree_verify.py94 def set_frontier(self, bs: int, frontier: torch.Tensor) -> None:CODE
LOW…enspeed/runtime/layers/attention/backends/paged/dsa.py409 def set_request_slots(self, req_pool_indices: torch.Tensor) -> None:CODE
LOW…enspeed/runtime/layers/attention/backends/paged/dsa.py596 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…time/layers/attention/backends/paged/tokenspeed_mla.py88logger = logging.getLogger(__name__)CODE
LOW⚡…peed/runtime/layers/attention/backends/paged/router.py965 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW⚡…nspeed/runtime/layers/attention/backends/paged/base.py440 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…nspeed/runtime/layers/attention/backends/paged/base.py479 def set_request_slots(self, req_pool_indices: torch.Tensor) -> None:CODE
LOW…/runtime/layers/attention/backends/state/checkpoint.py58__all__ = [CODE
LOW…speed/runtime/layers/attention/backends/state/mamba.py100logger = logging.getLogger(__name__)CODE
LOW…speed/runtime/layers/attention/backends/state/mamba.py337 def set_kv_pool(self, kv_pool: CachePool) -> None:CODE
LOW⚡…eed/runtime/layers/attention/backends/hybrid/linear.py110 def update_draft_forward_metadata(self, frontier: torch.Tensor) -> None:CODE
LOW…thon/tokenspeed/runtime/layers/attention/dsa/ascend.py815__all__ = [CODE
LOW…enspeed/runtime/layers/attention/kv_cache/qwen4_exp.py66__all__ = [CODE
LOW…/layers/attention/kv_cache/recipes/scheduler_bridge.py185__all__ = [CODE
LOW…peed/runtime/layers/attention/kv_cache/recipes/spec.py683__all__ = [CODE
LOW…/runtime/layers/attention/kv_cache/recipes/transfer.py235__all__ = [CODE
LOW…runtime/layers/attention/kv_cache/recipes/qwen4_exp.py356__all__ = ["Qwen4ExpRecipe"]CODE
LOWpython/tokenspeed/runtime/layers/dense/__init__.py29__all__ = [CODE
LOWpython/tokenspeed/runtime/layers/dense/nvfp4.py36logger = logging.getLogger(__name__)CODE
LOWpython/tokenspeed/runtime/layers/dense/mxfp4.py182__all__ = [CODE
LOW…kenspeed/runtime/layers/quantization/modelopt_mixed.py65logger = logging.getLogger(__name__)CODE
485 more matches not shown…
Deep Nesting611 hits · 548 pts
SeverityFileLineSnippetContext
LOWtokenspeed-kernel-npu/test/test_lite_mla_dispatch.py148CODE
LOWtokenspeed-kernel-npu/test/test_flash_mla_prolog.py127CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py79CODE
LOWtokenspeed-kernel-npu/test/test_mla_packed.py362CODE
LOWtokenspeed-kernel-npu/test/test_mla_cp_transport.py69CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/dsa.py73CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/dsa.py1021CODE
LOWtest/test_utils.py27CODE
LOWtest/test_l3_tail_roundtrip.py164CODE
LOWtest/l3_test_utils.py146CODE
LOW…t/long_context_benchmark/tokenspeed/collect_outputs.py39CODE
LOWtest/runtime/test_weight_loader_prefetch.py200CODE
LOWtest/runtime/test_weight_loader_prefetch.py299CODE
LOWtest/runtime/test_instanttensor_loader.py132CODE
LOWtest/runtime/test_host_executor.py1527CODE
LOWtest/runtime/test_host_executor.py1966CODE
LOWtest/runtime/test_cudagraph_probe_ladder.py313CODE
LOWtest/runtime/test_cli_config_compat.py383CODE
LOWtest/runtime/test_cli_config_compat.py470CODE
LOWtest/runtime/test_router_topk_invariance.py86CODE
LOWtest/runtime/test_tree_attention_cascade.py109CODE
LOWtest/runtime/cache_pool_test_utils.py361CODE
LOWtest/runtime/test_flashmla_dcp.py71CODE
LOWtest/runtime/test_drafter_accept_indexing.py586CODE
LOWtest/runtime/test_expert_location.py92CODE
LOWtest/runtime/test_inkling_real_checkpoint_load.py61CODE
LOWtest/runtime/test_tree_spec.py96CODE
LOWtest/runtime/test_tree_spec.py141CODE
LOWtest/runtime/test_tree_spec.py183CODE
LOWtest/runtime/test_kimi_k3_dspark_model.py279CODE
LOWtest/runtime/test_gdn_state_paging.py611CODE
LOWtest/runtime/test_eagle4_tree_lanes.py159CODE
LOWtest/runtime/test_kvp_prefix_chunk_gather.py386CODE
LOWtest/runtime/test_deepseek_v41_model.py224CODE
LOWtest/runtime/test_deepseek_v41_model.py695CODE
LOWtest/runtime/test_deepseek_v41_model.py1107CODE
LOWtest/runtime/test_deepseek_v41_model.py2748CODE
LOWtest/runtime/test_deepseek_v41_model.py3587CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py70CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py148CODE
LOWtest/runtime/test_v4_sliding_window_groups_smoke.py205CODE
LOWtest/runtime/test_inkling_load_weights.py87CODE
LOWtest/runtime/test_eagle_harness_round.py135CODE
LOWtest/runtime/test_slot_state.py611CODE
LOWtest/runtime/test_dflash2.py340CODE
LOWtest/runtime/test_copy_cache_pages.py378CODE
LOWtest/runtime/run_deepseek_v41_eval.py54CODE
LOWtest/runtime/run_deepseek_v41_eval.py130CODE
LOWtest/runtime/test_pp_mapping.py266CODE
LOWtest/runtime/test_kimi_k3_attn_res.py733CODE
LOWtest/runtime/test_eagle_harness_device_policy.py81CODE
LOWtest/runtime/test_prefill_graph.py1468CODE
LOWtest/runtime/test_prefill_graph.py97CODE
LOWtest/runtime/test_prefill_graph.py223CODE
LOWtest/runtime/test_ascend_mla_prefill.py328CODE
LOWtest/runtime/test_startup_process_ownership.py172CODE
LOWtest/runtime/test_paged_attention_prologue.py624CODE
LOWtest/runtime/test_prefix_cache_e2e.py246CODE
LOWtest/runtime/test_prefix_cache_e2e.py340CODE
LOWtest/runtime/test_qsa_backend.py343CODE
551 more matches not shown…
Cross-Language Confusion76 hits · 405 pts
SeverityFileLineSnippetContext
HIGH…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/dsa.py808 Owned addresses are translated to local storage; null, invalid orSTRING
HIGHtest/ci/deepswe/kimi_code_pier_agent.py125 "/logs/agent/kimi-code.log 2>/dev/null || true' EXIT; "CODE
HIGHtest/runtime/test_inkling_mtp_conv_state.py342 over [committed history || accepted chunk prefix]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py489 """Per-request reference: causal conv over [prefix || x]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py501 the chunk): rows of [prefix || x[:upto]]."""STRING
HIGHtest/runtime/test_inkling_mtp_conv_state.py520 conv over [ring history || x_t]; the kernel persists the token's ownSTRING
HIGH⚡test/runtime/test_unit_kv_scales.py141 '{"kv_cache": {"scaling_factor": {"0": {"0": null}}}}',CODE
HIGH⚡test/runtime/test_unit_kv_scales.py143 '{"kv_cache": null}',CODE
HIGHtest/runtime/test_cli_config_compat.py87 ('{"org/model": "/local/model", "other": null}', "org/model"),CODE
HIGHtest/runtime/test_cli_config_compat.py272 '{"rope_scaling": null}',CODE
HIGHtest/runtime/test_cli_config_compat.py300 "hf_overrides": '{"rope_scaling": null}',CODE
HIGH⚡test/runtime/test_retraction_image_executor.py949 queue.push(first, "first")CODE
HIGH⚡test/runtime/test_retraction_image_executor.py950 queue.push(second, "second")CODE
HIGH⚡test/runtime/test_retraction_image_executor.py955 queue.push(Mock(), "stale")CODE
HIGH⚡test/runtime/test_draft_page_table_scrub.py108 # Rows 1..3 are padding: their pages are null, so slots are 0.COMMENT
HIGH⚡test/runtime/test_gdn_state_paging.py195 # slot 0 null, slot 1 a pad: a request with history has no block toCOMMENT
HIGHtest/runtime/test_gdn_state_paging.py1082 # Block 0 is null; block 2 holds the prompt-end state, block 3 theCOMMENT
HIGHtest/runtime/test_gdn_state_paging.py1108 # Prefill 8 tokens from the zero state (slot 0 null) into block 2.COMMENT
HIGHtest/runtime/test_l3_factory.py109 model_override_args='{"rope_scaling": null}',CODE
HIGHtest/runtime/test_ascend_dsa_verify.py1348 # Authoritative router slots include null, foreign, owned and invalid IDs.COMMENT
HIGHtest/runtime/grammar_test_utils.py165 return result.type_index == kTVMFFIBool && result.v_int64 != 0 ? 1 : 0;CODE
HIGHtest/runtime/test_server_args_context_parallel.py105 "--kv-parallel-size > 1 requires --disaggregation-mode null, prefill or decode",CODE
HIGHtest/runtime/test_kimi_k3_kda.py216 conv/recurrent component slabs indexed by page id (page 0 = null)."""STRING
HIGHtest/runtime/test_kimi_k3_kda.py777 # Prefill 3 tokens from the zero state (slot 0 null) into the checkpoint block.COMMENT
HIGHtest/runtime/distributed/test_decode_tp_layouts.py558 ``fused_qkv_a_proj_with_mqa`` takes ``[embeds || hidden]``)."""STRING
HIGHtest/ci_system/test_dispatch_workflows.py658 "${{ inputs.commit || inputs.pr || 'main' }}"CODE
HIGHtest/ci_system/test_dispatch_workflows.py1248 " && 30 || inputs.timeout_minutes }}"CODE
HIGHtest/ci_system/test_dispatch_workflows.py1370 "${{ (inputs.pr || inputs.commit) && '1' || '0' }}"CODE
HIGHtest/ci_system/test_dispatch_workflows.py1457 'test "$GFX_ARCH" = gfx1250 || exit 1\n'CODE
HIGHtest/ci_system/slurm_submit.py511nvidia_smi="$(command -v nvidia-smi 2>/dev/null || true)"CODE
HIGH⚡test/ci_system/slurm_submit.py636 if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; thenCODE
HIGH⚡test/ci_system/slurm_submit.py637 kill -TERM "$pid" 2>/dev/null || trueCODE
HIGH⚡test/ci_system/slurm_submit.py640 [ -z "$client_step_pid" ] || wait "$client_step_pid" 2>/dev/null || trueCODE
HIGH⚡test/ci_system/slurm_submit.py641 [ -z "$server_step_pid" ] || wait "$server_step_pid" 2>/dev/null || trueCODE
HIGHtest/ci_system/slurm_submit.py674 kill -0 "$client_step_pid" 2>/dev/null; doCODE
HIGHtest/ci_system/slurm_submit.py679if ! kill -0 "$server_step_pid" 2>/dev/null; thenCODE
HIGHtest/ci_system/test_package_cache.py53 'configure_package_cache >/dev/null; printf "%s|%s|%s" "${PIP_CACHE_DIR}" "${CI_WHEEL_CACHE_DIR}" "${CI_CCACHE_DCODE
HIGHtest/ci_system/test_package_cache.py76 'configure_package_cache >/dev/null; printf "%s|%s|%s" "${PIP_CACHE_DIR}" "${CI_WHEEL_CACHE_DIR}" "${CI_CCACHE_DCODE
HIGHtest/ci_system/test_package_cache.py121 "configure_nvcc_cache >/dev/null; "CODE
HIGHtest/ci_system/test_package_cache.py172 "configure_nvcc_cache >/dev/null 2>/dev/null; "CODE
HIGH⚡test/ci_system/pipeline.py739 "sudo apt-get update -q && sudo apt-get install -y lsof; "CODE
HIGH⚡test/ci_system/pipeline.py741 f"pids=$(lsof -tiTCP:{port} -sTCP:LISTEN 2>/dev/null || true); "CODE
HIGH⚡test/ci_system/pipeline.py744 "kill -TERM $pids 2>/dev/null || true; "CODE
HIGH⚡test/ci_system/pipeline.py746 f"pids=$(lsof -tiTCP:{port} -sTCP:LISTEN 2>/dev/null || true); "CODE
HIGH⚡test/ci_system/pipeline.py747 'if [ -n "$pids" ]; then kill -KILL $pids 2>/dev/null || true; fi; 'CODE
HIGHtest/ci_system/pipeline.py697 f'pkill -{signal_name} -f "{pattern}" 2>/dev/null || true',CODE
HIGHtest/ci_system/test_worker_cleanup.py14if kill -0 "$worker" 2>/dev/null; thenCODE
HIGHpython/tokenspeed/runtime/grammar/grammar_host.py478 if (matcher.stop_token_ids.count(token) || token < 0 || token >= vocab_size_) {CODE
HIGH…/runtime/layers/attention/backends/state/checkpoint.py210 pad, ``0`` null). Wider rows are accepted and read at slots 0/1.STRING
HIGHpython/tokenspeed/runtime/cache/l2/executor.py898 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py965 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1002 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1147 self._completions.push(CODE
HIGHpython/tokenspeed/runtime/utils/server_args.py243 "--kv-parallel-size > 1 requires --disaggregation-mode null, prefill "CODE
HIGHpython/tokenspeed/runtime/utils/server_args.py3887 help="Specify tp size for MoE part, default equals nprocs-per-node, if non dp_attn && combine_dense mode, thCODE
HIGHpython/tokenspeed/runtime/models/llama_eagle3.py92 the [embed || hidden] concat) and ``forward`` (= qkv_proj + o_projSTRING
HIGHpython/tokenspeed/runtime/models/deepseek_v3.py2683 concatenated [embeds || hidden_states] as input.STRING
HIGHpython/tokenspeed/runtime/execution/drafter/mtp.py171 prefix). Deeper depths are rolls of [window || drafts], built by theSTRING
HIGHpython/tokenspeed/runtime/execution/drafter/mtp.py199 rows the stash. Over [stash || fresh] both cases are one gather atSTRING
HIGHpython/tokenspeed/runtime/execution/drafter/eagle.py299 ``[prefill_part || decode_part]`` under MIXED, full prefill chunksSTRING
16 more matches not shown…
Empty Error Handlers72 hits · 360 pts
SeverityFileLineSnippetContext
HIGH…t/long_context_benchmark/tokenspeed/collect_outputs.py63except (TypeError, ValueError):CODE
HIGH…t/long_context_benchmark/tokenspeed/collect_outputs.py53except (TypeError, ValueError):CODE
HIGHtest/runtime/run_deepseek_v41_eval.py223except (URLError, TimeoutError):CODE
HIGHtest/runtime/run_deepseek_v41_eval.py327except psutil.NoSuchProcess:CODE
HIGHtest/runtime/run_deepseek_v41_eval.py333except psutil.NoSuchProcess:CODE
HIGHtest/runtime/test_startup_process_ownership.py181except psutil.NoSuchProcess:CODE
HIGHtest/runtime/test_startup_process_ownership.py179except psutil.NoSuchProcess:CODE
HIGHtest/runtime/test_numerics_mode.py553except Rollback:CODE
HIGHtest/runtime/distributed/test_deepseek_v41_pd_1p1d.py96except Exception:CODE
HIGHtest/runtime/distributed/test_qwen35_epd_1e1p2d.py149except Exception:CODE
HIGHtest/runtime/distributed/test_qwen35_epd_1e1p2d.py77except Exception:CODE
HIGHtest/runtime/models/test_kimi_models.py103except Exception:CODE
HIGHtest/runtime/models/test_qwen35_vlm_e2e.py117except Exception:CODE
HIGHtest/runtime/models/test_qwen35_vlm_e2e.py195except subprocess.TimeoutExpired:CODE
HIGHtest/runtime/models/test_kimi_k3_eagle3_e2e.py50except requests.RequestException:CODE
HIGHtest/runtime/models/test_gpt_oss.py81except Exception:CODE
HIGHtest/ci_system/process_group_manager.py79except (ProcessLookupError, PermissionError):CODE
HIGHtest/ci_system/pipeline.py1776except subprocess.TimeoutExpired:CODE
HIGHtest/ci_system/pipeline.py1729except (URLError, ConnectionError, TimeoutError):CODE
HIGHtest/ci_system/npu/run_phase.py87except ProcessLookupError:CODE
HIGHtest/ci_system/npu/run_phase.py91except subprocess.TimeoutExpired:CODE
HIGHtest/ci_system/npu/run_phase.py96except ProcessLookupError:CODE
HIGHtest/cli/test_serve_smg_unit.py1424except SystemExit:CODE
HIGHtest/cli/test_serve_smg_integration.py60except (urllib.error.URLError, ConnectionError, TimeoutError):CODE
HIGHpython/tokenspeed/_logging.py109except Exception:CODE
HIGHpython/tokenspeed/runtime/cache/l2/executor.py1183except BaseException:CODE
HIGH…tokenspeed/runtime/utils/torch_memory_saver_adapter.py32except ImportError:CODE
HIGHpython/tokenspeed/runtime/utils/startup_timing.py56except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/common.py745except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py86except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py94except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py118except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py125except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/network.py132except Exception:CODE
HIGHpython/tokenspeed/runtime/utils/process.py94except psutil.NoSuchProcess:CODE
HIGHpython/tokenspeed/runtime/utils/process.py105except psutil.NoSuchProcess:CODE
HIGHpython/tokenspeed/runtime/models/dflash.py567except TypeError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v41_engram.py401except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v41_engram.py405except ValueError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v41_engram.py365except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/models/deepseek_v41.py1364except NoKernelFoundError:CODE
HIGHpython/tokenspeed/runtime/multimodal/shm_transport.py273except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/multimodal/shm_transport.py270except FileNotFoundError:CODE
HIGHpython/tokenspeed/runtime/execution/drafter/__init__.py129except ValueError:CODE
HIGHpython/tokenspeed/runtime/entrypoints/wire_driver.py256except ProcessLookupError:CODE
HIGHpython/tokenspeed/runtime/engine/rust_host.py231except subprocess.TimeoutExpired:CODE
HIGHpython/tokenspeed/cli/serve_smg.py1028except ImportError:CODE
HIGHpython/tokenspeed/cli/serve_smg.py1049except ImportError:CODE
HIGHpython/tokenspeed/cli/serve_smg.py904except NotImplementedError:CODE
HIGHtokenspeed-kernel/test/test_kimi_prefill_ops.py92except Exception:CODE
HIGHtokenspeed-kernel/python/setup.py196except AttributeError:CODE
HIGHtokenspeed-kernel/python/setup.py183except OSError:CODE
HIGHtokenspeed-kernel/python/setup.py607except Exception:CODE
HIGHtokenspeed-kernel/python/setup.py737except ImportError:CODE
HIGHtokenspeed-kernel/python/setup.py758except ImportError:CODE
HIGHtokenspeed-kernel/python/tokenspeed_kernel/platform.py56except Exception:CODE
HIGHtokenspeed-kernel/python/tokenspeed_kernel/platform.py699except Exception:CODE
HIGHtokenspeed-kernel/python/tokenspeed_kernel/_triton.py189except ValueError:CODE
HIGH…kenspeed-kernel/python/tokenspeed_kernel/ops/tuning.py469except FileNotFoundError:CODE
HIGH…thon/tokenspeed_kernel/ops/attention/dsa/flashinfer.py57except ImportError:CODE
12 more matches not shown…
Docstring Block Structure69 hits · 345 pts
SeverityFileLineSnippetContext
HIGHpython/tokenspeed/runtime/hf_hub_retry.py58Run ``call``, retrying Hugging Face Hub 429 rate limits. The hub answers an exhausted rate-limit window with 429 anSTRING
HIGHpython/tokenspeed/runtime/layers/logits_processor.py928Logprob of each named prompt row's next token, position-chunked. The rows (``logits_metadata.input_logprob_rowsSTRING
HIGHpython/tokenspeed/runtime/layers/layernorm.py649A pre/post ("sandwich") norm boundary on a reduced sublayer output. ``a = post_norm(x)``, then ``residual_out = RN(STRING
HIGHpython/tokenspeed/runtime/layers/layernorm.py728All-reduce a sublayer partial and run the sandwich boundary on the sum. The helper a model calls where a tensor-parSTRING
HIGH…n/tokenspeed/runtime/layers/attention/dcp/placement.py101Count, on the host, how many history rows of each request every rank owns. The query-context-parallel history gatheSTRING
HIGH…n/tokenspeed/runtime/layers/attention/dcp/placement.py170Count, on the host, how many rows of every prefix chunk each rank owns. Prefix-chunk loop ``j`` reads rows ``[j * cSTRING
HIGH…untime/layers/attention/backends/specific/qwen4_exp.py79Build the consumers whose fields belong to this cache view. Args: config: This side's attention conSTRING
HIGH…/runtime/layers/attention/backends/state/checkpoint.py103Resolve this forward's in-forward State checkpoints, if any. Args: checkpoint_lens_cpu: Host ``[>= num_exteSTRING
HIGH…speed/runtime/layers/attention/backends/state/mamba.py153Host prefix sum of the scheduler's extend lengths, as an int64 tensor. The contents must equal ``query_start_loc`` STRING
HIGH…speed/runtime/layers/attention/backends/state/utils.py27Return the physical state-row stride in int32 words for batched copies. Args: tensor: State rows with a nonSTRING
HIGH…ed/runtime/layers/attention/kv_cache/virtual_blocks.py48Translate scheduler blocks to owned local pages, keeping the owner mask. Args: virtual_blocks: Scheduler blSTRING
HIGH…n/tokenspeed/runtime/layers/attention/kv_cache/base.py65Map each recurrent layer to the state group holding its fields. The memory plan is the single record of which groupSTRING
HIGH…n/tokenspeed/runtime/layers/attention/kv_cache/base.py117Map each attention layer to the history group holding its KV. The counterpart of :func:`derive_state_groups_by_layeSTRING
HIGH…/tokenspeed/runtime/layers/attention/kv_cache/arena.py336Return one planned field's view into the arena. The view is shaped the way the field is addressed. A history fiSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/plan.py64Return the plan-facing name of the dtype the arena views bytes as. Args: dtype: A ``torch.dtype`` or an alrSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/plan.py99Return the byte width of one element of a plan dtype name. Args: dtype_name: A name produced by :func:`cachSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/plan.py716Pack declared cache groups into one capacity-independent LCM block. The second stage of the pipeline: ``group`` saySTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/spec.py359Normalize either window spelling to one entry per layer. Args: sliding_window_tokens: A scalar window to brSTRING
HIGH…peed/runtime/layers/attention/kv_cache/recipes/spec.py541Walk the layers once, building each group whole. A cache group has two halves -- the scheduler-facing spec and the STRING
HIGH…ime/layers/attention/kv_cache/recipes/cache_runtime.py39Validate that ``value`` is a positive, non-boolean integer. Args: name: Field name used in the error messagSTRING
HIGH…pressed_tensors/schemes/compressed_tensors_w8a8_fp8.py148The FP8 codes' product with an FP8 weight, unscaled, in BF16. The per-tensor FP8 GEMM the registry selects (a vendoSTRING
HIGHpython/tokenspeed/runtime/cache/transfer/lanes.py160The static field geometry one executor's transfers share. One row per field in consumer (layer) order, each naming STRING
HIGHpython/tokenspeed/runtime/distributed/pp_stage.py46All stages' [start, end) layer windows. The single source of the stage-split arithmetic: the model build, the KV STRING
HIGHpython/tokenspeed/runtime/distributed/pp_stage.py101Map stage execution windows to the target cache-layer namespace. Stage windows partition execution blocks (decoder STRING
HIGHpython/tokenspeed/runtime/distributed/comm_manager.py191Per-rank rows of the head group for one leg of the head-TP exchange. Head TP shards the head projections over ranksSTRING
HIGHpython/tokenspeed/runtime/utils/spec_block_geometry.py138Derive the launch widths a checkpoint block size implies. Args: algorithm: ``"DSPARK"`` or ``"DFLASH"`` (DFSTRING
HIGHpython/tokenspeed/runtime/utils/process.py169Receive one message per reader, failing when any child exits or closes its pipe. ``readers[i]`` is the ready pipe oSTRING
HIGHpython/tokenspeed/runtime/utils/launcher.py116Return the first hostname of a Slurm-compressed hostlist. Args: hostlist: A hostlist such as ``cn10``, ``cnSTRING
HIGHpython/tokenspeed/runtime/utils/launcher.py293Derive the multi-node topology from the launcher environment. Args: env: Environment mapping to read; defauSTRING
HIGHpython/tokenspeed/runtime/execution/device.py924Check a weight load's local prerequisites without changing anything. The control plane MIN-reduces this result STRING
HIGHpython/tokenspeed/runtime/execution/device.py967Apply one in-place RL weight-sync request, ordered against forwards. Type-dispatched on the request — join the STRING
HIGHpython/tokenspeed/runtime/execution/model_executor.py255Return the stage's DSpark context producer, or None when nothing is produced. A DSpark draft reads target taps thatSTRING
HIGH…thon/tokenspeed/runtime/execution/accept_simulation.py40Validate the simulated tokens per verify step. Args: value: Raw ``TOKENSPEED_SPEC_SIMULATED_ACCEPT_LEN``; eSTRING
HIGHpython/tokenspeed/runtime/execution/query_shard.py61How many of the sorted batch-global ``rows`` fall in each rank's shard. The one row split of a query shard: the samSTRING
HIGHpython/tokenspeed/runtime/execution/query_shard.py240How many of ``rows`` fall in each rank's shard. The split a collective over those rows needs (the prompt-logproSTRING
HIGHpython/tokenspeed/runtime/execution/query_shard.py269Per-rank row counts of the rows a collective moves. A model that reports a collective sizing (``report_collectiSTRING
HIGHpython/tokenspeed/runtime/execution/drafter/dflash.py72Resolve (verify_width, draft_block_size) for a block drafter. Args: cfg: The draft model's config. STRING
HIGHpython/tokenspeed/runtime/engine/rank_setup.py165The longest request and the longest prompt this rank admits. Args: context_len: The model's context length.STRING
HIGHpython/tokenspeed/runtime/engine/scheduler_utils.py553Bridge the per-group block tables to GPU int32 tensors: absolute page indices, null hole = 0 preserved, ragged-row pSTRING
HIGHpython/tokenspeed/runtime/engine/zmq_wire.py212Map a tokenspeed/torch dtype onto SMG's wire dtype enum string. Args: dtype: A torch dtype or its string foSTRING
HIGHpython/tokenspeed/cli/trace_merge.py267Merge a Proton chrome trace into a VizTracer report. Shifts every Proton event by the difference between the two fiSTRING
HIGHpython/tokenspeed/cli/trace_merge.py303Merge and align Proton/VizTracer trace pairs from several TP ranks. Every input pair is first aligned using its ownSTRING
HIGH…ernel/python/tokenspeed_kernel/benchmark/validation.py92Return the output validator registered under ``name``. Args: name: Validator name from an output validationSTRING
HIGH…peed_kernel/ops/attention/rmha/_cute_dsl/score_mods.py54Build a memoized FA4 score_mod adding a learned relative-position bias. The returned closure adds ``rel_logits[globSTRING
HIGH…python/tokenspeed_kernel/ops/attention/dsa/cute_dsl.py95Length-aware per-row top-k over a dense indexer-logits matrix. Args: logits: 2-D row-major contiguous CUDA STRING
HIGH…python/tokenspeed_kernel/ops/attention/dsa/__init__.py336Select, without running it, the ``dsa_prefill_topk`` leaf for index keys handed as rows in workspace-row order of ``STRING
HIGH…l/python/tokenspeed_kernel/ops/attention/gdn/triton.py1294Replay all GDN layers and write their final accepted states. This portable Triton implementation is shared by everySTRING
HIGH…n/tokenspeed_kernel/ops/attention/gdn/_triton/chunk.py145 Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, KSTRING
HIGH…on/tokenspeed_kernel/ops/layernorm/qk_rmsnorm_ssmax.py209The kernel :func:`qk_rmsnorm_ssmax` runs for this call; nothing is launched. Args: q, k, q_weight, k_weightSTRING
HIGH…on/tokenspeed_kernel/ops/layernorm/qk_rmsnorm_ssmax.py336Normalize the q and k heads and scale q by position through ``layernorm.qk_rmsnorm_ssmax``. Args: q: ``[...STRING
HIGH…on/tokenspeed_kernel/ops/layernorm/qk_rmsnorm_ssmax.py651One launch of the shared Q/K RMSNorm kernel with the SSMax fold on an admitted call; raise otherwise. ``dequant`` foSTRING
HIGH…rnel/python/tokenspeed_kernel/ops/activation/triton.py1695``(x.float() / cap).tanh() * cap`` in one pass, byte for byte. The FP32 statement is three elementwise kernels afteSTRING
HIGH…rnel/python/tokenspeed_kernel/ops/sampling/cute_dsl.py1006Build the cross-rank argmax state, requiring NVLS multicast. Args: group: The process group the argmax reduSTRING
HIGH…/tokenspeed_kernel/ops/sampling/triton/dspark_block.py239Score this rank's vocabulary shard for one block step. Args: base_logits: ``[rows, block, local_vocab]`` FPSTRING
HIGH…/tokenspeed_kernel/ops/sampling/triton/dspark_block.py352Write the winners of the gathered ``candidates`` into ``output[:, step]``. Args: candidates: ``[tp, rows, nSTRING
HIGH…hon/tokenspeed_kernel/ops/sampling/triton/spec_path.py73Walk the lattice one locally best edge at a time. Args: candidate_ids: ``[batch, num_steps, top_k]`` candidSTRING
HIGH…l/python/tokenspeed_kernel/ops/conv/_triton/grouped.py91Convolve packed blocks with per-row, per-group dynamic coefficients. Args: x: Input rows ``[T, C]`` packed STRING
HIGH…-kernel/python/tokenspeed_kernel/ops/kvcache/triton.py971Build batched verify-commit row ids for :func:`copy_state_rows`. Sinks the ``arange``/``clamp``/``where`` chain thaSTRING
HIGH…-kernel/python/tokenspeed_kernel/ops/kvcache/triton.py1589Normalize, rotate and scatter every layer's latent KV in one launch. Each ``[kv_lora_rank + rope_dim]`` row is RMSNSTRING
HIGH…el/python/tokenspeed_kernel/ops/quantization/triton.py885``silu_and_mul_quantize_fp8`` in one launch with one program per row. Each element is the scaled GEMM's 16-bit outpSTRING
9 more matches not shown…
Excessive Try-Catch Wrapping198 hits · 237 pts
SeverityFileLineSnippetContext
LOWtest/ci/npu/tests/scatter-test.py214 except Exception as exc: # pragma: no cover - device dependentCODE
LOWtest/ci/npu/tests/scatter-test.py333 except Exception as exc: # pragma: no cover - device dependentCODE
LOWtest/ci/npu/tests/virtual_slots_to_local-test.py230 except Exception as exc: # pragma: no cover - device dependentCODE
LOWtest/ci/npu/tests/virtual_slots_to_local-test.py359 except Exception as exc: # pragma: no cover - device dependentCODE
LOWtest/runtime/test_inkling_load_weights.py563 except Exception as e: # pragma: no cover - environment specificCODE
LOWtest/runtime/distributed/test_deepseek_v41_pd_1p1d.py96 except Exception:CODE
LOWtest/runtime/distributed/test_qwen35_epd_1e1p2d.py77 except Exception:CODE
LOWtest/runtime/distributed/test_qwen35_epd_1e1p2d.py149 except Exception:CODE
LOWtest/runtime/distributed/test_dp_sampling_swap.py41 except Exception:CODE
MEDIUMtest/runtime/distributed/test_dp_sampling_swap.py23def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
LOWtest/runtime/distributed/test_named_process_groups.py88 except Exception: # pragma: no cover - reported to the parentCODE
LOW…ime/distributed/test_batch_invariant_max_all_reduce.py44 except Exception:CODE
LOW…runtime/distributed/test_batch_invariant_all_reduce.py65 except Exception:CODE
MEDIUM…runtime/distributed/test_batch_invariant_all_reduce.py62def worker_fn(rank, world_size, port, attn_tp, error_dict):CODE
LOW…t/runtime/distributed/test_vocab_parallel_topk_nccl.py201 except Exception:CODE
MEDIUM…t/runtime/distributed/test_vocab_parallel_topk_nccl.py183def _worker(rank, world_size, port, test_fn, error_dict):CODE
MEDIUMtest/runtime/distributed/test_dp_sampling_comm.py29def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
MEDIUMtest/runtime/distributed/test_dp_sampling_comm.py66def _onesided_available_for_test(group) -> bool:CODE
LOW⚡test/runtime/distributed/test_dp_sampling_comm.py69 except Exception:CODE
LOWtest/runtime/distributed/test_dp_sampling_comm.py47 except Exception:CODE
LOW⚡test/runtime/distributed/test_comm_manager.py81 except Exception as e:CODE
LOWtest/runtime/distributed/test_comm_manager.py310 except Exception:CODE
MEDIUMtest/runtime/distributed/test_comm_manager.py76def worker_fn(CODE
MEDIUMtest/runtime/distributed/test_comm_manager.py307def _qcp_worker(rank, port, error_dict):CODE
LOWtest/runtime/distributed/test_qcp_prompt_logprobs.py60 except Exception: # pragma: no cover - reported to the parentCODE
LOW…t/runtime/distributed/test_eagle4_candidate_head_tp.py179 except Exception:CODE
MEDIUM…t/runtime/distributed/test_eagle4_candidate_head_tp.py162def _worker(rank, world_size, port, error_dict):CODE
LOWtest/runtime/distributed/test_qcp_history_gather.py133 except Exception: # pragma: no cover - reported to the parentCODE
LOWtest/runtime/distributed/test_qcp_history_gather.py413 except Exception: # pragma: no cover - reported to the parentCODE
MEDIUMtest/runtime/distributed/test_comm_ops.py380def worker_fn(rank, world_size, port, test_fn, error_dict):CODE
LOW⚡test/runtime/distributed/test_comm_ops.py383 except Exception:CODE
LOWtest/runtime/sampling/test_flashinfer_verify_dp.py67 except Exception:CODE
MEDIUMtest/runtime/sampling/test_flashinfer_verify_dp.py49def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
LOWtest/runtime/sampling/test_dp_sampling_logits_verify.py80 except Exception:CODE
MEDIUMtest/runtime/sampling/test_dp_sampling_logits_verify.py62def _worker_main(rank, world_size, port, test_fn, error_dict, args):CODE
LOWtest/runtime/models/test_kimi_models.py103 except Exception:CODE
LOWtest/runtime/models/test_qwen35_vlm_e2e.py117 except Exception:CODE
LOWtest/runtime/models/test_qwen35_vlm_e2e.py128 except Exception as exc: # noqa: BLE001CODE
MEDIUMtest/runtime/models/test_qwen35_vlm_e2e.py125def setup_class(cls):CODE
LOWtest/runtime/models/test_gpt_oss.py81 except Exception:CODE
LOWtest/ci_system/pipeline.py2135 except Exception as exc:CODE
LOWtest/ci_system/pipeline.py2165 except Exception as exc:CODE
LOWtest/ci_system/kernel_benchmark_ci.py1108 except Exception as exc: # noqa: BLE001 - failures must become CI artifactsCODE
LOWtest/ci_system/npu/run_phase.py160 except Exception as exc:CODE
LOWtest/ci_system/npu/run_phase.py232 except Exception as exc:CODE
LOW⚡test/ci_system/npu/run_phase.py377 except Exception as summary_error:CODE
LOW⚡test/ci_system/npu/run_phase.py380 except Exception as exc:CODE
LOW⚡test/ci_system/npu/run_phase.py386 except Exception as summary_error:CODE
LOWtest/ci_system/npu/reporting.py601 except Exception as exc:CODE
MEDIUMtest/ci_system/npu/reporting.py62def decode_record(text):CODE
LOWpython/tokenspeed/_logging.py77 except Exception:CODE
LOWpython/tokenspeed/_logging.py109 except Exception:CODE
LOWpython/tokenspeed/runtime/metrics/service.py62 except Exception:CODE
LOWpython/tokenspeed/runtime/metrics/service.py88 except Exception:CODE
LOWpython/tokenspeed/runtime/metrics/service.py156 except Exception:CODE
LOWpython/tokenspeed/runtime/metrics/service.py194 except Exception:CODE
LOWpython/tokenspeed/runtime/epd/encode_host.py389 except Exception as error: # noqa: BLE001 - fails this batch's rooms onlyCODE
LOWpython/tokenspeed/runtime/layers/logits_processor.py309 except Exception:CODE
LOWpython/tokenspeed/runtime/layers/vocab_parallel_topk.py167 except Exception as exc: # noqa: BLE001CODE
LOWpython/tokenspeed/runtime/cache/l3/identity.py344 except Exception:CODE
138 more matches not shown…
AI Structural Patterns210 hits · 194 pts
SeverityFileLineSnippetContext
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/moe.py421CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py103CODE
LOW…eed-kernel-npu/python/tokenspeed_kernel_npu/ops/mha.py153CODE
LOWtest/runtime/conftest.py30CODE
LOWtest/runtime/test_drafter_accept_indexing.py88CODE
LOWtest/runtime/test_dp_sampling_routing_metadata.py49CODE
LOWtest/runtime/cache_pd_test_utils.py76CODE
LOWtest/runtime/layers/test_mla_verify_metadata.py20CODE
LOWtest/ci_system/pipeline.py1859CODE
LOWtest/ci_system/test_kernel_benchmark_comment.py109CODE
LOWpython/tokenspeed/runtime/layers/linear.py380CODE
LOWpython/tokenspeed/runtime/layers/linear.py561CODE
LOWpython/tokenspeed/runtime/layers/linear.py812CODE
LOWpython/tokenspeed/runtime/layers/linear.py1169CODE
LOW…/tokenspeed/runtime/layers/vocab_parallel_embedding.py270CODE
LOW…/tokenspeed/runtime/layers/vocab_parallel_embedding.py682CODE
LOW…speed/runtime/layers/attention/mm_encoder_attention.py352CODE
LOW…thon/tokenspeed/runtime/layers/attention/dsa/ascend.py318CODE
LOWpython/tokenspeed/runtime/layers/moe/expert.py71CODE
LOWpython/tokenspeed/runtime/layers/moe/expert.py683CODE
LOWpython/tokenspeed/runtime/layers/moe/latent.py241CODE
LOWpython/tokenspeed/runtime/layers/moe/latent.py532CODE
LOWpython/tokenspeed/runtime/layers/moe/loader.py605CODE
LOWpython/tokenspeed/runtime/layers/moe/loader.py370CODE
LOWpython/tokenspeed/runtime/layers/moe/topk.py458CODE
LOWpython/tokenspeed/runtime/distributed/mapping.py608CODE
LOWpython/tokenspeed/runtime/models/glm5.py264CODE
LOWpython/tokenspeed/runtime/models/kimi_k3.py370CODE
LOWpython/tokenspeed/runtime/models/kimi_k3.py2357CODE
LOWpython/tokenspeed/runtime/models/gpt_oss.py116CODE
LOWpython/tokenspeed/runtime/models/qwen3.py105CODE
LOWpython/tokenspeed/runtime/models/deepseek_v3.py631CODE
LOWpython/tokenspeed/runtime/models/moonvit.py294CODE
LOWpython/tokenspeed/runtime/models/moonvit.py502CODE
LOWpython/tokenspeed/runtime/models/moonvit.py599CODE
LOWpython/tokenspeed/runtime/execution/forward_step.py209CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py156CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py393CODE
LOWpython/tokenspeed/runtime/configs/inkling_config.py460CODE
LOWpython/tokenspeed/runtime/configs/model_config.py654CODE
LOW…thon/tokenspeed/runtime/configs/qwen3_vision_config.py28CODE
LOW…hon/tokenspeed/runtime/configs/nemotron_omni_config.py203CODE
LOW…hon/tokenspeed/runtime/configs/nemotron_omni_config.py275CODE
LOW…on/tokenspeed/runtime/configs/kimi_k3_dspark_config.py53CODE
LOW…tokenspeed/runtime/configs/qwen3_5_text_base_config.py191CODE
LOWpython/tokenspeed/runtime/configs/qwen3_asr_config.py50CODE
LOWpython/tokenspeed/runtime/configs/kimi_k3_config.py60CODE
LOWpython/tokenspeed/runtime/configs/kimi_k3_config.py140CODE
LOWpython/tokenspeed/runtime/configs/qwen3_moe_config.py31CODE
LOWpython/tokenspeed/runtime/configs/qwen4_exp_config.py52CODE
LOWpython/tokenspeed/runtime/configs/qwen4_exp_config.py156CODE
LOWpython/tokenspeed/runtime/configs/qwen3_config.py173CODE
LOWpython/tokenspeed/runtime/configs/kimi_k25_config.py60CODE
LOWpython/tokenspeed/runtime/configs/glm53_flash_config.py41CODE
LOWpython/tokenspeed/runtime/configs/glm53_flash_config.py92CODE
LOWpython/tokenspeed/runtime/configs/glm53_flash_config.py343CODE
LOWpython/tokenspeed/runtime/configs/minimax_m3_config.py62CODE
LOWpython/tokenspeed/runtime/configs/minimax_m3_config.py165CODE
LOWpython/tokenspeed/runtime/engine/scheduler_utils.py105CODE
LOWtokenspeed-kernel/test/ops/test_kda_recurrent.py1697CODE
150 more matches not shown…
Verbosity Indicators61 hits · 90 pts
SeverityFileLineSnippetContext
LOW…enspeed-engine/crates/ts-control/src/eplb/algorithm.rs199 // Step 1: expert groups onto nodes.COMMENT
LOW…enspeed-engine/crates/ts-control/src/eplb/algorithm.rs222 // Step 2: replicate within each node; rows are (layer, node).COMMENT
LOW…enspeed-engine/crates/ts-control/src/eplb/algorithm.rs236 // Step 3: replicas onto the node's GPUs.COMMENT
LOWtest/runtime/test_draft_advance_seqlens.py441# Step 0: the drafter publishes the accepted frontier (vc + N -> vc + a); theCOMMENT
LOW⚡test/ci_system/install_deps.sh124# Step 1: Determine CUDA index and FlashInfer architectureCOMMENT
LOW⚡test/ci_system/install_deps.sh152# Step 2: Upgrade base toolsCOMMENT
LOW⚡test/ci_system/install_deps.sh164# Step 3: Sync FlashInfer JIT cache on Blackwell runnersCOMMENT
LOW⚡test/ci_system/install_deps.sh170# Step 4: Install tokenspeed-kernelCOMMENT
LOW⚡test/ci_system/install_deps.sh196# Step 5: Install TokenSpeed Scheduler (C++)COMMENT
LOW⚡test/ci_system/install_deps.sh212# Step 6: Install TokenSpeedCOMMENT
LOW⚡test/ci_system/install_deps.sh221# Step 7: Optionally override tokenspeed-mla with in-tree sourceCOMMENT
LOW⚡test/ci_system/install_deps.sh235# Step 8: Pin critical kernel deps to exact versionsCOMMENT
LOW⚡test/ci_system/install_deps.sh308# Step 9: Fix Triton ptxas (CUDA 13+ only)COMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py165 # Step 1: pack groups to nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py176 # Step 2: construct redundant experts within nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py185 # Step 3: pack physical_experts to GPUsCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py436 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py477 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py534 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py552 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py619 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py645 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py698 # Step 7: Write final O to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py597 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py736 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py805 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py831 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py953 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py990 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py1048 # Step 7: Write final O to gmem (fake→real via SMEM)COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1564 # Step 0: load tmemCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1618 # Step 1: perform swiglu on the first part, interleave with the second's 32x32 tmem transpose.COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1650 # Step 2: QuantCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1661 # Step 3: TMASTGCOMMENT
LOW⚡…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py1988 # Step 1: coarse-grain spin on ``fc1_done_counter[slot]``COMMENT
LOW…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py2083 # Step 3: K-loop with 2x cute.copy per tile (B +COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py277 # Step 1: Load chunk → smem (convert to ordered)COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py836 # Step 3: Collect output indices and valuesCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1215 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1220 # Step 2: Multi-round radix selectCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py491 # Step 1: Inclusive prefix sum directly on the histogramCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py510 # Step 2: Find threshold bucketCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1367 # Step 3: Collect outputCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py284 # Step 3: Collect output indices and values (cluster variant)COMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py491 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py496 # Step 2: Multi-round radix selectCOMMENT
LOW…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py548 # Step 3: Collect output (cluster barriers)COMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py87 # Step 1: Warp-level prefix sum using shuffleCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py90 # Step 2: Store warp prefix sumsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py95 # Step 3: Prefix sum across warpsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py106 # Step 4: Add warp-level prefixCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py110 # Step 5: Get total sum if need_total_sum is TrueCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2237 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2269 # Step 2: shuffle w1 to the MFMA-tile layout the kernel expects.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2403 # Step 3: materialise scalar / None args as device tensors so theCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2485 # Step 4: launch the GEMM. One CTA per (M-tile, N-tile); the per-CTACOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1775 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1806 # Step 2: shuffle w2 to MFMA-tile layout if the caller didn't.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1818 # Step 3: flatten the (token, slot) axes so each row is one routedCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1964 # Step 5: GEMM. Writes either to `partials` (reduce mode) or directlyCOMMENT
1 more matches not shown…
Structural Annotation Overuse61 hits · 90 pts
SeverityFileLineSnippetContext
LOW…enspeed-engine/crates/ts-control/src/eplb/algorithm.rs199 // Step 1: expert groups onto nodes.COMMENT
LOW…enspeed-engine/crates/ts-control/src/eplb/algorithm.rs222 // Step 2: replicate within each node; rows are (layer, node).COMMENT
LOW…enspeed-engine/crates/ts-control/src/eplb/algorithm.rs236 // Step 3: replicas onto the node's GPUs.COMMENT
LOWtest/runtime/test_draft_advance_seqlens.py441# Step 0: the drafter publishes the accepted frontier (vc + N -> vc + a); theCOMMENT
LOW⚡test/ci_system/install_deps.sh124# Step 1: Determine CUDA index and FlashInfer architectureCOMMENT
LOW⚡test/ci_system/install_deps.sh152# Step 2: Upgrade base toolsCOMMENT
LOW⚡test/ci_system/install_deps.sh164# Step 3: Sync FlashInfer JIT cache on Blackwell runnersCOMMENT
LOW⚡test/ci_system/install_deps.sh170# Step 4: Install tokenspeed-kernelCOMMENT
LOW⚡test/ci_system/install_deps.sh196# Step 5: Install TokenSpeed Scheduler (C++)COMMENT
LOW⚡test/ci_system/install_deps.sh212# Step 6: Install TokenSpeedCOMMENT
LOW⚡test/ci_system/install_deps.sh221# Step 7: Optionally override tokenspeed-mla with in-tree sourceCOMMENT
LOW⚡test/ci_system/install_deps.sh235# Step 8: Pin critical kernel deps to exact versionsCOMMENT
LOW⚡test/ci_system/install_deps.sh308# Step 9: Fix Triton ptxas (CUDA 13+ only)COMMENT
LOW…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py165 # Step 1: pack groups to nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py176 # Step 2: construct redundant experts within nodesCOMMENT
LOW⚡…hon/tokenspeed/runtime/moe/eplb_algorithms/deepseek.py185 # Step 3: pack physical_experts to GPUsCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py436 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py477 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py534 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py552 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py619 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py645 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…rnel/ops/attention/rmha/_cute_dsl/flash_fwd_combine.py698 # Step 7: Write final O to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py597 # Step 1: Load LSE_partial from gmem to shared memoryCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py736 # Step 2: Load O_partial for pipeline stagesCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py805 # Step 3: Load and transpose LSE from smem to registersCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py831 # Step 4: Compute final LSE along split dimensionCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py953 # Step 5: Store final LSE to gmemCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py990 # Step 6: Read O_partial and accumulate final OCOMMENT
LOW⚡…ed_kernel/thirdparty/msa/cute/src/sm100/fwd/combine.py1048 # Step 7: Write final O to gmem (fake→real via SMEM)COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1564 # Step 0: load tmemCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1618 # Step 1: perform swiglu on the first part, interleave with the second's 32x32 tmem transpose.COMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1650 # Step 2: QuantCOMMENT
LOW…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1661 # Step 3: TMASTGCOMMENT
LOW⚡…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py1988 # Step 1: coarse-grain spin on ``fc1_done_counter[slot]``COMMENT
LOW…eed_kernel/thirdparty/cute_dsl/mega_moe/kernel_fc12.py2083 # Step 3: K-loop with 2x cute.copy per tile (B +COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py277 # Step 1: Load chunk → smem (convert to ordered)COMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py836 # Step 3: Collect output indices and valuesCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1215 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1220 # Step 2: Multi-round radix selectCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py491 # Step 1: Inclusive prefix sum directly on the histogramCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py510 # Step 2: Find threshold bucketCOMMENT
LOW…ute_dsl/topk/top_k/single_pass_multi_cta_radix_topk.py1367 # Step 3: Collect outputCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py284 # Step 3: Collect output indices and values (cluster variant)COMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py491 # Step 1: Load chunk to smem as orderedCOMMENT
LOW⚡…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py496 # Step 2: Multi-round radix selectCOMMENT
LOW…topk/top_k/single_pass_multi_cta_radix_topk_cluster.py548 # Step 3: Collect output (cluster barriers)COMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py87 # Step 1: Warp-level prefix sum using shuffleCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py90 # Step 2: Store warp prefix sumsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py95 # Step 3: Prefix sum across warpsCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py106 # Step 4: Add warp-level prefixCOMMENT
LOW⚡…ed_kernel/thirdparty/cute_dsl/topk/top_k/block_scan.py110 # Step 5: Get total sum if need_total_sum is TrueCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2237 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2269 # Step 2: shuffle w1 to the MFMA-tile layout the kernel expects.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2403 # Step 3: materialise scalar / None args as device tensors so theCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage1.py2485 # Step 4: launch the GEMM. One CTA per (M-tile, N-tile); the per-CTACOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1775 # Step 1: validate inputs and reject unsupported modes.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1806 # Step 2: shuffle w2 to MFMA-tile layout if the caller didn't.COMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1818 # Step 3: flatten the (token, slot) axes so each row is one routedCOMMENT
LOW…peed_kernel_amd/ops/gfx950/moe/mxfp4/prefill_stage2.py1964 # Step 5: GEMM. Writes either to `partials` (reduce mode) or directlyCOMMENT
1 more matches not shown…
Hallucination Indicators6 hits · 70 pts
SeverityFileLineSnippetContext
CRITICALtest/runtime/test_dspark_proposal.py205 drafter.markov_head.markov_w2.weight.data.zero_()CODE
CRITICALtest/runtime/test_dspark_proposal.py235 drafter.markov_head.markov_w1.weight.data.normal_(0.0, 3.0)CODE
CRITICALtest/runtime/test_dspark_proposal.py236 drafter.markov_head.markov_w2.weight.data.normal_(0.0, 3.0)CODE
CRITICAL⚡test/runtime/test_qwen4_exp.py3590 device.lookup.ngram_embedding.weight.data.copy_(payload)CODE
CRITICAL⚡test/runtime/test_qwen4_exp.py3591 host.lookup.ngram_embedding.weight.data.copy_(payload.cpu())CODE
CRITICAL…n/tokenspeed_kernel/ops/attention/gdn/_triton/utils.py149 triton.runtime.driver.active.utils.get_device_properties(i)[CODE
AI Slop Vocabulary14 hits · 40 pts
SeverityFileLineSnippetContext
MEDIUMtest/runtime/test_kda_state_eviction_spec.py134 # harness, with the complete unmodified scheduler tables supplied here.COMMENT
MEDIUMtest/runtime/test_gdn_token_level_hit_resume.py228 # projects a fresh one per forward, this harness replays a stream.COMMENT
MEDIUMtest/runtime/test_inkling_activation_parity.py328 # (bind_cache_groups); this harness plans a plain pool and hand-bindsCOMMENT
MEDIUMtest/runtime/test_eagle_harness_config.py81 # A harness chain takes the draft-tree path with one child per node.COMMENT
MEDIUM…eed/runtime/execution/drafter/eagle_harness/drafter.py368 # The harness files decide each round's collectives: the TP ranks take the first rank's read.COMMENT
MEDIUM…kernel/test/benchmark/test_benchmark_gemm_generator.py257 # The harness routes quant="none" through prepare_mm to the dense generator,COMMENT
MEDIUMtokenspeed-kernel/python/tokenspeed_kernel/selection.py1013 # comprehensive warmup should pass explicit op signatures.COMMENT
MEDIUM…l/ops/attention/rmha/_cute_dsl/flash_fwd_sm100_bias.py1560 # CLC buffers placed here to utilize padding before sO's 1024-byte alignment.COMMENT
LOW…on/tokenspeed_kernel/ops/conv/_triton/causal_conv1d.py186 # first chunk and does not have prior-token, so just set to 0COMMENT
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py998 _EpilogueTokenTileSize = 64 # Fundamentally the epi_tile_nCODE
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py999 _EpilogueFc1IntermediateGateUpTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1000 _EpilogueFc1IntermediateDownTileSize = 64 # Fundamentally epi_tile_m // 2CODE
MEDIUM⚡…rnel/thirdparty/cute_dsl/mega_moe/epilogue_refactor.py1001 _EpilogueFc2HiddenTileSize = 128 # Fundamentally epi_tile_mCODE
MEDIUM…peed-mla/python/tokenspeed_mla/mla_decode_fp8_sm107.py8441 # H and Q are contiguous in the harness's (B,Q,H,D) allocation.COMMENT
Self-Referential Comments10 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUM…nel/python/tokenspeed_kernel/ops/communication/nccl.py22# This file is a pure Python wrapper for the NCCL library.COMMENT
MEDIUM…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py44# This file is copied and modified from cutlass example https://github.com/NVIDIA/cutlass/blob/main/examples/python/CuTeCOMMENT
MEDIUM…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py124 """This class implements batched matrix multiplication (C = (SFA * A) * (SFB * B)) with support for fp8 (e4m3fn,STRING
MEDIUM…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py115 """This class implements batched matrix multiplication (C = A x SFA x B x SFB) with support for various data typesSTRING
MEDIUM…python/tokenspeed_kernel/thirdparty/cute_dsl/argmax.py18# This file contains code derived from the Quack library:COMMENT
MEDIUM…speed_kernel/thirdparty/cute_dsl/mega_moe/moe_utils.py189 # Create a new cute.Pointer with generic address space, preserving alignmentCOMMENT
MEDIUM…speed_kernel/thirdparty/cute_dsl/mega_moe/moe_utils.py217 # Create a new cute.Pointer with gmem address space, preserving alignmentCOMMENT
MEDIUM…on/tokenspeed_kernel/thirdparty/cute_dsl/topk/utils.py48# This file is copied and modified from cutlass https://github.com/NVIDIA/cutlass/blob/main/python/CuTeDSL/cutlass/cute/COMMENT
MEDIUM…on/tokenspeed_kernel/thirdparty/cute_dsl/topk/utils.py177 # Create a numpy arraySTRING
MEDIUMtokenspeed-mla/python/tokenspeed_mla/utils.py219 # Create a numpy arraySTRING
Modern AI Meta-Vocabulary5 hits · 13 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md36- [2026/08] [Qwen3.8 Flash Next](https://developer.nvidia.com/blog/experiment-with-qwen3-8-flash-next-176b-model-on-nvidCODE
MEDIUMREADME.md42- [2026/05] 🚀 TokenSpeed hits 580 TPS on Qwen3.5-397B-A17B for agentic workloads. [[PyTorch blog](https://pytorch.org/blCODE
MEDIUMtest/cli/test_serve_smg_integration.py183 # exercises orchestration/teardown, not tokenizer loading.COMMENT
MEDIUMtest/agentic_benchmark/Qwen3.8-Flash-Next/README.md1# Qwen3.8-Flash-Next NVFP4 agentic benchmarkCOMMENT
MEDIUMpython/tokenspeed/runtime/models/kimi_k3_nextn.py438 # NextN scaffolding around the decoder layer.COMMENT
Redundant / Tautological Comments8 hits · 12 pts
SeverityFileLineSnippetContext
LOWtest/runners.py311 # Check if the text is empty or only whitespace.COMMENT
LOWtest/runners.py427 # Check if the text is empty or only whitespace.COMMENT
LOWtest/ci_system/ci_utils.py232 # Check if we should retryCOMMENT
LOW…/communication/_cute_dsl/fused_tp_projection_kernel.py611 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…kenspeed_kernel/thirdparty/trtllm_blockwise/_kernel.py442 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…l/thirdparty/cute_dsl/nvfp4_gemm_swiglu_nvfp4_quant.py490 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…hon/tokenspeed_kernel/thirdparty/cute_dsl/hc_up_mix.py250 # Check if input data types are compatible with MMA instructionCOMMENT
LOW…arty/cute_dsl/topk/top_k/filtered_top_k_varlen_util.py1236 # Check if the number of valid indices matchesCOMMENT
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/runners.py302 # make sure to disable compileCOMMENT
LOW…/python/tokenspeed_kernel/ops/communication/deep_ep.py687 # Please make sure to change DeepEP code in internode_ll.cu dispatch / combine as below first and then reinstallSTRING
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMpython/tokenspeed/runtime/models/kimi_k3.py515CODE
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWtest/ci_system/pipeline.py1859def execute_task(CODE
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippetContext
LOWpython/tokenspeed/runtime/execution/prefill_graph.py1400 """Smallest captured request capacity, including native dummy-token room.STRING