-
Notifications
You must be signed in to change notification settings - Fork 35
Use Threads.nthreads() * 2
in TSVI
#936
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
Draft
penelopeysm
wants to merge
1
commit into
main
Choose a base branch
from
py/tsvi-julia-112
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark Report for Commit 6b9b332Computer Information
Benchmark Results
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #936 +/- ##
=======================================
Coverage 82.91% 82.91%
=======================================
Files 36 36
Lines 3962 3962
=======================================
Hits 3285 3285
Misses 677 677 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request Test Coverage Report for Build 15216502921Details
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 15216502921Details
💛 - Coveralls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #924 for background.
This PR adopts a similar approach to solution (1), i.e., using
Threads.maxthreadid()
. However, Mooncake can't differentiatemaxthreadid()
, so this is a hacky workaround to a hacky workaround, based on the observation thatmaxthreadid()
is usuallynthreads() * 2
.Personally, I would be much more in favour of removing TSVI (or making it opt-in), and will probably do this in a separate PR once TuringLang/Turing.jl#2555 is solved.
But this is a quick enough fix that should ensure that TSVI continues to work on Julia 1.12 (even if for the wrong reasons). Whether we merge this will probably depend on how fast that Turing issue can be fixed -- if it's soon, then we can remove TSVI, if it's not soon, then this can plug the gap.
Note that if TSVI is opt-in, then we can just use
maxthreadid()
, thereby removing one layer of hackiness — because Mooncake doesn't work with multithreaded execution anyway, the scenarios where you'd want to opt into TSVI have no overlap with the scenarios where you'd want to use Mooncake.