Skip to content

Sync device and barrier DMA threads before timing bidirectional trans…#333

Closed
saleelk wants to merge 1 commit into
candidatefrom
users/saleelk/SyncExec
Closed

Sync device and barrier DMA threads before timing bidirectional trans…#333
saleelk wants to merge 1 commit into
candidatefrom
users/saleelk/SyncExec

Conversation

@saleelk

@saleelk saleelk commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

…fers

Add hipDeviceSynchronize() in RunDmaExecutor to ensure the device is quiescent before starting the timer. Introduce an atomic spin-barrier so all per-transfer threads are running before any begins its timed copy, ensuring accurate bidirectional bandwidth measurement.

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@saleelk
saleelk requested a review from a team as a code owner July 14, 2026 19:00
@nileshnegi
nileshnegi requested a review from Copilot July 14, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the accuracy of DMA bidirectional transfer timing by ensuring the GPU is quiescent before timing begins and by synchronizing per-transfer worker threads so they start timed copies together.

Changes:

  • Add hipDeviceSynchronize() in RunDmaExecutor prior to launching DMA transfer threads to reduce timing skew from prior device work.
  • Introduce a per-executor atomic “ready” barrier so all transfer threads are running before any begins its timed copy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/header/TransferBench.hpp
@saleelk
saleelk force-pushed the users/saleelk/SyncExec branch from 99e06c3 to 274d822 Compare July 14, 2026 19:37
…fers

Add hipDeviceSynchronize() in RunDmaExecutor to ensure the device is
quiescent before starting the timer. Introduce an atomic spin-barrier
so all per-transfer threads are running before any begins its timed
copy, ensuring accurate bidirectional bandwidth measurement.
@saleelk
saleelk force-pushed the users/saleelk/SyncExec branch from 274d822 to 8954a8a Compare July 14, 2026 19:42
@gilbertlee-amd

Copy link
Copy Markdown
Collaborator

barrier shows poor performance on some architectures.
hipDeviceSynchronize() moved to #335

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.

3 participants