Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@urschrei
Copy link
Owner

No description provided.

urschrei added 6 commits July 27, 2025 20:44
- Added pgo-generate profile for instrumentation phase
- Added pgo-use profile for optimization phase
- Both profiles inherit from release with full LTO
- pgo-use uses single codegen unit for maximum optimization
- Added pgo_training binary for PGO workload generation
- Covers k values from 3 to 25 as requested
- Tests multiple data distributions:
  - Uniform distributions  
  - Normal distributions with various parameters
  - Multimodal distributions (mixture of normals)
  - Skewed distributions (exponential)
  - Sorted data (timestamps)
- Tests various data sizes from 100 to 100,000 elements
- Added rand and rand_distr as dependencies for workload generation
- Handles edge cases with small datasets
- Created scripts/pgo-build.sh for automated PGO workflow
- Handles complete PGO pipeline:
  - Builds with instrumentation profile
  - Runs comprehensive training workloads
  - Merges profiling data using llvm-profdata
  - Builds final optimized binary with PGO data
- Supports multiple LLVM versions (looks for llvm-profdata variants)
- Platform-aware (detects OS and architecture)
- Includes error handling and coloured output
- Copies optimized binaries to target/pgo-optimized/
- Optional benchmark comparison via RUN_BENCHMARKS=1
- Created .github/workflows/pgo-release.yml for automated PGO releases
- Supports Linux, macOS, and Windows platforms
- Automatically builds PGO-optimized binaries on version tags
- Includes platform-specific LLVM tools installation
- Runs benchmarks comparing standard vs PGO builds
- Uploads PGO artifacts for each platform
- Creates GitHub releases with PGO-optimized binaries
- Can be manually triggered with workflow_dispatch
- Added rustup component add llvm-tools-preview to CI workflow
- Made system LLVM installations optional (continue-on-error)
- Updated Windows build to find and use Rust's bundled llvm-profdata
- Fixed benchmark execution for Windows platform
- CI now prioritizes Rust's bundled tools over system LLVM
- Added Profile-Guided Optimization section to README
- Documented expected performance improvements (10-30%)
- Provided build instructions using the automated script
- Explained what the PGO build process does
- Added usage instructions for different deployment scenarios
- Noted optimal use case alignment (k=3-25)
- Created benches/pgo_validation.rs for measuring PGO improvements
- Comprehensive benchmark suite covering k=3-25 range
- Tests multiple distributions:
  - Uniform distribution (common for binning)
  - Normal distribution (real-world data)
  - Multimodal distribution (cluster separation)
- Edge case testing:
  - Small k with large datasets
  - Large k with moderate datasets
- Uses criterion for statistical benchmarking
- Parameterized benchmarks for easy comparison
@urschrei urschrei merged commit 61ce183 into main Jul 27, 2025
6 checks passed
@urschrei urschrei deleted the shugel/push-yxvpzktntrqw branch July 27, 2025 18:52
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