Skip to content

Extend framework modules and ggml with opt-in CUDA FP16 paths - #988

Merged
0xShug0 merged 1 commit into
mainfrom
feature/framework-ggml-extensions
Oct 19, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
feature/framework-ggml-extensions

Conversation

@0xShug0

@0xShug0 0xShug0 commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Framework extensions

  • Add GegluModule: exact-erf GELU gating of the second half of the input, multiplied by the first half.
  • Add opt-in input-type preservation for SiLU and Add, with optional Add broadcasting.
  • Add opt-in CUDA FP16 output for Linear, LayerNorm, and affine GroupNorm.
  • Extend Conv2D with optional cuDNN lowering and FP16 output.
  • Add an explicit CUDA FP16 noncausal attention lowering for 40-wide heads without masks.

ggml extensions

  • Add ggml_mul_mat_f16 with FP16 operands/output and CUDA cuBLAS execution using FP32 accumulation. Existing ggml_mul_mat continues to produce FP32.
  • Add explicit opt-in setters and CUDA kernels for FP16 LayerNorm and affine GroupNorm.
  • Add cuDNN Conv2D dispatch with bounded workspace, enabled only by GGML_CUDA_CUDNN_CONV2D=ON (default OFF) and explicit graph selection.
  • Add a dedicated FP16 head-40 attention operation, internally padding to the tensor-core tile width, and extend the MMA templates to support it.

Scope

No model implementations, model specs, routes, or default build options change. New FP16 paths require explicit selection; existing module defaults are retained.

Validation

  • Includes a unit check for default-off module configuration and preserved existing attention enum values.
  • Whitespace checks pass when recognizing the existing CRLF line endings.
  • Build, runtime parity, and performance tests have not been rerun on this extracted branch.

@0xShug0 0xShug0 added the ggml label Oct 19, 2026
@0xShug0
0xShug0 merged commit 871b4ae into main Oct 19, 2026
6 checks passed
@0xShug0
0xShug0 deleted the feature/framework-ggml-extensions branch October 19, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant