Huxelerate Standard Library

Huxelerate Standard Library provides a suite of accelerated functions (cores) that solves the most common computational bottlenecks in data intensive domains such as genomics, drug design and finance.

The accelerated functions can be integrated in your data analysis application allowing to gain order of magnitude in performance and drastically cut execution time and development effort:

  • You call them in your code as you would do with any function, with no hardware expertise

  • We do the heavy lifting by automatically running them on domain specific architectures

This documentation will guide you in using the HUGenomic library, the Huxelerate Standard Library for genomics.

Quick Start

The accelerated functions of the HUGenomic library must be run on FPGA. To quick start, you can launch an FPGA instance of the Hugenomic Library AMI from the AWS Marketplace, or, you can request a demo FPGA instance at www.huxelerate.it.

If you simply want to emulate the HUGenomic cores on your local machine, you can download the software emulator. The emulator provides a way to develop and test an application using the HUGenomic Library directly on a local machine. Furthermore, it contains the same set of examples included in the FPGA instance. Currently, the emulator is supported on Mac OSX (10.9 or higher) and on Linux (using GCC 7.3.1 or higher).

Using Huxelerate Standard Library in your application

In this section, we assume that you are developing your application on your local machine using the software emulator.

In order to use the Library, you simply need to include the hugenomic.hpp header file inside your C++ application. The header file is located in the include folder provided with the software emulator.

#include "hugenomic.hpp"

When compiling your application, remember to add the include folder in the include paths, and link the version of the HUGenomic library, according to your operating system.

Example build for Mac OSX:

g++ -o executable_name.exe source_code.cpp -O3 -std=c++11 -Ipath_to_hugenomic_library/include/ -Lpath_to_hugenomic_library/lib/macos/ -lhugenomic

Example build for Linux:

g++ -o executable_name.exe source_code.cpp -O3 -std=c++11 -Ipath_to_hugenomic_library/include/ -Lpath_to_hugenomic_library/lib/linux/ -lhugenomic

Execute your application with HUGenomic cores on the FPGA instance

Once you have developed your application locally, you can upload your code to the FPGA instance. To do so, you can ssh into the instance and clone your repository. In order to compile your code, you first need to enable GCC 7.3.1 as a default compiler by running the command:

source /opt/rh/devtoolset-7/enable

Subsequently, you need to source the Xilinx runtime library using the following command:

source /opt/xilinx/xrt/setup.sh

At this point you are ready to compile your code. During the compilation process you need to:

  • link the pthread library

  • link the xilinxopencl library

  • link the HUGenomic library

Note

On the FPGA instance the HUGenomic library is installed in the system, hence you do not need to specify additional include and library paths.

A basic compilation command on the Huxelerate instance is the following:

g++ -o executable_name.exe source_code.cpp -O3 -std=c++11 -L${XILINX_XRT}/lib/ -lpthread -lxilinxopencl -lhugenomic

Once you have compiled your application, make sure to source the Xilinx runtime library before running your application:

source /opt/xilinx/xrt/setup.sh
./<executable_name>