A high-performance computing project implementing and optimizing various CUDA-based 1D convolution algorithms. This repository explores different optimization techniques and compares their performance on HPC systems.
This project implements multiple approaches to 1D convolution using CUDA, focusing on performance optimization through:
- Basic CUDA implementation - Baseline GPU implementation
- Shared memory optimization - Leveraging fast on-chip memory
- cuBLAS integration - Using optimized linear algebra libraries
- Performance benchmarking - Comprehensive speed comparisons
- 🚀 Multiple CUDA kernel implementations
- 📊 Comprehensive performance benchmarking
- 🔧 Modular design for easy algorithm comparison
- 🎯 Optimized for HPC environments
- ✅ Reference validation against CPU implementation
├── fp/ # Main convolution implementations
│ ├── basic_conv1d.cu # Basic CUDA kernel
│ ├── conv1d_cublas.cu # cuBLAS-optimized version
│ ├── conv1d_sharedMemory.cu # Shared memory optimization
│ ├── conv1d-main.cc # Main benchmark harness
│ └── reference_validation.py # Python validation script
├── common/ # Shared utilities and benchmarking tools
└── cmake/ # CMake configuration files
- CUDA Toolkit (11.0+)
- CMake (3.18+)
- C++ compiler with C++17 support (GCC 7+ or Clang 5+)
- cuBLAS library
- Python 3 (for validation scripts)
- Clone the repository:
git clone <repository-url>
cd 1D-convolution-optimizations- Configure the build system:
cmake .- Build the project:
makeNavigate to the fp/ directory and run the main benchmark:
cd fp
./conv1d-mainThis will execute all implemented convolution algorithms and provide performance comparisons.
The benchmark suite measures and compares:
- Execution time across different input sizes
- Memory bandwidth utilization
- Speedup factors relative to baseline implementations
- Scalability on multi-GPU systems
Feel free to submit issues and enhancement requests. Contributions are welcome!