DSP Libraries for Computer Vision and GEMM in Hexagon SDK 3.1

Thursday 1/26/17 10:00am
|
Posted By Steven Brightfield
  • Up0
  • Down0

Have you started DSP programming with the Qualcomm® Hexagon™ SDK 3.1 yet? When we released the kit, I posted about the compiler for C++11/14 that we included so you can move code traditionally run on the CPU to the DSP, without the need to rewrite all of that code.

That’s a pretty good reason for you to download Hexagon SDK 3.1 and try your hand at DSP programming. Are you ready for two more?

Libraries for Computer Vision and Convolutional Networks

Because the libraries are generic, you can use them on the Hexagon DSP across different, unique frameworks. As an example, we’re making libraries for computer vision (FastCV™ software development kit) available in the SDK, and for machine learning applications, the SDK includes a standard library for matrix computation you can use to accelerate the execution of many common neural network frameworks. For example, Torch, Caffe or Tensorflow.

Want to quickly test and compare the benefit of a DSP implementation of computer vision against a CPU implementation? One easy way is to replace a CPU library with a DSP library. FastCV based computer vision libraries supporting Hexagon and Hexagon Vector eXtensions (HVX) are engineered to be compatible and interchangeable with FastCV computer vision libraries that we have released for the CPU and floating point co-processor. You’ll find FastCV libraries for the CPU in the FastCV Computer Vision SDK. And in the Hexagon SDK you’ll find API-compatible computer vision libraries optimized for Hexagon and HVX.

2 men in front of computer discussing Hexagon SDK 3.1

Hexagon SDK 3.1 also includes general matrix-matrix multiplication (GEMM) libraries for convolutional networks used in machine learning. Starting with upcoming devices powered by the Qualcomm Snapdragon™ 820 and 835 processors, you can use those GEMM libraries to replace ones that typically target the floating-point co-processor to the CPU. While you wait for those processors to appear in commercial devices, you can use the SDK to generate dynamic Hexagon DSP code modules and execute them on the included simulator.

HVX supports fixed-point matrix multiply acceleration on the DSP, so if your algorithm can be limited to fixed-point, then take advantage of the much higher throughput and lower power consumption on HVX. On the other hand, if you require floating-point matrix multiplication, then you should probably keep that execution on the CPU co-processor.

Get Your Massively Parallel Head Start

Download the Hexagon SDK 3.1 now and see how you can speed up image processing, computer vision and machine learning in your apps. The Hexagon DSP is designed to be your ticket to high performance and low power consumption, and the SDK is a great way to build heterogeneous programming that’s ready to run when devices with Snapdragon 820 and 835 processors are available to consumers.

Let me know in the comments below or in the support forum what else you need to get going.

Comments

Re: DSP Libraries for Computer Vision and GEMM in Hexagon SDK...

hi:

i want to build a project about matrixmultiply in hexagon-IDE on windows10 x86_64,and when i use the  "libfastcvadsp.a" this  static library in

Hexagon_SDK\3.1\libs\fastcv\fastcv\hexagon_Debug_toolv80_v60 ,there are many problem display on the screen.this is my code:

#include<iostream>
#include"library/fastcv.h"
using namespace std;
int main(){
   const signed char * tmp;
   const signed char * tmp1;// = '2';
//int m=256,i,k=1;
//for(i=0;i<256;i++){
//tmp[i]=k;
//tmp1[i]=k;
//k++;
//}
long int *resu = NULL;
fcvMatrixMultiplys8s32(tmp,16,16,16,tmp1,16,16,resu,16);
}
when i build it,the console show:Fatal: Linking had errors.
hexagon-clang++.exe: error: hexagon-link command failed with exit code 1 (use -v to see invocation)
and the properties->build->setting->linker i also add this lib and its catalog in this workspace.
thanks very much.