YC.OpenCL.NET
2.0.4
See the version list below for details.
dotnet add package YC.OpenCL.NET --version 2.0.4
NuGet\Install-Package YC.OpenCL.NET -Version 2.0.4
<PackageReference Include="YC.OpenCL.NET" Version="2.0.4" />
paket add YC.OpenCL.NET --version 2.0.4
#r "nuget: YC.OpenCL.NET, 2.0.4"
// Install YC.OpenCL.NET as a Cake Addin #addin nuget:?package=YC.OpenCL.NET&version=2.0.4 // Install YC.OpenCL.NET as a Cake Tool #tool nuget:?package=YC.OpenCL.NET&version=2.0.4
Brahma.FSharp
Brahma.FSharp provides a way to utilize GPGPU in your F# programs. It is based on F# quotations to OpenCL translation.
Features
- Utilization of OpenCL for communication with GPU. So, you can work not only with NVIDIA devices but with any device which supports OpenCL (e.g. with AMD or Intel devices).
- Not only primitive types, but also discriminated unions, structs, records are supported.
- Pattern matching, mutable and immutable bindings, nested bindings are supported.
- Custom atomics.
- Fine-grained memory management and kernels compilation process.
- Mailbox processor based interface for communication with devices.
More details are available here.
Installation
Install Brahma.FSharp by running:
dotnet add package Brahma.FSharp
Setup BRAHMA_OCL_PATH environment variable to opencl.dll location if it differs from default.
Quick Start
open Brahma.FSharp
let device = ClDevice.GetFirstAppropriateDevice()
let context = RuntimeContext(device)
let kernel =
<@
fun (range: Range1D) (buffer: int clarray) ->
let gid = range.GlobalID0
buffer.[gid] <- buffer.[gid] + 1
@>
opencl {
use! buffer = ClArray.alloc<int> 1024
do! runCommand kernel <| fun kernel ->
kernel
<| Range1D(1024, 256)
<| buffer
return! ClArray.toHost buffer
}
|> ClTask.runSync context
Contributing
Contributions, issues and feature requests are welcome. Feel free to check issues page if you want to contribute.
Build
Make sure the following requirements are installed on your system:
- dotnet SDK 7.0 or higher
- OpenCL-compatible device and respective OpenCL driver
To build and run all tests:
- on Windows
build.cmd
- on Linux/macOS
./build.sh
To find more options look at MiniScaffold. We use it in our project.
License
This project licensed under EPL-1.0 License. License text can be found in the license file.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- ExtraConstraints.Fody (= 1.14.0)
- Microsoft.Build.Framework (= 16.10.0)
- System.CodeDom (>= 7.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on YC.OpenCL.NET:
Package | Downloads |
---|---|
Brahma.FSharp
Core components of Brahma.FSharp. |
|
Brahma.FSharp.OpenCL.Shared
Shared components for Brahma.FSharp project. |
|
Brahma.FSharp.OpenCL.Extensions
Brahma.FSharp does the thing! |
|
YC.Brahma.OpenCL
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.0-alpha1.5 | 102 | 4/17/2024 |
3.0.0-alpha1.3 | 67 | 4/12/2024 |
3.0.0-alpha1.2 | 59 | 4/12/2024 |
3.0.0-alpha1.1 | 66 | 4/9/2024 |
2.0.5 | 2,562 | 2/10/2023 |
2.0.4 | 739 | 1/13/2023 |
2.0.3 | 3,080 | 1/4/2023 |
2.0.2 | 695 | 12/28/2022 |
2.0.1 | 2,251 | 8/5/2022 |
2.0.0 | 1,762 | 7/5/2022 |
2.0.0-alpha9.6 | 191 | 6/3/2022 |
2.0.0-alpha9.5 | 154 | 5/7/2022 |
2.0.0-alpha9.4 | 148 | 4/8/2022 |
2.0.0-alpha9.3 | 150 | 3/24/2022 |
2.0.0-alpha9.2 | 1,332 | 11/26/2021 |
2.0.0-alpha9.1 | 333 | 10/16/2021 |
2.0.0-alpha9 | 257 | 10/15/2021 |
2.0.0-alpha8 | 597 | 9/27/2021 |
2.0.0-alpha7.1 | 189 | 7/18/2021 |
2.0.0-alpha7 | 768 | 5/19/2021 |
2.0.0-alpha6.2 | 235 | 5/19/2021 |
2.0.0-alpha6.1 | 274 | 3/22/2021 |
2.0.0-alpha6 | 756 | 3/22/2021 |
2.0.0-alpha5 | 912 | 1/27/2021 |
2.0.0-alpha4 | 843 | 12/27/2020 |
2.0.0-alpha3 | 887 | 11/27/2020 |
2.0.0-alpha2 | 444 | 11/11/2020 |
## [2.0.4] - 2023-01-13
[2.0.4]: https://github.com/YaccConstructor/Brahma.FSharp/compare/v2.0.4...v2.0.4
### Added
- LocalMemSize and GlobalMemSize Device properties.
### Fixed
- Issue #145