Skip to content

Fix np.dtype overload signature drift#797

Merged
brandon-b-miller merged 4 commits intoNVIDIA:mainfrom
cpcloud:fix/numpy-dtype-overload-signature
Feb 20, 2026
Merged

Fix np.dtype overload signature drift#797
brandon-b-miller merged 4 commits intoNVIDIA:mainfrom
cpcloud:fix/numpy-dtype-overload-signature

Conversation

@cpcloud
Copy link
Contributor

@cpcloud cpcloud commented Feb 18, 2026

Summary

  • align CUDA np.dtype overload parameters with NumPy (dtype, align, copy) while avoiding unsupported **kwargs in typing templates
  • align CUDA np.dot and np.vdot overload parameter names with NumPy (a, b, out) so signature-compatibility checks pass across NumPy variants
  • preserve existing lowering behavior for supported dtype and BLAS-backed dot/vdot paths

Extracted from #795 to keep the issue-718 DCE fix focused.

Match the CUDA np.dtype overload parameters to NumPy's public signature so signature-compatibility checks pass on environments where dtype exposes align/copy/kwargs parameters.

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 18, 2026

Automatic reviews are disabled for this repository.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 18, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cpcloud
Copy link
Contributor Author

cpcloud commented Feb 18, 2026

/ok to test

Keep the overload argument names aligned with NumPy while avoiding VAR_KEYWORD in the implementation signature, which breaks CUDA typing on calls like np.dtype("O").

Co-authored-by: Cursor <cursoragent@cursor.com>
@cpcloud
Copy link
Contributor Author

cpcloud commented Feb 18, 2026

/ok to test

Rename CUDA overload parameters for np.dot and np.vdot to match NumPy's public argument names so signature-compatibility checks pass across NumPy variants.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cpcloud
Copy link
Contributor Author

cpcloud commented Feb 18, 2026

/ok to test

Copy link
Contributor

@brandon-b-miller brandon-b-miller left a comment

Choose a reason for hiding this comment

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

cuDF failures are just a broken nightly I think, lets rerun CI in the morning

@brandon-b-miller
Copy link
Contributor

cuDF failures are just a broken nightly I think, lets rerun CI in the morning

Sorry @cpcloud this was wrong, I forgot we're on the stable release of rapids at this point and it looks like cupy 14 is breaking that release. Can we try installing cupy<0.14.0 in the test script before the tests are run?

https://github.com/NVIDIA/numba-cuda/blob/main/ci/test_thirdparty_cudf.sh

We can undo this later after the cupy patch version comes out.

@brandon-b-miller
Copy link
Contributor

/ok to test

@brandon-b-miller brandon-b-miller merged commit 1a82010 into NVIDIA:main Feb 20, 2026
307 of 312 checks passed
@cpcloud cpcloud deleted the fix/numpy-dtype-overload-signature branch February 20, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants