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

Do not introduce 0 strides for broadcastable dimensions in DimShuffle #1267

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Mar 5, 2025

Our changes in #1226 led to failures in the PyMC test suited due to our BLAS implementation (at least GEMV) not handling 0 strides well: #1262

The value of the strides for length-1 dimensions is actually arbitrary. In that PR I set it to zero, in this one I set it to itemsize of the array. 1 would be odd? and I don't want to do a silly second loop to give the same sort of strides that np.expand_dims or reshape do.


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

Some poorly implemented BLAS operations don't handle them correctly
Copy link
Member

@aseyboldt aseyboldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.99%. Comparing base (bf628c9) to head (101cb30).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1267   +/-   ##
=======================================
  Coverage   81.99%   81.99%           
=======================================
  Files         188      188           
  Lines       48608    48608           
  Branches     8688     8688           
=======================================
  Hits        39857    39857           
  Misses       6586     6586           
  Partials     2165     2165           

@ricardoV94 ricardoV94 merged commit 89d5366 into pymc-devs:main Mar 5, 2025
74 checks passed
@ricardoV94 ricardoV94 deleted the dimshuffle_default_strides branch March 5, 2025 12:03
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