Skip to content

Comments

Add BARRIER word for GPU thread synchronization#35

Merged
tetsuo-cpp merged 1 commit intocanonfrom
feat/barrier
Feb 20, 2026
Merged

Add BARRIER word for GPU thread synchronization#35
tetsuo-cpp merged 1 commit intocanonfrom
feat/barrier

Conversation

@tetsuo-cpp
Copy link
Owner

@tetsuo-cpp tetsuo-cpp commented Feb 19, 2026

Summary

  • Add BARRIER word (( -- )) that lowers through forth.barriergpu.barrier (__syncthreads)
  • Stackless op with no Pure trait to prevent elimination/reordering
  • Passes through ForthToMemRef unchanged, converted in ForthToGPU

Test plan

  • test/Translation/Forth/barrier.forth — Forth → MLIR emission
  • test/Conversion/ForthToMemRef/barrier.mlir — survives stack lowering
  • test/Pipeline/barrier.forth — full pipeline to gpu.binary

Closes #5

@tetsuo-cpp tetsuo-cpp merged commit f02fa94 into canon Feb 20, 2026
1 check passed
@tetsuo-cpp tetsuo-cpp deleted the feat/barrier branch February 20, 2026 09:37
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.

Thread synchronization barrier (__syncthreads)

1 participant