Skip to content

[hipfile] Add thread pool for batch operations. - #9659

Merged
jordan-turbofish merged 7 commits into
developfrom
users/jpatters/batch-tp
Aug 24, 2026
Merged

jordan-turbofish merged 7 commits into
developfrom
users/jpatters/batch-tp

Conversation

@jordan-turbofish

@jordan-turbofish jordan-turbofish commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Add thread pool for batch operations.

Technical Details

  • Adds a thread pool for batch operations using Taskflow.
  • Fixes ASAN issues in unit test code.
  • Disables unsigned-shift-base check, which is not UB, and is used in Taskflow.
  • Enables sanitizer flags on test executables so that TSAN analysis works properly.
  • Disables warnings coming from Taskflow (most on stdlib headers, some false positives from SmallVec borrowed from LLVM [CMake] Disable more noisy GCC warnings llvm/llvm-project#159044)

Issue Tracking

Part of:

JIRA ID: AIHIPFILE-65

Test Plan

Unit tests added to thread pool.

Test Result

Tests pass.

Submission Checklist

Copilot AI lite review requested due to automatic review settings August 4, 2026 17:03
@jordan-turbofish
jordan-turbofish requested a review from a team as a code owner August 4, 2026 17:03

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@therock-pr-bot

therock-pr-bot Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/hipfile/src/amd_detail/thread-pool.cpp, projects/hipfile/src/amd_detail/thread-pool.h, projects/hipfile/test/amd_detail/fallback.cpp, projects/hipfile/test/amd_detail/mthread-pool.h, projects/hipfile/test/amd_detail/thread-pool.cpp (+70 more); no test file found
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@jordan-turbofish
jordan-turbofish marked this pull request as draft August 4, 2026 21:34
@jordan-turbofish
jordan-turbofish force-pushed the users/jpatters/batch-tp branch from 1e9d47d to 59e2768 Compare August 4, 2026 22:25

@github-advanced-security github-advanced-security 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.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@jordan-turbofish
jordan-turbofish force-pushed the users/jpatters/batch-tp branch from 9836066 to fdddc20 Compare August 18, 2026 16:22
@jordan-turbofish
jordan-turbofish force-pushed the users/jpatters/batch-tp branch from fdddc20 to 18fdf1a Compare August 19, 2026 18:37
Disable a couple of false-positive warnings on thread-pool.cpp that are
coming from Taskflow.

Disable strict-overflow, which is buggy and triggers on std::algorithm
usage. It has been removed in a later version of gcc.
Ensures any resources are released when a wait on the task group completes.
@jordan-turbofish
jordan-turbofish force-pushed the users/jpatters/batch-tp branch from ec009e5 to dd41292 Compare August 20, 2026 20:43
@jordan-turbofish
jordan-turbofish merged commit 189d3e6 into develop Aug 24, 2026
279 of 297 checks passed
@jordan-turbofish
jordan-turbofish deleted the users/jpatters/batch-tp branch August 24, 2026 16:02
cmcknigh pushed a commit that referenced this pull request Aug 25, 2026
## Motivation

Add thread pool for batch operations.

## Technical Details

- Adds a thread pool for batch operations using Taskflow.
- Fixes ASAN issues in unit test code.
- Disables unsigned-shift-base check, which is not UB, and is used in
Taskflow.
- Enables sanitizer flags on test executables so that TSAN analysis
works properly.
- Disables warnings coming from Taskflow (most on stdlib headers, some
false positives from SmallVec borrowed from LLVM
llvm/llvm-project#159044)

## Issue Tracking

Part of:
 
JIRA ID: AIHIPFILE-65

## Test Plan

Unit tests added to thread pool.

## Test Result

Tests pass.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
ajanicijamd pushed a commit that referenced this pull request Aug 25, 2026
## Motivation

Add thread pool for batch operations.

## Technical Details

- Adds a thread pool for batch operations using Taskflow.
- Fixes ASAN issues in unit test code.
- Disables unsigned-shift-base check, which is not UB, and is used in
Taskflow.
- Enables sanitizer flags on test executables so that TSAN analysis
works properly.
- Disables warnings coming from Taskflow (most on stdlib headers, some
false positives from SmallVec borrowed from LLVM
llvm/llvm-project#159044)

## Issue Tracking

Part of:
 
JIRA ID: AIHIPFILE-65

## Test Plan

Unit tests added to thread pool.

## Test Result

Tests pass.

## Submission Checklist

- [ ] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants