Skip to content

Vectorize softmax and argmax nodes #571

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

Merged

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jan 5, 2024

Description

The Softmax and LogSoftmax unfortunately don't support partial axes, so we have to fallback to Blockwise when more than one axis was used in the core case.

Related Issue

Checklist

Type of change

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

All types of axis arguments are supported by max_and_argmax
Also refactors shared logic for other batch axed Ops
Copy link
Member

@jessegrabowski jessegrabowski 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 to go, who knew vectorzing softmax would require refactoring batch axis handling. The refactor looks much cleaner and more consistent across functions.

@ricardoV94 ricardoV94 merged commit 65967fe into pymc-devs:main Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vectorization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants