andreinechaev / nvcc4jupyter

A plugin for Jupyter Notebook to run CUDA C/C++ code
MIT License
200 stars 87 forks source link

Add example notebooks for compiling with opencv and an adaptation of a CUDA training series #34

Closed cosminc98 closed 5 months ago

cosminc98 commented 5 months ago

I am trying to adapt this CUDA training series to use our library in order to create possibly the most efficient way to learn CUDA C++ available on the internet. The first session was adapted, but I would require some feedback. @andreinechaev If you have the time, you can run the notebook on either Colab or Kaggle. I will add a README.md in the "notebooks" directory at some point describing how to import from Kaggle these notebooks straight from GitHub.

andreinechaev commented 5 months ago

I am trying to adapt this CUDA training series to use our library in order to create possibly the most efficient way to learn CUDA C++ available on the internet. The first session was adapted, but I would require some feedback. @andreinechaev If you have the time, you can run the notebook on either Colab or Kaggle. I will add a README.md in the "notebooks" directory at some point describing how to import from Kaggle these notebooks straight from GitHub.

Great, nice initiative @cosminc98 I will check it when I have time. Will try to do it ASAP

andreinechaev commented 5 months ago

@cosminc98 Thank you for your contribution. I think you provided clean notebooks, it is easy to read and to follow them. If you think that we should merge, I can proceed. If you're looking for enhancements, CUDA is very verbose, so splitting the solution in multiple cells, can make it even better. It will involve splitting the files, so it might be an overkill. Anyway, I leave it for your judgment. Thanks!

cosminc98 commented 5 months ago

@andreinechaev Thanks for the feedback! I'll try to have a look ASAP if there's a way to split them in a way to be as easy to read as possible.

cosminc98 commented 5 months ago

@andreinechaev I've split the code in the OpenCV notebook into more manageable pieces. As for the CUDA intro notebook, I think it may be a bit too confusing to beginners to have the kernel function in a separate cell (as I think that would be the only split that can be reasonably done). If it's all in one cell, they can immediately run the cell and see if they got the correct assignment solution. I think we can introduce more modularity in the next notebooks, as users will have had a bit more experience (with both CUDA and the library). What do you think?

andreinechaev commented 5 months ago

@andreinechaev I've split the code in the OpenCV notebook into more manageable pieces. As for the CUDA intro notebook, I think it may be a bit too confusing to beginners to have the kernel function in a separate cell (as I think that would be the only split that can be reasonably done). If it's all in one cell, they can immediately run the cell and see if they got the correct assignment solution. I think we can introduce more modularity in the next notebooks, as users will have had a bit more experience (with both CUDA and the library). What do you think?

I see, thank you @cosminc98 . I believe it's a reasonable explanation. The notebook looks good. Shall we proceed with merging?