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

Shared sets and sets with shared objects #107

Closed
gdalle opened this issue May 27, 2024 · 2 comments
Closed

Shared sets and sets with shared objects #107

gdalle opened this issue May 27, 2024 · 2 comments
Labels
patterns Features regarding sparsity pattern representation
Milestone

Comments

@gdalle
Copy link
Collaborator

gdalle commented May 27, 2024

To avoid excessive allocations in Hessian tracing, we can make a new set type holding a reference to a shared set, such that every intermediate scalar quantity shares the same pattern (as opposed to having individual patterns).

This would require:

  • Overloading trace_input so that each index x[i] points to the same shared set
  • Handling the empty set intelligently to avoid re-creating shared sets in operations like similar and rand
  • Once Allow more generic hessian set types #103 is merged, overloading $\times$

Note that such shared objects would also be useful to implement tape-based recursive sets

@gdalle
Copy link
Collaborator Author

gdalle commented May 27, 2024

From the testing perspective, we would need to add functions with dead ends to highlight the differences:

  • a shared Hessian pattern will include dead ends (see Walther 2008)
  • individual Hessian patterns will ignore them

@gdalle gdalle changed the title Global sets Shared sets and sets with shared objects May 27, 2024
@adrhill adrhill added this to the Paper milestone Jun 6, 2024
@adrhill adrhill added the patterns Features regarding sparsity pattern representation label Jun 26, 2024
@adrhill
Copy link
Owner

adrhill commented Jul 30, 2024

Added in #135.

@adrhill adrhill closed this as completed Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patterns Features regarding sparsity pattern representation
Projects
None yet
Development

No branches or pull requests

2 participants