Skip to content

feat: SIMD compilation mode - CPU portable vs native mode selection#67

Merged
nyurik merged 5 commits intofast-pack:mainfrom
nyurik:cleanups
Mar 5, 2026
Merged

feat: SIMD compilation mode - CPU portable vs native mode selection#67
nyurik merged 5 commits intofast-pack:mainfrom
nyurik:cleanups

Conversation

@nyurik
Copy link
Member

@nyurik nyurik commented Mar 5, 2026

This pull request introduces a new SIMD mode configuration system for the FastPFOR crate, allowing users to select between portable, native, and runtime SIMD instruction sets for the C++ backend. The changes improve build flexibility, CI reliability, and documentation clarity, while updating the crate version and standardizing feature usage in development scripts.

SIMD Mode Configuration and Build System

  • Added support for selecting SIMD mode (portable, native, or runtime) via Cargo features and the FASTPFOR_SIMD_MODE environment variable; the build script now warns if multiple SIMD features are enabled and passes the selected mode to CMake. (build.rs, Cargo.toml) [1] [2]
  • Updated GitHub Actions CI workflow to test all combinations of OS and SIMD mode, and to cache builds separately for each SIMD mode. (.github/workflows/ci.yml)

Documentation Improvements

  • Expanded README.md with a clear explanation of SIMD modes, their use cases, and configuration recommendations for end users.

Development Scripts and Testing

  • Standardized the use of the _all_compatible feature group in the justfile for building, testing, linting, and coverage, and added recipes to test all SIMD modes. [1] [2] [3] [4]
  • Improved installation logic in the justfile for development tools, with clearer output and better CI compatibility.

Version Update

  • Bumped the crate version from 0.7.0 to 0.8.0 to reflect these breaking and feature enhancements. (Cargo.toml)

@nyurik nyurik requested review from CommanderStorm and Copilot March 5, 2026 17:39
@nyurik nyurik force-pushed the cleanups branch 2 times, most recently from 7933656 to f6ec63c Compare March 5, 2026 17:52
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 55.55556% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
build.rs 55.55% 16 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces a configurable SIMD compilation mode for the FastPFOR C++ backend (portable vs native vs runtime), improving build/CI flexibility and clarifying usage for consumers.

Changes:

  • Adds SIMD mode selection via Cargo features and FASTPFOR_SIMD_MODE, wiring the selection through build.rs into CMake.
  • Updates dev workflows (justfile) and CI matrix to exercise multiple SIMD modes.
  • Updates docs and bumps crate version to 0.8.0.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
justfile Standardizes dev commands on _all_compatible and adds SIMD-mode test recipes.
build.rs Detects SIMD mode via features/env var and forwards it to CMake with warnings.
README.md Documents SIMD modes and configuration knobs for end users.
Cargo.toml Adds SIMD-related features and bumps crate version.
.github/workflows/ci.yml Expands CI matrix to test multiple SIMD modes and separates caches per mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

nyurik and others added 4 commits March 5, 2026 16:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nyurik nyurik merged commit ad84da9 into fast-pack:main Mar 5, 2026
14 checks passed
@nyurik nyurik deleted the cleanups branch March 5, 2026 21:28
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.

3 participants