Skip to content

Implement SymbolicRVOp#2186

Draft
ricardoV94 wants to merge 2 commits into
pymc-devs:mainfrom
ricardoV94:symbolicOp_rvs
Draft

Implement SymbolicRVOp#2186
ricardoV94 wants to merge 2 commits into
pymc-devs:mainfrom
ricardoV94:symbolicOp_rvs

Conversation

@ricardoV94
Copy link
Copy Markdown
Member

@ricardoV94 ricardoV94 commented May 28, 2026

Closes #1221

We get huge speedup on batched MvNormal draws because we can split the cholesky from the random draw loop. Also fixes a bunch of cases that would fail in numba due to numba np.dot overload limitations that we work around in our direct dispatch of Dot.

Will also help reducing Ops and supporting other backends.

This PR sets up the stage, and should be followed up by simplifications of trivial variables like HalfNormal = abs(Normal) and the like.

It may also facilitate autodiff since most natural implementations would be the "trick" ones, but that's not the motivation for this PR

Still heavily bot generated. Need to clean up. And think about inlining at some stage of the pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port SymbolicRandomVariable Op to PyTensor and get rid of many RVs in PyTensor

1 participant