Repository navigation
bench: add the GPU benchmark and fold its findings into the docs - #55
Merged
Merged
Conversation
Adds test-files/benchmark_gpu.py: sequential vs threads on CPU and GPU for a compute-heavier workload (FedAvg, FedSynthetic with a 1.19M-parameter MLP, 64 clients, 3 iterations, 5 local epochs, batch 256, best of 3). Findings folded into the parallel-execution docs page: - CPU with the compute-heavier model: 1.40x at 8 workers (the torch kernels release the GIL; the benefit grows with the compute share), vs about 1.2x on the tiny-model configuration; - single GPU: no benefit from the threads backend — all clients submit to the same device where kernels execute serially, so the sequential loop already saturates one card; scaling beyond that comes from multi-GPU client placement or CUDA streams, not from concurrent submission to a single device.
The tests picked their JSON-log fixture with glob('*.json')[0], which
grabbed whatever file sorted first; adding any other JSON file to
test-files/ silently broke five tests (already bitten once by the
benchmark results file). Pin the actual log file name instead.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #55 +/- ##
==========================================
+ Coverage 82.28% 82.30% +0.01%
==========================================
Files 55 55
Lines 5640 5640
==========================================
+ Hits 4641 4642 +1
+ Misses 999 998 -1 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the GPU leg of the executor benchmark that the parallel-execution docs page left open (larger-model and GPU tiers to be answered by the benchmark), and folds its findings into that page.
Configuration: FedAvg on FedSynthetic with the 1.19M-parameter mlp_d3 candidate model (dimension=512), 64 clients, 3 iterations, 5 local epochs, batch 256, best of 3, on a 12-core host with one consumer GPU.
Findings (now in the docs page)
The docs page now states these as observations on the measured configurations (not ceilings), and keeps the pointer to the planned process-based backend for GIL-bound CPU workloads.
Verification