Skip to content

[ENHANCEMENT]: Potential Contribution Areas for Jupyter Notebooks #33

@snwagh

Description

@snwagh

Is this a duplicate?

Describe the enhancement or new material

Assumption: I believe this work is focused on CUDA-enabled NVIDIA GPUs but not explicitly mentioned, but you could enhance its usability on non-GPU systems or add the top level requirement to the main README.


1. Documentation and Explanations in Notebooks

  • gpu-python-tutorial/2.0_Numba.ipynb: Could benefit from a deeper explanation of thread blocks and grid sizes in relation to Numba. Adding more detailed explanations, especially for concepts like threads, blocks, memory management, or even explaining code snippets step-by-step, could improve the Python audience reach.
  • gpu-python-tutorial/5.0_Cupy.ipynb: Adding more context on when and why CuPy may be more efficient than NumPy. Qualitative guidelines are helpful for someone to quickly map out this landscape.

2. Expand Practical Examples

  • A few notebooks are heavily focused on demonstrating functions but could use real-world examples. Adding practical use cases, such as common data processing or matrix operations, can make learning more engaging.
    • gpu-python-tutorial/3.1_Numba_lab_2.ipynb: Add practical exercises, like a matrix multiplication or simple image processing example.
    • gpu-python-tutorial/6.0_cuDF.ipynb and gpu-python-tutorial/7.0_cuML.ipynb: Expand examples to show data science workflows or simple machine learning tasks.

3. Enhance Notebook Performance Comparisons

  • gpu-python-tutorial/1.0_CPU_GPU_Comparison.ipynb: It would be good to expand these comparisons with more metrics to illustrate the performance difference more fully. The video in this notebook appears to be the core meet of this notebook but is missing.
  • gpu-python-tutorial/8.0_Multi-GPU_with_Dask.ipynb: Include metrics on memory and data transfer across GPUs, as Dask enables multi-GPU functionality.

4. Nitpick: More Error Handling for Compatibility

  • Some notebooks, like those relying on CuPy or pyNVML, assume the user has a compatible NVIDIA GPU, but there’s no handling for cases where a user may not have that GPU. Adding checks and error messages can improve the user experience for those testing on CPU-only machines.

    • gpu-python-tutorial/4.0_pyNVML.ipynb: Add error handling for pynvml.nvmlInit() in case pyNVML isn't compatible or doesn’t detect an NVIDIA GPU.
    • gpu-python-tutorial/5.0_Cupy.ipynb: Ensure that CuPy gracefully fails or provides alternatives when no compatible GPU is found.
    • gpu-python-tutorial/3.0_Numba_gauss.ipynb: Add a CPU path using standard Python if the GPU is unavailable.
    • gpu-python-tutorial/5.2_Cupy_Lab_solution.ipynb: Introduce CPU-compatible options using NumPy for users without CuPy support.
  • gpu-python-tutorial/2.1_Numba_lab.ipynb has placeholders or contain incomplete cells or hints that the user should fill them in. Would be good to have example on what data types are supported etc.


Were any of the existing materials helpful?

Great work and thought leadership into making GPU programming more accessible. Added my few thoughts on making this resource more impactful for users at all levels.

Additional context

I would like to look into simplifying my work on secure computation to using these improvements on GPUs and complete the CPU, GPU benchmarks (but for secure computation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions