Skip to content

Allow using sockets to distribute work to GPUs. - #12

Open
Menkib64 wants to merge 4 commits into
LeelaChessZero:masterfrom
Menkib64:distributed_sockets_to_gpus
Open

Menkib64 wants to merge 4 commits into
LeelaChessZero:masterfrom
Menkib64:distributed_sockets_to_gpus

Conversation

@Menkib64

Copy link
Copy Markdown

If server has many GPUs, test can suffer from concurrent compile for another GPU. We want use shared client and binaries for all GPUs to avoid compilation interfering with testing. This change allows running client with -N <number of gpus> to use all GPUs using one client.

Copilot AI lite review requested due to automatic review settings September 15, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Fix the critical workload round-count mismatch before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR enables one client to distribute work across multiple GPUs while sharing binaries.

Changes:

  • Adds multi-GPU runner distribution.
  • Routes engine and benchmark processes to selected GPUs.
  • Coordinates runner completion and result tracking.
File summaries
File Summary
OpenBench/workloads/get_workload.py Enables multiple runner assignments.
Client/worker.py Adds GPU routing and coordination; contains a critical -rounds mismatch at lines 413 and 1414.
Client/bench.py Passes GPU indices to benchmark processes.
Review details

Suppressed comments (1)

Client/worker.py:1414

  • A runner clears results['done'] and continues after emitting its own completion marker, but batch_done is not set until every runner has reported. If one GPU is faster, it can enqueue additional result batches while another GPU is still finishing; those batches are then drained and uploaded, exceeding the allocated rounds-per-runner and potentially consuming another runner's opening range. Stop this runner when its own done result is emitted, not only when the global event is set.
            if batch_done.is_set():
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Client/worker.py Outdated
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