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 magnitute 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¶
To Quick Start using the HUGenomic library, start using one of the examples in the examples folder, they provide easy to use examples using the APIs available in the library. Currently, the examples are supported for software simulation on Mac OSX (10.9 or higher) and Linux (GCC 4.9 or higher). To execute the accelerated HUGenomic cores it is necessary to use them on the FPGA instance. To test the HUGenomic Library, request a demo trial at www.huxelerate.it.
Using Huxelerate Standard Library in your application¶
In order to use the Library, you simply need to include the hugenomic.hpp
header file inside your C++ application. The header file is available in the include
folder.
#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 Huxelerate Instance with FPGA¶
Once you have developed your application locally, you can upload your code to the Huxelerate 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
add the include path for the HUGenomic library
A basic compilation command on the Huxelerate instance is the following:
g++ -o executable_name.exe source_code.cpp -O3 -std=c++11 -Ipath_to_hugenomic_library/include/ -Lpath_to_hugenomic_library/lib/centos_f1/ -L${XILINX_XRT}/lib/ -lpthread -lxilinxopencl -lhugenomic
Once you have compiled your application, in order to use the FPGA you will need root permissions and make sure to source the Xilinx runtime library:
sudo su
source /opt/xilinx/xrt/setup.sh
Finally, simply run your application:
./<executable_name>