Skip to content
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

Add jax dispatch for KroneckerProduct Op #822

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

jessegrabowski
Copy link
Member

Description

#622 broke the JAX dispatch for pt.nlinalg.kron, because we're wrapping it in a dummy OpFromGraph(inline=False). I tried just changing it to inline=True, but got some dynamic shape errors when the graph was converted to JAX. I think it's easier to just directly register the new OpFromGraph to jnp.kron, which this PR does. It also adds a test.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

Copy link

codecov bot commented Jun 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.87%. Comparing base (0e29d76) to head (e21e50b).
Report is 161 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #822   +/-   ##
=======================================
  Coverage   80.87%   80.87%           
=======================================
  Files         163      163           
  Lines       46847    46852    +5     
  Branches    11463    11464    +1     
=======================================
+ Hits        37887    37892    +5     
  Misses       6750     6750           
  Partials     2210     2210           
Files with missing lines Coverage Δ
pytensor/link/jax/dispatch/nlinalg.py 91.01% <100.00%> (+0.53%) ⬆️

@jessegrabowski jessegrabowski merged commit efa845a into pymc-devs:main Jun 15, 2024
56 checks passed
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.

2 participants