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

Passing cupy arrays to the compiler backend #224

Closed
bouweandela opened this issue Nov 2, 2023 · 1 comment · Fixed by #226
Closed

Passing cupy arrays to the compiler backend #224

bouweandela opened this issue Nov 2, 2023 · 1 comment · Fixed by #226

Comments

@bouweandela
Copy link
Contributor

In a project that I'm working on, it would be useful to be able to create the arrays with cupy and then pass them to the C++ code (that contains a mix of cuda library, e.g. cufft, calls and custom kernels). Is this a feature that is of interest? I got it to work locally, so I could make a pull request if you're interested.

At the moment, this fails on this check and missing support further on in the same function:

if not isinstance(arg, (np.ndarray, np.number)):

@benvanwerkhoven
Copy link
Collaborator

Hi Bouwe! I think I've looked at this in the past, but back then I thought it was not possible to recover the underlying pointer to device memory from a cupy array object. I'm very happy to hear that you got this to work! I think this could be a very nice addition to the compiler backend to support this as well.

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 a pull request may close this issue.

2 participants