Skip to content

catena-gpu naive matmul - #174

Merged
mstn merged 22 commits into
masterfrom
marco/naive-matmul
Sep 1, 2026
Merged

mstn merged 22 commits into
masterfrom
marco/naive-matmul

Conversation

@mstn

@mstn mstn commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Naive matmul for catena-gpu. See doc for details.

Change to catena-lang runtime

We want to use the same runtime as catena-lang because it is currently used in other parts of the stack. We needed to change it.

It was primarily an API extension, but I did touch the implementation of an existing method.

Added APIs:

  • Public GeneratedFunction ABI metadata.
  • Runtime::dialect().
  • Runtime::load_generated_source(source, functions).
  • Existing public method signatures remain unchanged.

I added new method Runtime::load_generated_source(source, functions)

Existing load methods accept Hex/Catena source and always run the complete catena-lang pipeline:

Runtime::load(...)
Runtime::load_sources(...)

That cannot load catena-gpu output. By the time catena-gpu calls the runtime, it already has generated CUDA/HIP and ABI signatures.

Runtime::load_generated_source(source, functions) adds some code duplication, but it is the safest path that does not require to change/break existing code.

Questions

Hardware-dependent constraints include:

  • each block axis within maxThreadsDim;
  • block volume within maxThreadsPerBlock;
  • each grid axis within maxGridSize;
  • kernel-specific register and shared-memory resource limits.

should we provide safety or is it fine if it crashes?

@mstn mstn self-assigned this Aug 26, 2026
@mstn
mstn marked this pull request as ready for review August 31, 2026 08:44
@mstn
mstn requested a review from statusfailed August 31, 2026 08:44
@mstn
mstn merged commit 776ae5e into master Sep 1, 2026
1 check passed
@mstn
mstn deleted the marco/naive-matmul branch September 1, 2026 07:26
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.

1 participant