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

Only do reshapes in tensordot when needed #1202

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Feb 11, 2025

This eagerly simplifies the graph in cases where tensordot is just a fancy dot (potentially with transposes)

Closes #1201


📚 Documentation preview 📚: https://pytensor--1202.org.readthedocs.build/en/1202/

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.31%. Comparing base (65b96c1) to head (d73ee83).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1202      +/-   ##
==========================================
+ Coverage   82.27%   82.31%   +0.04%     
==========================================
  Files         186      186              
  Lines       48018    48018              
  Branches     8634     8635       +1     
==========================================
+ Hits        39505    39525      +20     
+ Misses       6362     6342      -20     
  Partials     2151     2151              
Files with missing lines Coverage Δ
pytensor/tensor/math.py 92.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@ricardoV94 ricardoV94 force-pushed the tensordot_useless_reshape branch from 2a539bc to d73ee83 Compare February 17, 2025 11:03
@ricardoV94 ricardoV94 merged commit 8e5e8a4 into pymc-devs:main Feb 17, 2025
64 checks passed
@ricardoV94 ricardoV94 deleted the tensordot_useless_reshape branch February 17, 2025 12:27
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.

Shortcut to dot when calling tensordot
2 participants