Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

gfx offload compile error

bkimbrough
Beginner
324 Views

Hello,

I am running VS2013 and haven't had any luck getting a simple gfx offload to compile.

the error I am getting is as follows:

gfx_linker: : error : failed to execute 'ld.exe', errno 2

I have been unable to determine what is causing this error.  Any ideas would be helpful.  I have included my code below.

 

#include "stdafx.h"
#include <cilk\cilk.h>
#include <cilk\common.h>

int main(void)
{
    float *indata, *outdata;
    int nrows = 512;
    int ncols = 512;

    int size = nrows*ncols;

    indata  = (float *)malloc(size*sizeof(float));
    outdata = (float *)malloc(size*sizeof(float));

#pragma offload target(gfx) pin(indata,outdata:length(size))
    {
        _Cilk_for(int i = 0; i < size; i++)
        {
            outdata = 4 * indata;
        }
    }

    free(indata);
    free(outdata);    

}

Regards,

Brad

 

0 Kudos
1 Reply
Anoop_M_Intel
Employee
324 Views

Hi Brad,

For GFX offload on Windows, we need binutils package since the GFX binary generated is in ELF format. You can download the binutils from http://software.intel.com/en-us/articles/open-source-downloads. This binutils will provide the ld.exe which is needed for linking GFX objects. Also the following getting started with GFX offload article should help you get started: https://software.intel.com/en-us/articles/getting-started-with-compute-offload-to-intelr-graphics-technology.

Thanks and Regards
Anoop

0 Kudos
Reply