Hybridizer Basic Samples Versions Save

Examples of C# code compiled to GPU by hybridizer

1.2.10021

5 years ago
  • CUDA 10 basic support : no cudaGraph_t no grid-wide synchronization

  • better error reporting

  • more early exit on unsupported code paths.

  • many bug fixes about generic code

  • bug fixes about Func<>

1.1.9833

5 years ago
  • AVX/AVX2/AVX512 support!

We introduced support of AVX* instruction sets for Intel/AMD CPUs. You can keep the same C# code and target your CPU instead of your NVIDIA GPU. All the code and binaries are deployed, but you'll need a special license to use them. For now, those license are reserved to special customers. You can read more about that in our blog post. This is a very large feature, so it's still in beta with restricted access.

  • Commercial licenses
    You can purchase commercial licenses from our website

  • Command line tool

Our command line tool has been massively improved. It's been renamed hybcc.exe on windows, and just hybridizer on linux. It now supports: - project files : hybridizer MyProj.csproj -run
- all target flavors : hybridizer Main.cs -flavor [CUDA]/AVX/AVX2/AVX512 -run
- openmp for CPU targets : hybridizer Main.cs -flavor AVX -fopenmp -run
- verbose mode

  • Notebooks

We added new notebooks and completed existing. See them in our github!

1.1.9554

5 years ago

New in this version

  • Improved installer -- complete rewrite. Able to properly handle updates
  • Add Reference to CUDAImports from visual studio
  • OpenGL interop (with mandelbulb sample)
  • Simple recursion (CUDA only) -- no stackalloc in recursive functions, no parallel for
  • Improved linux support (same licensing model as Windows)
  • Jupyter notebooks
  • improved builtins integration (intellisense in the xml)
  • Major internal refactoring (remove third party dlls...)
  • Redistributable license (upon request only)
  • couple of bug fixes (hybarrays)

1.1.9368

6 years ago

New in this version

  • SetDistrib and SetStream can be called on wrapped object instead of Runner.
  • Fix "Hybridizer Project" button
  • Support of VB.Net (Hybridize project + sample)
  • hybridizer-cuda command line tool (to compile and run without need of any visual studio project)
  • Basic OpenGL interop + sample (NBody)
  • Notebooks in sample
  • Linux support (beta)
  • Introduced cuda.ERROR_CHECK to catch runtime API errors

1.1.9352

6 years ago

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 and SetStream can be called on the wrapped object instead of HybRunner. 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

1.1.9225

6 years ago

New in this version

  • CUDA 9.2 support
  • Extended trial period (3 months)
  • Support of commercial licenses
  • Documentation! We published both general and API doc
  • MSI based installed instead of VSIX
  • Complete rewrite of Visual Studio integration. Should be faster and better looking.
  • Free for academics/students and hobbyists (upon request)
  • New features and bug fixes:
    • Heap allocation of primitive types arrays (new float[32])
    • Faster kernel startup
    • WDDM automatic detection to help detect driver timeout issue
    • More examples in the SDK (april_update branch until release)
    • Faster compilation on large code bases with many virtual functions
    • Streams support
    • Possible to register dll with an assembly attribute instead of explicit dll name in the code

Warning/Disclaimer
We don't support the entire C# language or .Net Framework. Main known limitations are

  • Heap allocation (new A()) from device thread (except for arrays)
  • System.Collection is not supported
  • string type is not supported

1.1.5931.8943

6 years ago

Release notes • Linux version available in beta • Automatic null-checks (see below) • Improved error reporting (errors point to csharp code) • Better error granularity to help identify issues • Faster kernel startup with improved runtime • Samples reworking : one solution per CUDA version. We removed Visual Studio version specific solutions and merged all projects • Improved conditions management • Default grid configuration to { 16 x multiProcessorCount, 128 }

Attached is a truecrypt containing linux binaries. Contact us to get the key if you want to join the preview.

1.1.5787.8707

6 years ago

New in this version

  • Better error reporting at Hybridization (errors now have unique error codes and point directly to user's code)
  • Compilation time improved
  • Fixed issues in runtime.init : https://github.com/altimesh/hybridizer-basic-samples/issues/36
  • Do not invoke Jitter when Hybridizer failed (should clarify error reporting and improve user experience)
  • Possibility to subscribe to newsletter
  • Code refactoring to prepare for future releases

Known issues

  • Visual Studio breaks CUDA support from version 15.5.3 (vs 2017 latest known update). Workaround : use v140 toolset. We enforced it at "Hybridize Project" step, waiting for a fix from NVIDIA or Microsoft.
  • SharedMatrix and cublas samples can fail on windows 8.1 for unknown reason.

Rename Zip file to VSIX to install it in visual studio, or get it directly from https://marketplace.visualstudio.com/items?itemName=altimesh.AltimeshHybridizerExtensionEssentials

Altimesh.HybridizerExtension.Essentials.zip

1.1.5727.8609

6 years ago

New features:

  • source get generated only if input dll have changed (if csharp project specified "Deterministic" flag, or if output files have been modified since latest successful build.
  • Intrinsic includes are supported (see Additional Jit Headers in Project configuration)
  • Added an item template with C# boiler plate code integrating Hybridizer
  • Better support of cublas, cusparse and nvblas in CUDA 9 and 9.1
  • Code must be built and run on the same machine (with the free version)

Fixes:

  • Fixed visual studio 2017 integration (broken for some users).
  • Private methods can be wrapped by HybRunner
  • "Reset License" button works again

1.1.5685.8524

6 years ago

In this release we added support of CUDA 9.1. Warning : Visual Studio 2017 breaks CUDA support in its latest update (15.5.3). To workaround that, change toolset from v141 to v140 (needs visual 2015 to be installed).

There are three main directories

HybridizerBasicSamples : CUDA 8 samples
HybridizerBasicSamples_CUDA9 : CUDA 9 samples
HybridizerBasicSamples_CUDA91 : CUDA 9.1 samples

These directories contain visual studio solutions, postfixed by visual studio version, such as "HybridizerBasicSamples.vs2013.sln".

First install the Visual Studio extension from marketplace.

After having checked the prerequisites, you can build and run the solution of your choice.