Skip to content

refactor(api): standardize GEMM/GEMV naming convention#138

Merged
m96-chan merged 1 commit intomainfrom
feature/issue-130-api-naming
Dec 30, 2025
Merged

refactor(api): standardize GEMM/GEMV naming convention#138
m96-chan merged 1 commit intomainfrom
feature/issue-130-api-naming

Conversation

@m96-chan
Copy link
Copy Markdown
Owner

Summary

  • Implement standardized naming convention for GEMM/GEMV Python bindings following pattern: {operation}_{input_dtype}_{output_dtype}[_{variant}][_{arch}]
  • Add new standardized names while keeping old names as aliases for backwards compatibility
  • Update Python API exports to include both naming conventions

Changes

C++ Bindings (10 files)

File New Names Old Aliases
gemm/generic.cpp gemm_f32_f32, gemm_tf32_f32, gemm_f32_f32_batched matmul, matmul_tf32, gemm_strided_batched_fp32
gemm/fp8xfp8_bf16.cpp gemm_fp8_f32_sm{90,100,120}_available fp8_sm*_available
gemm/fp8xfp8_fp8.cpp gemm_fp8_fp8_sm120_available fp8_fp8_sm120_available
gemm/fp8xbf16_bf16.cpp gemm_w8a16_bf16_sm120, gemm_w8a16_init_lut w8a16_gemm_sm120
gemm/grouped.cpp grouped_gemm_fp8_bf16_sm120 grouped_gemm_fp8_bf16
gemm/int.cpp gemm_int8_int32_sm120, gemm_int4_int32_sm120 int8_native_gemm_sm120
gemm/nvf4xbf16_bf16.cpp gemm_nvf4_bf16_sm120_available nvf4_bf16_sm120_available
gemv/generic.cpp gemv_bf16_bf16_sm120 gemv_bf16_opt_sm120
gemv/fp8xfp8_bf16.cpp gemv_fp8_bf16_sm120 gemv_fp8_bf16_opt
gemv/nvf4xbf16_bf16.cpp gemv_nvf4_bf16_sm120 gemv_nvf4_bf16

Python API

  • ops/matmul.py: Updated internal calls to use new native names, added standardized aliases
  • ops/basic.py: Exports both old and new naming conventions

Test plan

  • Precommit checks pass (lint, format, mypy)
  • Native module exposes all new and old names
  • Python API accessible via both naming conventions
  • Build succeeds with SM 120a
  • Core tests pass (238 passed, 9 pre-existing failures unrelated to this change)

Closes #130

🤖 Generated with Claude Code

Implement Issue #130: Standardize Python binding names for GEMM/GEMV
operations following the pattern:
  {operation}_{input_dtype}_{output_dtype}[_{variant}][_{arch}]

C++ Binding Changes (10 files):
- gemm/generic.cpp: gemm_f32_f32, gemm_tf32_f32, gemm_f32_f32_batched
- gemm/fp8xfp8_bf16.cpp: gemm_fp8_f32_sm{90,100,120}_available
- gemm/fp8xfp8_fp8.cpp: gemm_fp8_fp8_sm120_available
- gemm/fp8xbf16_bf16.cpp: gemm_w8a16_bf16_sm120, gemm_w8a16_init_lut
- gemm/grouped.cpp: grouped_gemm_fp8_bf16_sm120
- gemm/int.cpp: gemm_int8_int32_sm120, gemm_int4_int32_sm120
- gemm/nvf4xbf16_bf16.cpp: gemm_nvf4_bf16_sm120_available
- gemv/generic.cpp: gemv_bf16_bf16_sm120, gemv_bf16_bf16_available
- gemv/fp8xfp8_bf16.cpp: gemv_fp8_bf16_sm120, gemv_fp8_bf16_batched_sm120
- gemv/nvf4xbf16_bf16.cpp: gemv_nvf4_bf16_sm120_available

Python API Changes:
- ops/matmul.py: Use new native names internally, add Python aliases
- ops/basic.py: Export both old and new standardized names

Migration: Old names kept as aliases for backwards compatibility.

Closes #130

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@m96-chan m96-chan merged commit a097258 into main Dec 30, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(api): Standardize GEMM/GEMV Python binding naming convention

1 participant