Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPU-CoDaSHep-Princeton

This repository provides tutorials, demos, and analysis scripts for GPU programming, tailored for the Princeton CoDAS-HEP course. Materials are organized into modules covering CUDA basics, unified memory, streaming, profiling, HEP physics usecases and neural network demos.

Presentations:

Repository Structure

  • 01/ – Introductory CUDA C notebooks and exercises

    • Presentations (AC_CUDA_C_*.pptx)
    • Main tutorial notebook: Session1.ipynb
    • Subfolders:
      • 01-hello/ to 09-heat/: Step-by-step CUDA examples (hello world, parallelism, indices, loops, memory allocation, error handling, vector addition, matrix multiplication, heat conduction)
      • edit/: Editable files for exercises
  • 02/ – Unified Memory tutorials

    • Main notebook: Session2_advanced.ipynb
    • Subfolders: Vector addition, device properties, page faults, prefetching, SAXPY example, and editable files
  • 03/ – Streaming and Visual Profiling

    • Main notebook: Streaming and Visual Profiling.ipynb
    • Subfolders: Vector addition, kernel initialization, prefetch checks, stream introduction, manual memory allocation, overlap transfer, n-body simulation, and editable files
  • 04/ – Additional CUDA modules

    • Notebooks: lesson-5-project.ipynb, lesson-5-workbook.ipynb, Session3_Python-GPU_HEP.ipynb
  • 05/ – Generator tutorials

    • Notebooks: generator_tutorial_gpu.ipynb, generator_tutorial_gpu_annotated.ipynb
  • 06/ – HEP analysis and demos

    • Notebooks: gpu_dd4hep_tilecal.ipynb
    • Documentation: gpu_geant4_dd4hep_cuda_notebook.md
    • Tutorials: particle_physics_generators_tutorial.ipynb
  • 07/ – Neural Network Demos and Analysis Scripts

    • Notebooks: cuda_neural_network_demo_complete.ipynb
    • Scripts: verify_notebook.py
    • Demos: gpu-demo/
  • 08/ – Miscellaneous challenges and verification

    • Code: 01-nbody.cu
    • Notebook: GPU challenge.ipynb

Notebooks

Each module contains Jupyter notebooks (.ipynb) with explanations, code samples, and exercises. Topics include:

  • CUDA programming basics
  • Memory management (device, unified memory)
  • Parallel algorithms (vector/matrix operations, heat conduction)
  • Streaming and concurrency
  • Profiling and performance analysis
  • HEP event generation and analysis
  • Neural network demos

Scripts

  • 07/verify_notebook.py:
    Analyze notebook structure, extract code cells to files, and report statistics on content and coverage.

Credits

Getting Started

  1. Clone the repository.
  2. Open the notebooks in Jupyter or VS Code.
  3. Follow the step-by-step exercises in each module.
  4. Use the verification script to analyze or extract code from notebooks:
    python 08/verify_notebook.py <notebook_path>

License

Refer to individual files and notebooks for licensing and attribution information.


For more details, explore the subfolders and notebooks in each module.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages