Skip to content

feat(ptx): implement multi-stage cp.async double-buffered WMMA pipeline - #5

Merged
rahadbhuiya merged 1 commit into
Exploidus:mainfrom
rahadbhuiya:feat/cp-async-pipeline
Nov 27, 2026
Merged

rahadbhuiya merged 1 commit into
Exploidus:mainfrom
rahadbhuiya:feat/cp-async-pipeline

Conversation

@rahadbhuiya

Copy link
Copy Markdown
Member

Summary

Implements a 2-stage double-buffered cp.async global-to-shared memory pipeline for Ampere+ (sm_80+) Tensor Core WMMA GEMM kernels.

  • Emits cp.async.ca.shared.global to copy 16-byte chunks directly from global DRAM into double-buffered .shared memory (smem[2048]), bypassing the register file.
  • Overlaps stage k+1 memory prefetch with stage k wmma.mma execution via cp.async.commit_group and cp.async.wait_group.
  • Preserves synchronous WMMA fallback for pre-Ampere (sm_75 and earlier).
  • Adds unit tests in tessera-backend-ptx and benchmarks the cp.async pipeline in wmma_bench.

Verification

  • cargo test: all unit tests passing.
  • cargo run --release --bin wmma_bench on NVIDIA GeForce RTX 3060 (1024x1024x1024):
    • Sync WMMA: 393.846 us (5.45 TFLOPS)
    • Async cp.async WMMA: 359.710 us (5.97 TFLOPS)

Closes #1

@rahadbhuiya
rahadbhuiya merged commit c6fff11 into Exploidus:main Nov 27, 2026
2 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.

feat(ptx): Multi-stage asynchronous copy pipelining via cp.async

1 participant