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

Fix several l_weights caching issues #231

Merged
merged 5 commits into from
May 22, 2024
Merged

Fix several l_weights caching issues #231

merged 5 commits into from
May 22, 2024

Conversation

jorenham
Copy link
Owner

@jorenham jorenham commented May 22, 2024

  • always use highest available precision floats when caching, avoiding precision loss during dtype conversion
  • use casting='same_kind' when downcasting cached weights
  • fix unnecessary recalculation if r_max was smaller than the cached r
  • mark cached arrays as readonly to avoid cache corruption
  • avoid redundant copying of cached weights
  • use at least r_max >= 4 while caching, to reduce the likelihood of future cache misses
  • add missing parameter descriptions in the l_weights docstring
  • improved l_weights hypothesis testing
  • cleaner l_weights code

 - always use highest available precision floats when caching, avoiding precision loss during dtype conversion
- use `casting='same_kind'` when downcasting cached weights
- fix unnecessary recalculation if `r_max` was smaller than the cached `r`
- mark  cached arrays as readonly  to avoid cache corruption
- avoid redundant copying of cached weights
- use at least `r_max >= 4` while caching, to reduce the likelihood of future cache misses
- add missing parameter descriptions in the `l_weights` docstring
@jorenham jorenham merged commit b13fe23 into dev May 22, 2024
18 checks passed
@jorenham jorenham deleted the bugfix/cache branch May 22, 2024 21:17
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.

1 participant