Skip to content

Commit 0ff56dc

Browse files
committed
Butify main readme.
1 parent f76a705 commit 0ff56dc

File tree

1 file changed

+49
-18
lines changed

1 file changed

+49
-18
lines changed

README.md

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,65 @@
1-
# Brahma.FSharp examples
1+
# Brahma.FSharp GPGPU Examples: Image Processing & Matrix Multiplication
2+
3+
GitHub Actions |
4+
:---: |
5+
[![GitHub Actions](https://github.com/gsvgit/ImageProcessing/workflows/Build%20master/badge.svg)](https://github.com/gsvgit/ImageProcessing/actions?query=branch%3Amaster) |
6+
[![Build History](https://buildstats.info/github/chart/gsvgit/ImageProcessing)](https://github.com/gsvgit/ImageProcessing/actions?query=branch%3Amaster) |
7+
8+
---
9+
10+
This repository contains practical, educational examples of **General-Purpose computing on Graphics Processing Units (GPGPU)** using the **F#** programming language. It serves as a hands-on guide to leveraging the [**Brahma.FSharp**](https://github.com/YaccConstructor/Brahma.FSharp) library for writing parallel code that executes on OpenCL-compatible devices like GPUs.
11+
12+
The primary goal is to demonstrate how to accelerate common computational problems by offloading them from the CPU to the GPU, showcasing both the performance potential and the implementation patterns in F#.
213

314
Few example how to utilize GPGPU in F# code using [Brahma.FSharp](https://github.com/YaccConstructor/Brahma.FSharp).
415

5-
- [Image processing](src/ImageProcessing)
6-
- [Matrix multiplication](src/MatrixMultiplication)
16+
## ✨ Features
17+
18+
This project currently includes two classic GPGPU examples:
19+
20+
1. **Image Convolution**: Applies various filters (like blur, sharpen, edge detection) to images. This operation is inherently parallel, as each output pixel can be computed independently from its neighbors, making it an ideal candidate for GPU acceleration. (Located in [`src/ImageProcessing/`](src/ImageProcessing)).
21+
2. **Matrix Multiplication**: Implements the multiplication of two large matrices on the GPU. This is a fundamental operation in many scientific and engineering domains and perfectly illustrates data-parallel computing. (Located in [`src/MatrixMultiplication/`](src/MatrixMultiplication) ).
22+
23+
Both examples are designed to be simple to understand while demonstrating core concepts like kernel definition, memory management, and execution on a compute device.
724

825
---
926

10-
## Builds
27+
## 📁 Repository Structure
1128

29+
The project is organized for clarity and ease of navigation:
1230

13-
GitHub Actions |
14-
:---: |
15-
[![GitHub Actions](https://github.com/gsvgit/ImageProcessing/workflows/Build%20master/badge.svg)](https://github.com/gsvgit/ImageProcessing/actions?query=branch%3Amaster) |
16-
[![Build History](https://buildstats.info/github/chart/gsvgit/ImageProcessing)](https://github.com/gsvgit/ImageProcessing/actions?query=branch%3Amaster) |
31+
* `src/`: Contains all source code.
32+
* `ImageProcessing/`: The image convolution example and related logic.
33+
* `MatrixMultiplication/`: The matrix multiplication implementation.
34+
* `tests/`: Unit tests for the examples, ensuring correctness.
35+
* `ImageProcessing.Tests/`
36+
* `.github/workflows/`: GitHub Actions CI/CD pipelines for automated building and testing.
1737

18-
---
1938

20-
### Developing
39+
## 🚀 Getting Started
2140

22-
Make sure the following **requirements** are installed on your system:
41+
Follow these instructions to get the project up and running on your local machine for development and experimentation.
2342

24-
- [dotnet SDK 9.0](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) or higher
25-
- OpenCL-compatible device with respective driver installed.
43+
### Prerequisites
2644

27-
---
45+
Before you begin, ensure you have the following installed:
46+
47+
* **[.NET 9.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)** or higher.
48+
* **Option A (Recommended for GPU acceleration):** An **OpenCL-compatible device** (e.g., a discrete or integrated GPU) with the **respective vendor driver** installed. (e.g., NVIDIA drivers for NVIDIA GPUs, ROCm or AMD drivers for AMD GPUs, or Intel OpenCL runtime for Intel GPUs/CPUs).
49+
* **Option B (CPU fallback - great for testing/learning):** If you don't have a GPU or want to experiment on CPU first, install **[POCL](http://portablecl.org/) (Portable Computing Language)**. POCL is an open-source OpenCL implementation that runs on CPUs, allowing you to run all examples without dedicated graphics hardware.
50+
* **On Ubuntu/Debian:** `sudo apt install pocl-opencl-icd`
51+
* Check the [official POCL installation guide](https://portablecl.org/docs/html/install.html) for installation options.
2852

29-
### Building
53+
### Installation & Build
3054

55+
1. **Clone the repository:**
56+
```bash
57+
git clone https://github.com/gsvgit/ImageProcessing.git
58+
cd ImageProcessing
59+
```
3160

32-
```sh
33-
dotnet build -c Release
34-
```
61+
2. **Build the project:**
62+
This command compiles the code and restores any necessary NuGet packages.
63+
```bash
64+
dotnet build -c Release
65+
```

0 commit comments

Comments
 (0)