Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Extract macro to instantiate ring switch tests#785

Open
GraDKh wants to merge 1 commit intodgordon/extract_bivariate_sumcheck_macrofrom
dgordon/extract_piop_tests_macro
Open

Extract macro to instantiate ring switch tests#785
GraDKh wants to merge 1 commit intodgordon/extract_bivariate_sumcheck_macrofrom
dgordon/extract_piop_tests_macro

Conversation

@GraDKh
Copy link
Contributor

@GraDKh GraDKh commented Jun 16, 2025

TL;DR

Added a macro to instantiate PIOP and ring switch tests for different compute layers.

What changed?

  • Added instantiate_piop_tests! macro in piop.rs that generates six test cases for different PIOP scenarios
  • Added instantiate_ring_switch_tests! macro in ring_switch.rs that generates two test cases for ring switch functionality
  • Refactored existing ring switch tests to use the new macro
  • Added helper functions to support the test macros
  • Implemented both CPU and FastCPU test modules in ring_switch.rs

How to test?

Run the tests with:

cargo test --package binius-core

The tests will now run for both CPU and FastCPU compute layers, verifying that the PIOP and ring switch functionality works correctly across different implementations.

Why make this change?

This change improves test coverage by ensuring that PIOP and ring switch functionality works consistently across different compute layer implementations. By using macros to generate the tests, we avoid code duplication while still testing the same functionality with different backends. This makes it easier to add support for new compute layers in the future, as they can simply instantiate these test macros to verify compatibility.

Copy link
Contributor Author

GraDKh commented Jun 16, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@GraDKh GraDKh force-pushed the dgordon/extract_piop_tests_macro branch from 9bce9dc to 638ebea Compare June 16, 2025 19:51
@GraDKh GraDKh force-pushed the dgordon/extract_bivariate_sumcheck_macro branch 2 times, most recently from 6fdf946 to d40060a Compare June 16, 2025 19:59
@GraDKh GraDKh force-pushed the dgordon/extract_piop_tests_macro branch from 638ebea to 239e7d5 Compare June 16, 2025 19:59
@GraDKh GraDKh marked this pull request as ready for review June 16, 2025 20:13
Copy link
Contributor

@djadjka djadjka left a comment

Choose a reason for hiding this comment

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

LGTM, just question to $compute_layer

@GraDKh GraDKh force-pushed the dgordon/extract_piop_tests_macro branch from 239e7d5 to baf542a Compare June 20, 2025 12:34
@GraDKh GraDKh force-pushed the dgordon/extract_bivariate_sumcheck_macro branch 2 times, most recently from 2d9c88d to f2aa965 Compare June 20, 2025 12:37
@GraDKh GraDKh force-pushed the dgordon/extract_piop_tests_macro branch from baf542a to 6c73e0a Compare June 20, 2025 12:37
@GraDKh GraDKh force-pushed the dgordon/extract_piop_tests_macro branch from 6c73e0a to 4c96807 Compare June 20, 2025 12:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants