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

Update to numba-cuda 0.4.0 and allow numba 0.61. #17830

Open
wants to merge 2 commits into
base: branch-25.04
Choose a base branch
from

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Jan 27, 2025

Description

This PR updates to numba-cuda 0.4 and numba 0.61.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@bdice bdice requested a review from a team as a code owner January 27, 2025 17:46
@bdice bdice requested a review from msarahan January 27, 2025 17:46
@github-actions github-actions bot added the Python Affects Python cuDF API. label Jan 27, 2025
@bdice
Copy link
Contributor Author

bdice commented Jan 28, 2025

@gmarkall This PR reproduces the test failures we saw earlier. Could you take a peek?

Failures look like:

 FAILED test_unaops.py::test_scalar_unary_operations[False-bool-floor] - AssertionError: assert dtype('bool') == dtype('float32')
 +  where dtype('bool') = np.False_.dtype
 +  and   dtype('float32') = Scalar(0.0, dtype=float32).dtype

@gmarkall
Copy link
Contributor

I think these are a result of numpy/numpy#26766 - I can't see the Numba / Numba-CUDA connection.

@vyasr vyasr changed the base branch from branch-25.02 to branch-25.04 January 31, 2025 19:36
@vyasr
Copy link
Contributor

vyasr commented Feb 4, 2025

What do we need to do here? Are we thinking that the problem is not in numba, but rather that numba was previously constraining the numpy version for us and that cudf needs to adapt now for the new numpy version?

@gmarkall
Copy link
Contributor

gmarkall commented Feb 4, 2025

Yeah, it's just that Numba was constraining the NumPy version. From NumPy 2.1 onwards, floor, ceil, and trunc will return integer-dtyped results when the input is an integer. I'm not sure of the right course of action because I don't have enough cuDF expertise, but... Looking at test_unaops, for example, I guess the options would be to:

  • Modify the tests so that it accepts cuDF producing float results for these functions even when NumPy produces ints
  • Modify unary ops so that they also produce int results where NumPy would have done.

I guess the answer might depend on whether pandas changes the dtype for operations like these when the NumPy version changes - I don't know which way is goes, though.

(If the above just makes no sense, please ignore me, I don't know what I'm talking about 🙂)

@vyasr
Copy link
Contributor

vyasr commented Feb 5, 2025

@bdice I think the immediate question here is regarding the scope of this PR. Either you can add an explicit upper bound on numpy, unpin numba, open a separate issue for unpinning numpy, then get this PR merged, or you can try to resolve the numpy issues. I'd maybe suggest trying the latter quickly and if you get stuck then switch to the former, but really up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python Affects Python cuDF API.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants