Skip to content

Conversation

@wsmoses
Copy link
Member

@wsmoses wsmoses commented Dec 26, 2025

lets see what breaks

@giordano giordano added the Julia v1.12 Related to compatibility with Julia v1.12 label Jan 14, 2026
@wsmoses wsmoses force-pushed the wsmoses-patch-6 branch 3 times, most recently from d011669 to 64805e7 Compare January 23, 2026 16:39
@wsmoses wsmoses force-pushed the wsmoses-patch-6 branch 2 times, most recently from 37da646 to 9f5c583 Compare January 26, 2026 16:21
@wsmoses
Copy link
Member Author

wsmoses commented Jan 26, 2026

@penelopeysm the turing test fails for reasons unrealted to enzyme, can you take a look?

@penelopeysm
Copy link
Contributor

I think this should fix it

diff --git a/test/integration/Turing/runtests.jl b/test/integration/Turing/runtests.jl
index 72d4137d..da114da7 100644
--- a/test/integration/Turing/runtests.jl
+++ b/test/integration/Turing/runtests.jl
@@ -17,7 +17,13 @@ adtypes = (
 @model function assume_normal()
     a ~ Normal()
 end
-dppl_lda = begin
+@model function dppl_lda(k, m, w, doc, alpha, beta)
+    theta ~ product_distribution(fill(Dirichlet(alpha), m))
+    phi ~ product_distribution(fill(Dirichlet(beta), k))
+    log_phi_dot_theta = log.(phi * theta)
+    @addlogprob! sum(log_phi_dot_theta[CartesianIndex.(w, doc)])
+end
+dppl_lda_model = begin
     v = 100      # words
     k = 5        # topics
     m = 10       # number of docs
@@ -37,18 +43,12 @@ dppl_lda = begin
             doc[idx + j] = i
         end
     end
-    @model function dppl_lda(k, m, w, doc, alpha, beta)
-        theta ~ product_distribution(fill(Dirichlet(alpha), m))
-        phi ~ product_distribution(fill(Dirichlet(beta), k))
-        log_phi_dot_theta = log.(phi * theta)
-        @addlogprob! sum(log_phi_dot_theta[CartesianIndex.(w, doc)])
-    end
-    dppl_lda
+    dppl_lda(k, m, w, doc, alpha, beta)
 end
 MODELS = [
     DynamicPPL.TestUtils.ALL_MODELS...,
     assume_normal(),
-    dppl_lda(k, m, w, doc, alpha, beta),
+    dppl_lda_model,
 ]
 
 @testset "AD on logdensity" begin

@wsmoses
Copy link
Member Author

wsmoses commented Jan 27, 2026

@penelopeysm can you open a PR to enzyme with your patch? ill rebase this atop that

@wsmoses wsmoses force-pushed the wsmoses-patch-6 branch 9 times, most recently from c2530bf to cf6bc8d Compare February 1, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Julia v1.12 Related to compatibility with Julia v1.12

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants