Skip to content

Some numba backend fixes #46

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
merged 17 commits into from
Dec 2, 2022
Merged

Some numba backend fixes #46

merged 17 commits into from
Dec 2, 2022

Conversation

aseyboldt
Copy link
Member

  • implementations for numba special functions
  • numba impl fix for cumop
  • Fix for numba svd
  • Preserve names in graph replacements
  • Remove broken AdvancdIndexing numba op
  • Deal with negative axis args
  • numba impl for checkandraise

@aseyboldt aseyboldt changed the title WIP Some changes I made to aesara (mostly numba backend) WIP Some numba backend fixes Nov 28, 2022
@twiecki
Copy link
Member

twiecki commented Nov 28, 2022

@aseyboldt Are you porting over a PR from aesara? If so, you can use the bin/downstream_pr.sh script to auto-rename.

@aseyboldt
Copy link
Member Author

Yes, I just wanted to make sure we don't duplicate that work

Comment on lines 167 to 176
def normalize_axis(axis, ndim):
if axis is None:
return axis

if axis < 0:
axis = ndim + axis

if axis < 0 or axis >= ndim:
raise np.AxisError(ndim=ndim, axis=axis)
return axis
Copy link
Member

@ricardoV94 ricardoV94 Nov 29, 2022

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Dod you decide not to use these?

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry, done

@ricardoV94 ricardoV94 added numba bug Something isn't working labels Nov 29, 2022
@aseyboldt aseyboldt marked this pull request as ready for review November 30, 2022 21:27
@aseyboldt aseyboldt changed the title WIP Some numba backend fixes Some numba backend fixes Nov 30, 2022
Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

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

LGTM, just the nitpick not to reinvent the numpy axis helpers.


@dataclass
class Signature:
res_dtype: DTypeLike
Copy link
Member

@ferrine ferrine Dec 2, 2022

Choose a reason for hiding this comment

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

is it a single output signature?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this currently only supports scalar return values. This is all we need for the scipy.special functions, but if we need more later (maybe for some linalg stuff?) we might have to expand it a bit.

@aseyboldt aseyboldt merged commit 5961b23 into pymc-devs:main Dec 2, 2022
@ricardoV94 ricardoV94 mentioned this pull request Dec 16, 2022
@aseyboldt aseyboldt mentioned this pull request Jan 3, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working numba
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants