Hybridizer Essentials Linux -- Public Beta
Pre-release
Pre-release
Today we are proud to publish Hybridizer Essentials for Linux as a public beta.
New Features
We introduce some new features, so far only available in this beta, such as:
SetDistrib
andSetStream
can be called on the wrapped object instead ofHybRunner
.
This leads to more CUDA-like code, such as
wrapped.SetDistrib(32, 256).SetStream(myStream).myKernel(args...)
cuda.ERROR_CHECK
function simplifies error checking whith CUDA API calls.
cuda.ERROR_CHECK(cuda.Malloc(out ptr, size)) // aborts and prints line and file
- Introduced
hybridizer-cuda
command line tool, which allows user to compile and run a C# file without writing any project or Makefile - When no device code, or no CUDA device is detected, we run the plain C# code with a warning.
Prerequisites
- Tested on Ubuntu 16.04 – should work on other debian-based systems
- Install a version of CUDA (starting at 8.0 – 9.0, 9.1 and 9.2 supported)
- Install Mono (version 5.8.0.108 or later)
Installation
- Install the package :
sudo dpkg -i hybridizer-essentials-amd64-1.0.6151.9352.deb
- Installer should print you about license request -- follow instructions on screen
- If you said no to license request, you can do it later by running
/opt/altimesh/hybridizer-essentials/bin/RequestLicense.exe
Run Example
- Save this in a file Test.cs:
using Hybridizer.Runtime.CUDAImports;
using System;
namespace Test
{
class Program
{
[EntryPoint]
public static void Hello()
{
Console.Out.WriteLine("Hello From GPU");
}
static void Main(string[] args)
{
dynamic wrapped = HybRunner.Cuda().Wrap(new Program());
wrapped.SetDistrib(1, 1).Hello();
}
}
}
- run the command line
/opt/altimesh/hybridizer-essentials/bin/hybridizer-cuda -o Test.exe Test.cs -run
- it should print:
Hello From GPU