Skip to content

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

@m96-chan

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

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