Skip to content

gemm_ex .om successor: src/omega_gpu_gemm_ex.om (general GEMM host orchestration in Omega) #144

Open

Description

@aien-spark

Language rule (GpuStack PLAN.md): new host-runtime code lands in .om. PR #139 adds the general matrix multiply omega_gpu_gemm_ex as MIGRATION-PENDING C (src/omega_gpu_gemm_ex.c, build switch CUDAPP_MIGRATION_PENDING_GEMM_EX in mk/gemm-ex.mk, default 1). This issue tracks its Omega successor, src/omega_gpu_gemm_ex.om, named in src/omega_gpu_gemm_ex.h and mk/gemm-ex.mk.

Scope to port (C today, src/omega_gpu_gemm_ex.c at #139 head):

  • validate(): argument checks, leading-dimension spans, batch extents and overlap, scale checks, route choice (native bf16/f16/e4m3, exact widen, bf16x3, fast bf16, FFMA reference).
  • The host orchestration of omega_gpu_gemm_ex: C tiles of at most 4096 x 4096, k parts of at most 16384 (1808 on bf16x3), block-scale k breaks, zero-copy native calls, operand packing into the core type, bf16x3 plane split (9 plane products), double accumulation of the parts, alpha/beta and scales, round-to-nearest-even stores to f32/bf16/f16, the inf/NaN row/column host recompute.
  • omega_gpu_gemm_ex_fp8_block_rows (the fp8 GEMV and grouped GEMM fallback).

Omega words needed (omega main e5b32567a): f32/f64 arithmetic, compares and conversions exist in seed/omc/omc.om (float section from line 3038). The successor calls the C3 core (omega_gpu_gemm_ld, src/omega_gpu_gemm.c, itself C): check at the then-current pin how a CUDApp .om unit calls into libomega_gpu.a; if no such path exists, file the concrete extension proposal (omega-bridge emits C/Python from .om and lets foreign callers call compiled Omega units, it does not import C).

Acceptance: the .om entry passes tests/gpu_gemm_ex_test.c host (--host-only, 224 checks at fba0384), simulator (--sim) and chip tiers (901 checks at fba0384, evidence/GEMM-GENERAL-fba0384/), with every mutant red, bit for bit equal to the C path on the predeclared sweep; then the C path goes behind the migration-pending switch defaulting OFF and is removed in a separate PR.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions