Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass copy operation for non-variable constraints #1286

Merged
merged 2 commits into from
Mar 21, 2021
Merged

Conversation

blegat
Copy link
Member

@blegat blegat commented Mar 13, 2021

If the constraints field of the model has a more efficient copy_to than adding constraints one by one (e.g. SparseMatrixCSC) then even if it's behind layers of bridges, CachingOptimizer and UniversalFallback, it should be copied (if not bridged), not added one by one.
This PR addresses that.

  • Bridge layer
  • Tests
  • Find out what to do with unsupported attributes

See #1261

Requires #1267

@blegat blegat force-pushed the bl/pass_cons branch 3 times, most recently from 6e336e8 to c26a6cd Compare March 14, 2021 16:22
@blegat blegat marked this pull request as ready for review March 14, 2021 16:22
@blegat blegat changed the base branch from master to bl/struct_of_constraints March 14, 2021 16:23
@blegat blegat mentioned this pull request Mar 14, 2021
Base automatically changed from bl/struct_of_constraints to master March 17, 2021 08:25
@odow
Copy link
Member

odow commented Mar 21, 2021

Any benchmarks?

@blegat
Copy link
Member Author

blegat commented Mar 21, 2021

I don't believe this will provide any gain yet but once we have #1287, it will allow efficient copy_to to go thrown to the matrix cache if the affine constraints are not bridged.

@blegat blegat merged commit c3ebf46 into master Mar 21, 2021
@blegat blegat deleted the bl/pass_cons branch March 21, 2021 21:38
@blegat blegat mentioned this pull request May 12, 2021
@blegat blegat added this to the v0.9.21 milestone May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants