Skip to content

TDM Reduce Copy bug fix - #349

Open
AtlantaPepsi wants to merge 7 commits into
ROCm:candidate-1.70from
AtlantaPepsi:TdmReduceScratch
Open

TDM Reduce Copy bug fix#349
AtlantaPepsi wants to merge 7 commits into
ROCm:candidate-1.70from
AtlantaPepsi:TdmReduceScratch

Conversation

@AtlantaPepsi

Copy link
Copy Markdown
Contributor

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@AtlantaPepsi
AtlantaPepsi requested a review from a team as a code owner August 12, 2026 17:29
Comment thread src/header/tdmCopy.h
// boundaries. (A __syncthreads() barrier is unusable here: warps with
// rank >= issuers or myRows == 0 return early and would deadlock it.)
__device__ __forceinline__ void ldsFence() {
__builtin_amdgcn_fence(__ATOMIC_ACQ_REL, "workgroup");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just __threadfence_block() but works

for (int iSrc = 0; iSrc < (int)rss.srcMem.size(); ++iSrc) {
if (reinterpret_cast<uintptr_t>(rss.srcMem[iSrc]) & 127u)
errResults.push_back({ERR_WARN,
"Transfer %d: TDM reduce SRC[%d] (%p) is not 128B aligned; performance may be reduced",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are peeling the unaligned bit, I don't think there will be much of a difference in performance unless you're doing very small transfers.

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.

2 participants