RustGPUX is a high-performance GPU compute framework in Rust that utilizes wgpu to run advanced parallel computations on the GPU. It includes:
✅ Vector Addition – Process 1 million elements on the GPU.
✅ Matrix Multiplication – Optimized parallel matrix operations.
✅ Parallel Reduction – Efficient sum reduction using shared memory.
✅ Gaussian Blur – GPU-powered image processing.
✅ Workgroup Optimization – Fast shared memory optimizations.
- 🚀 Blazing Fast Computation – Leverage GPU parallelism for high-speed number crunching.
- 🖼 GPU Image Processing – Perform Gaussian blur on images.
- 📊 Optimized Workgroup Usage – Use efficient workgroup shared memory.
- 🔥 Scalable & Modular – Supports easy expansion with new compute shaders.
Ensure you have Rust installed:
rustup update
Install dependencies:
cargo add wgpu pollster image bytemuck
git clone https://github.com/Thewsthews/wgpufusion.git
cd wgpufusion
cargo run
Computes the sum of large vectors using GPU parallelism.
Performs A × B matrix multiplication using workgroups for efficiency.
Uses tree reduction to compute sums with minimal overhead.
Applies GPU-based Gaussian blur to images for high-speed filtering.
rustgpux/
├── src/
│ ├── main.rs # Entry point for GPU computations
│ ├── compute.wsgl # GPU compute functions (vector add, reduction, etc.)
├── Cargo.toml # Dependencies and project configuration
├── README.md # Project documentation
Operation | CPU Time | GPU Time |
---|---|---|
Vector Addition (1M) | ~200ms | ~10ms |
Matrix Multiplication (256x256) | ~2s | ~50ms |
Parallel Reduction (1M) | ~500ms | ~15ms |
Gaussian Blur (512x512) | ~300ms | ~12ms |
We welcome contributions! Feel free to fork, submit PRs, or report issues.
- Fork the repository.
- Create a feature branch:
git checkout -b feature-new
- Commit changes:
git commit -m "Add awesome feature"
- Push:
git push origin feature-new
- Open a Pull Request 🚀
This project is licensed under the MIT License – feel free to use and modify! ✨
For any queries or contributions, reach out:
Email: [email protected]
GitHub: Me
More to come soon!
M1