We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ea4ac commit f8c45c2Copy full SHA for f8c45c2
test/threadsafe.jl
@@ -12,6 +12,16 @@
12
@test all(accs == expected_accs for accs in threadsafe_vi.accs_by_thread)
13
end
14
15
+ @testset "setthreadsafe" begin
16
+ @model f() = x ~ Normal()
17
+ model = f()
18
+ @test !DynamicPPL._requires_threadsafe(model)
19
+ model = setthreadsafe(model, true)
20
+ @test DynamicPPL._requires_threadsafe(model)
21
+ model = setthreadsafe(model, false)
22
23
+ end
24
+
25
# TODO: Add more tests of the public API
26
@testset "API" begin
27
vi = VarInfo(gdemo_default)
@@ -41,8 +51,6 @@
41
51
42
52
43
53
@testset "model" begin
44
- println("Peforming threading tests with $(Threads.nthreads()) threads")
45
-
46
54
x = rand(10_000)
47
55
48
56
@model function wthreads(x)
0 commit comments