Skip to content

GPU Metal: fence only threadgroup memory in the work-group collectives - #16126

Merged
ktf merged 1 commit into
AliceO2Group:devfrom
ktf:pr16126
Nov 15, 2026
Merged

ktf merged 1 commit into
AliceO2Group:devfrom
ktf:pr16126

Conversation

@ktf

@ktf ktf commented Nov 15, 2026

Copy link
Copy Markdown
Member

The Metal work-group scan, reduction and broadcast exchange data through
threadgroup memory only, so their barriers need not order device memory.
GPUbarrier() fences both, which on Apple GPUs makes each barrier wait for
the outstanding device-memory accesses. With threadgroup-only fences the
stream-compaction scanStart takes 12% less GPU time (30 kHz Pb-Pb, 1/4 TF,
no --debug, 3 interleaved rounds); results unchanged.

The Metal work-group scan, reduction and broadcast exchange data through
threadgroup memory only, so their barriers need not order device memory.
GPUbarrier() fences both, which on Apple GPUs makes each barrier wait for
the outstanding device-memory accesses. With threadgroup-only fences the
stream-compaction scanStart takes 12% less GPU time (30 kHz Pb-Pb, 1/4 TF,
no --debug, 3 interleaved rounds); results unchanged.
@ktf
ktf requested a review from davidrohr as a code owner November 15, 2026 08:38
@ktf

ktf commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Metal only.

@ktf
ktf merged commit 1be4895 into AliceO2Group:dev Nov 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant