Skip to content

Track generic CUDA kernels under qwen36 filenames #112

Closed

Description

@heiheiha798

PR #111 intentionally keeps using the existing historical qwen36-named CUDA helpers from non-Qwen3.6 frontends, for example bf16_matmul_qwen36_bf16 and qwen36_embedding_lookup_bf16 from Qwen3 / Qwen3-VL / Higgs paths.

This works today but the file/symbol names no longer describe the actual ownership: some helpers are generic BF16 matmul / embedding utilities, while qwen36-specific kernels live beside them. Renaming during PR #111 would expand review and regression risk, so track it separately.

Suggested follow-up:

  • Introduce neutral kernel files/symbol aliases for generic helpers, e.g. bf16_matmul_* and embedding_lookup_*.
  • Keep qwen36 compatibility bindings during migration.
  • Update Qwen3, Qwen3-VL, Qwen3.6, Higgs call sites gradually.
  • Leave model-specific Qwen3.6 linear-attention kernels under qwen36-specific files.

This is not a blocker for PR #111.

Activity

  1. self-assigned this
    on Jun 25, 2026
  2. heiheiha798 commented on Jun 27, 2026

    @heiheiha798
    ContributorAuthor

    Resolved in #117.

    That PR introduces neutral kernel files/symbols for the generic helpers and migrates the non-Qwen3.6 call sites, exactly as suggested here:

    • Neutral bf16_matmul_bf16 (csrc/kernels/bf16_matmul_bf16.{cu,cuh}) and embedding_lookup_bf16 (csrc/kernels/embedding_lookup_bf16.{cu,cuh}). bf16_matmul_cublaslt_bf16 (already a neutral symbol) moved alongside them.
    • Legacy names (bf16_matmul_qwen36_bf16, qwen36_embedding_lookup_bf16) kept as thin forwarding wrappers; no Python binding removed.
    • Non-Qwen3.6 call sites (Qwen3, Qwen3-VL, Qwen3-VL FP8 SM89, GROOT N1.7) migrated to the neutral names; Qwen3.6 call sites keep the legacy names for auditability; Higgs docstrings updated.
    • Model-specific Qwen3.6 linear-attention kernels (AB96, MTP, gated-deltanet, etc.) stay under their qwen36-named files.

    Side benefit: the Qwen3-VL dedicated module no longer compiles the Qwen3.6 matmul translation unit just to get one cuBLASLt wrapper.

    Refactor-only — no kernel algorithm, dtype, dispatch, or runtime behavior change. Verified on SM89/RTX 4090: clean build of all three modules, binding-name regression test, an embedding CUDA equivalence check (bit-identical), and the Qwen3-VL-2B multimodal smoke matching the pre-cleanup baseline (prefill/decode cos_vs_eager=1.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions