-
Notifications
You must be signed in to change notification settings - Fork 12
Update Libtask API #42
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
Conversation
Codecov Report
@@ Coverage Diff @@
## releases #42 +/- ##
===========================================
Coverage ? 55.46%
===========================================
Files ? 5
Lines ? 366
Branches ? 0
===========================================
Hits ? 203
Misses ? 163
Partials ? 0 Continue to review full report at Codecov.
|
|
@KDr2 Can you take a look at what's causing the following error? I can't seem to find an obvious issue. https://github.com/TuringLang/AdvancedPS.jl/runs/4914462011?check_suite_focus=true#step:6:63 |
You mean the warning? |
|
That's correct. |
|
This line of IR |
|
@KDr2 Sorry for the confusion - the question is why we have statements like |
|
This is a piece of IRCode which shows the situation: It seems sometimes |
|
thanks, @KDr2 for looking into this. This is a bug. We need to track the statements below onto the tape too, otherwise, the results can be incorrect. %18 = AdvancedPS.observe # <-------------------------------------- HERE
%19 = %6 / 2
%20 = Main.Bernoulli(%19)
%21 = (%18)(%20, 0) # <--------------------------- USED HERE
%24 = Base.identity(%21) |
|
In the |
|
And before that PR, because we need to run the IR to track all the calls, as it runs, all this kind of Statements are evaluated and are used as constant input arguments in instructions, so it works as well. |
|
I re-run the code and print the IR code, it is correct now: I did no changes except printing the IR... |
|
@KDr2 thanks, can you fix the warning messages for the EDIT: shouldn't the following return %24 = Libtask.track!(%22, Base.identity, %21)
return %22 # should this be %24?? |
|
I find the reason why the last few lines were not tracked: I put the Here we put the real return value onto the last instruction (as its output), and return the tape(%22). The |
|
Thanks @KDr2! |
Customised
Libtask.Instruction{observe}is no longer required after TuringLang/Libtask.jl#102