This repository is a collection of CUDA programming experiments and explorations, where we investigate different parallel computing concepts, optimization techniques, and GPU acceleration patterns. Each experiment is designed to explore specific aspects of CUDA programming and GPU computing.
src/
├── 1_vector_addition/ # Exploring basic parallel patterns
│ ├── vector_add.cu # Implementation
│ ├── CMakeLists.txt # Build configuration
│ └── README.md # Experiment details
├── [future experiments]/ # More CUDA explorations
└── common/ # Shared utilities and helpers
- CUDA Toolkit (version 11.0 or higher)
- CMake (version 3.20 or higher)
- C++ compiler with C++20 support
- NVIDIA GPU with compute capability 5.0 or higher
- Create a build directory:
mkdir build
cd build- Configure with CMake:
cmake ..- Build the project:
makeAn exploration of basic parallel patterns:
- Investigating thread organization strategies
- Experimenting with memory access patterns
- Comparing CPU vs GPU performance characteristics
- Analyzing memory transfer overhead
[More experiments to be added...]
- Profiling GPU execution times
- Measuring CPU-GPU data transfer overhead
- Investigating memory bandwidth utilization
- Exploring different thread/block configurations
- Testing various memory access patterns
- Investigating shared memory usage
- Exploring unified memory capabilities
- Analyzing memory coalescing effects
- Thread organization experiments
- Block size optimization
- Memory access pattern analysis
- Synchronization overhead investigation
- Start with baseline implementation
- Identify performance bottlenecks
- Test optimization hypotheses
- Document findings and insights
- NVIDIA Nsight Systems for system-wide analysis
- NVIDIA Nsight Compute for kernel profiling
- Custom timing and measurement utilities
- Performance visualization tools
- Hypothesis and approach
- Experimental setup
- Results and observations
- Conclusions and learnings
We welcome contributions to this experimental project! Feel free to:
- Fork the repository
- Create a feature branch
- Add your experiments
- Push to the branch
- Create a Pull Request
- Clear hypothesis and objectives
- Reproducible setup
- Comprehensive measurements
- Detailed analysis
- Clear conclusions
This project is licensed under the MIT License - see the LICENSE file for details.