-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add a BARRIER word that maps to GPU thread barrier synchronization.
Motivation
Required for any shared-memory algorithm. After writing to shared memory, all threads in a block must synchronize before any thread reads, to avoid data races.
Word to implement
| Word | Stack effect | Description |
|---|---|---|
BARRIER |
( -- ) |
Block-level thread barrier |
Implementation notes
- This is a side-effecting operation with no stack effect
- MLIR mapping:
gpu.barrierop - In the NVVM lowering path, this becomes
llvm.nvvm.barrier0 - The op should have no operands/results on the Forth stack (stack passes through unchanged)
Priority
High — required for any shared-memory algorithm. Closely tied to shared memory support.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request