Skip to content

Conversation

@qianglise
Copy link
Contributor

adding cupy episode related to ENCCS/hpda-python#111

  • all examples were tested, but a few examples are not working/crashing, marked by FIXME for now
  • stream is only mentioned in the episode, I think it is more advanced topic, that is why I did not include it. Let me know if we should add something related to that

Copy link

@ffrancesco94 ffrancesco94 left a comment

Choose a reason for hiding this comment

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

I really liked it. The cupy vs numpy/scipy gotcha section is gold. I only pointed out a couple of minor typos and a doubt I had about one thing, but as soon as the broken examples are fixed (or the reason why they're broken is known) for me it's mergeable!

EDIT: regarding the stream thing, I think it's ok like this. It could be part of a bonus episode maybe. But as things look now, we either assume that people already know about the GPU execution model or they don't care and just want to gpu-ify their code, so they don't want to bother with that level of granularity.

Copy link
Contributor

@ashwinvis ashwinvis left a comment

Choose a reason for hiding this comment

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

Few more comments, and another general one which applies to many places: try to look for the term cupy. and use backticks so that we recognize it is code and not part of the text.

Copy link
Contributor

@ashwinvis ashwinvis left a comment

Choose a reason for hiding this comment

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

Some more fixme left.

(see [CUDA Array Interface](https://numba.readthedocs.io/en/stable/cuda/cuda_array_interface.html)
for details). It means one can pass CuPy arrays to kernels JITed with Numba.

################### FIXME: crashes when launching
Copy link
Contributor

Choose a reason for hiding this comment

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

This?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it still crashes for me when I did the test on Tetralith.
I have to make a test on a different cluster

@qianglise
Copy link
Contributor Author

Few more comments, and another general one which applies to many places: try to look for the term cupy. and use backticks so that we recognize it is code and not part of the text.

fixed in f22c022

@qianglise
Copy link
Contributor Author

@ashwinvis @ffrancesco94 all the comments are implemented except one which is the crashing of the numba. I need more time on that. For now I would say I will merge the PR, and later remove the FIXME warning after testing on a different machine.

Copy link
Contributor

@ashwinvis ashwinvis left a comment

Choose a reason for hiding this comment

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

Describe CUB

@ashwinvis
Copy link
Contributor

Thanks @qianglise, I will merge as it is.

@ashwinvis ashwinvis merged commit 9296170 into main Dec 19, 2025
4 checks passed
@qianglise qianglise deleted the ql-cupy branch December 19, 2025 14:50
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.

4 participants