mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #367] [MERGED] hip: keep Lt tuning locks local to each device (fixes a 2-GPU hang) #493
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#493
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/367
Author: @Gazelle221B
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @mw00
Base:
main← Head:hip-lt-per-device-lock📝 Commits (1)
16469achip: keep Lt tuning locks local to each device📊 Changes
1 file changed (+17 additions, -8 deletions)
View changed files
📝
src/ds4/ds4_lt.cu(+17 -8)📄 Description
Fixes #366.
lt::gemmheld the process-wideg_muwhile it created a device's handle and workspace, timed candidates and waited onhipEventSynchronize. On a 2-GPU layer split, the downstream GPU's stream can be queued behind a GPU-side wait for the upstream GPU's hand-off. If the downstream worker reaches its first Lt shape first, it keepsg_muwhile waiting, and the upstream worker blocks ong_muand never submits the hand-off.The change:
Devgets its own mutex, which guards its handle, workspace and picks.g_munow only guards the store path and appends to the picks file, and is never held across a GPU wait.load_savedtakes the store path as an argument instead of reading the global under the lock.Single-GPU behaviour is unchanged (one device, one lock), and nothing changes on NVIDIA (the file is HIP-only).
Tested on 2x 32 GB AMD GPUs (HIP, gfx1201), DeepSeek-V4.1-Flash Maya-S, automatic 2-GPU split. The runs were on v1.1.21 + #343; this branch is the same one-file change on plain v1.1.21 and compiles cleanly.
lt-picks.txtDS4_LT=0The prefill figures are single profiled samples, so read the +5-7% as indicative only. The main point is that the hang is gone. CI-equivalent checks (HIP mapping check, tools and server tests) passed on the tested tree.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.