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

Add pinned and as_cuda_array to cudasim mode #9458

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tornikeo
Copy link

I'm working with a small cuda kernel project, and when testing my code with numba sim, I see that cuda.pinned has different arglist (single arg, instead of variadic *args) in these two modes for no good reason.

So, here's a small tweak to make it consistent.

@gmarkall
Copy link
Member

gpuci run tests

@gmarkall gmarkall added 2 - In Progress CUDA CUDA related issue/PR labels Feb 22, 2024
@gmarkall
Copy link
Member

Did this cause an error in your project? Or is this an aesthetic change only?

@tornikeo
Copy link
Author

tornikeo commented Feb 22, 2024

@gmarkall Not an error per se, but it forces me to monkeypatch the cuda.pinned. In a real run, I always pass several arrays in pinned. When I do testing, the pinned just errors out because of this. I'd expect a simulator to follow the real thing as closely as possible (in syntax and everything).

@tornikeo
Copy link
Author

@gmarkall anything I should do for "Check Release Notes" failing?

@gmarkall
Copy link
Member

@tornikeo If you'd like a mention of your fix in the release notes, you could add a release note snippet RST as documented in: https://numba.readthedocs.io/en/stable/developer/contributing.html#release-notes - however, as this is a small change, I'm happy if you'd prefer me to just mark this to skip the release notes check, and then I don't think there's anything further you need to do - let me know what you'd prefer.

@tornikeo
Copy link
Author

@gmarkall Ah, it's a tiny change. No need to pollute the release notes with this. Thanks! 👍

@gmarkall gmarkall added this to the 0.60.0-rc1 milestone Feb 27, 2024
@tornikeo
Copy link
Author

tornikeo commented Mar 2, 2024

@gmarkall somehow function as_cuda_array was missing from numba/cuda/simulator/cudadrv/devicearray.py. Ran into same issue when trying to test numba code on a gpuless machine. Added that function too.

@tornikeo tornikeo changed the title Make pinned ary arglist consistent in cudasim mode Add pinned and as_cuda_array to cudasim mode Mar 2, 2024
@gmarkall gmarkall modified the milestones: 0.60.0-rc1, 0.61.0-rc1 Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In Progress CUDA CUDA related issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants