项目作者: DanWBR

项目描述 :
Linux/macOS compatible CUDAfy.NET version
高级语言: C#
项目地址: git://github.com/DanWBR/Cudafy.NET.git
创建时间: 2018-08-16T19:37:58Z
项目社区:https://github.com/DanWBR/Cudafy.NET

开源协议:GNU Lesser General Public License v2.1

下载


Cudafy.NET

This is an update of the original Cudafy.NET library hosted on CodePlex to support Mono on macOS and Linux.

Compiling

The solution was updated to create a single DLL by using ilmerge on the Cudafy.NET project. Compile with VS 2017, target Release/AnyCPU.

General Tips

After compiling, create a file named Cudafy.NET.dll.config, with the following contents:

  1. <configuration>
  2. <dllmap dll="OpenCL" target="/opt/intel/opencl/lib64/libOpenCL.so" os="!windows,osx" ></dllmap>
  3. <dllmap dll="OpenCL" target="/System/Library/Framework/OpenCL.framework/OpenCL" os="osx" ></dllmap>
  4. </configuration>

For OpenCL support on Linux with Intel Processors, install the Intel OpenCL Runtimes: https://software.intel.com/en-us/articles/opencl-drivers#cpu-lin-rh

No further action is required on macOS.

Remarks

Dynamic launching of gpu functions is not supported on Linux, i.e.

  1. gpu.Launch().thekernel();

will throw a “Missing Member” exception. Only the Standard Launch will work:

  1. gpu.Launch(1,1, thekernel”);

Screenshots

Cudafy working on DWSIM on macOS and Linux:

macOS

Linux