Skip to content

Control flow support #107

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
merged 21 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/BenchmarksAndMicroIntegration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
using Pkg
try
# force it to use this PR's version of the package
pkg"add Turing#master" # TODO: remove this when Turing is updated
pkg"add Turing#libtask-integration"
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
Pkg.update()
catch err
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/IntegrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
package:
- {user: TuringLang, repo: AdvancedPS.jl, ref: releases}
- {user: TuringLang, repo: Turing.jl, ref: hg/new-libtask2}
- {user: TuringLang, repo: Turing.jl, ref: libtask-integration}

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
license = "MIT"
desc = "Tape based task copying in Turing"
repo = "https://github.com/TuringLang/Libtask.jl.git"
version = "0.6.5"
version = "0.6.6"

[deps]
IRTools = "7869d1d1-7146-5819-86e3-90919afe41df"
Expand Down
8 changes: 4 additions & 4 deletions perf/p0.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ args = m.evaluator[2:end];
t = @btime Libtask.CTask(f, args...)
# schedule(t.task) # work fine!
# @show Libtask.result(t.tf)
@show "Step in a tape..."
@btime Libtask.step_in(t.tf, args)
@show "Run a tape..."
@btime t.tf(args...)

# Case 2: SMC sampler

Expand All @@ -43,5 +43,5 @@ m = Turing.Core.TracedModel(gdemo(1.5, 2.), Sampler(SMC(50)), VarInfo());
t = @btime Libtask.CTask(m.evaluator[1], m.evaluator[2:end]...);
# schedule(t.task)
# @show Libtask.result(t.tf.tape)
@show "Step in a tape..."
@btime Libtask.step_in(t.tf, m.evaluator[2:end])
@show "Run a tape..."
@btime t.tf(m.evaluator[2:end]...)
2 changes: 1 addition & 1 deletion perf/p2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ args = m.evaluator[2:end]

t = Libtask.CTask(f, args...)

Libtask.step_in(t.tf, args)
t.tf(args...)

@show Libtask.result(t.tf)
Loading