Skip to content

DEFAULT_CHUNK_THRESHOLD is configurable via Preferences.jl #582

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

Merged

Conversation

lassepe
Copy link
Contributor

@lassepe lassepe commented Apr 25, 2022

Context: I would like to set the DEFAULT_CHUNK_THRESHOLD for a project that uses ForwardDiff.jl through Zygote.jl. Since configuring the chunk size used in Zygote.forwarddiff is not supported by the Zygote API, I figured it may be okay to just expose this as a preference here.

Copy link
Member

@andreasnoack andreasnoack left a comment

Choose a reason for hiding this comment

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

It would probably be a good idea to add this to the docs as well.

@lassepe
Copy link
Contributor Author

lassepe commented Aug 7, 2022

Thanks for the feedback, @andreasnoack. I added documentation to this feature. I should also say that as of FluxML/Zygote.jl#1213, the chunk size is exposed in Zygote.forwarddiff. Therefore, the original use case for this feature is already fixed. Nevertheless, I think it may be a nice feature for other settings.

Feel free to merge or close as you see fit.

@codecov-commenter
Copy link

codecov-commenter commented Aug 7, 2022

Codecov Report

Merging #582 (e123625) into master (eed0ff3) will increase coverage by 1.39%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #582      +/-   ##
==========================================
+ Coverage   85.31%   86.71%   +1.39%     
==========================================
  Files           9        9              
  Lines         858      903      +45     
==========================================
+ Hits          732      783      +51     
+ Misses        126      120       -6     
Impacted Files Coverage Δ
src/prelude.jl 36.36% <ø> (ø)
src/derivative.jl 94.44% <0.00%> (-5.56%) ⬇️
src/dual.jl 79.76% <0.00%> (+5.43%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@andreasnoack andreasnoack merged commit a18dfcd into JuliaDiff:master Aug 8, 2022
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