Skip to content

refactor(native): Split matmul.cu dispatcher into per-dtype files #147

Closed

Description

@m96-chan

Problem

native/ops/matmul/matmul.cu is 664 lines with dispatch logic for all dtypes.

Current State

native/ops/matmul/
└── matmul.cu  (664 lines - all dispatch)

Proposed Structure

native/ops/matmul/
├── dispatch.cu          (main dispatcher, ~100 lines)
├── dispatch_f32.cu      (FP32/TF32 dispatch)
├── dispatch_bf16.cu     (BF16 dispatch)
├── dispatch_fp8.cu      (FP8 dispatch)
└── dispatch_nvf4.cu     (NVF4 dispatch)

Benefits

  • Faster incremental builds
  • Clear dispatch path per dtype
  • Easier to add new dtype support

Related

Activity

  1. m96-chan commented on Dec 30, 2025

    @m96-chan
    OwnerAuthor

    Completed in PR #168

  2. added a commit that references this issue on Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions