Xilinx / gemx

Matrix Operation Library for FPGA https://xilinx.github.io/gemx/
Other
63 stars 21 forks source link

Problem compiling Gemx #6

Open huntoona opened 6 years ago

huntoona commented 6 years ago

Hello,

I am trying to compile gemx on a C4.4xlarge instance running the FPGA developer AMI.

When I try to run the provided run_app.sh, I get this error:

src/gemx_fpga.h: In member function ‘bool gemx::Fpga::createBuffers(gemx::MemDesc*)’:
<command-line>:0:19: error: ‘XCL_MEM_DDR_BANK0’ was not declared in this scope
src/gemx_fpga.h:127:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
<command-line>:0:37: error: ‘XCL_MEM_DDR_BANK1’ was not declared in this scope
src/gemx_fpga.h:127:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
<command-line>:0:55: error: ‘XCL_MEM_DDR_BANK2’ was not declared in this scope
src/gemx_fpga.h:127:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
<command-line>:0:73: error: ‘XCL_MEM_DDR_BANK3’ was not declared in this scope
src/gemx_fpga.h:127:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
In file included from src/gemx_api_gemm.cpp:59:0:
src/gemx_fpga.h:129:9: error: ‘cl_mem_ext_ptr_t’ was not declared in this scope
         cl_mem_ext_ptr_t l_bufExt;
         ^~~~~~~~~~~~~~~~
src/gemx_fpga.h:131:9: error: ‘l_bufExt’ was not declared in this scope
         l_bufExt.param = 0;
         ^~~~~~~~
src/gemx_fpga.h:138:65: error: ‘CL_MEM_EXT_PTR_XILINX’ was not declared in this scope
                       CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE | CL_MEM_EXT_PTR_XILINX,
                                                                 ^~~~~~~~~~~~~~~~~~~~~
src/gemx_fpga.h: In member function ‘bool gemx::Fpga::copyToFpgaWithoutEvent(gemx::MemDesc&)’:
<command-line>:0:19: error: ‘XCL_MEM_DDR_BANK0’ was not declared in this scope
src/gemx_fpga.h:239:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
<command-line>:0:37: error: ‘XCL_MEM_DDR_BANK1’ was not declared in this scope
src/gemx_fpga.h:239:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
<command-line>:0:55: error: ‘XCL_MEM_DDR_BANK2’ was not declared in this scope
src/gemx_fpga.h:239:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
<command-line>:0:73: error: ‘XCL_MEM_DDR_BANK3’ was not declared in this scope
src/gemx_fpga.h:239:32: note: in expansion of macro ‘GEMX_fpgaDdrBanks’
         unsigned l_k2bank[] = {GEMX_fpgaDdrBanks};
                                ^
In file included from src/gemx_api_gemm.cpp:59:0:
src/gemx_fpga.h:241:9: error: ‘cl_mem_ext_ptr_t’ was not declared in this scope
         cl_mem_ext_ptr_t l_bufExt;
         ^~~~~~~~~~~~~~~~
src/gemx_fpga.h:242:9: error: ‘l_bufExt’ was not declared in this scope
         l_bufExt.obj = NULL;
         ^~~~~~~~
src/gemx_fpga.h:250:27: error: ‘CL_MEM_EXT_PTR_XILINX’ was not declared in this scope
       CL_MEM_READ_WRITE | CL_MEM_EXT_PTR_XILINX,
                           ^~~~~~~~~~~~~~~~~~~~~
make: *** [out_host/gemx_api_gemm.exe] Error 1

It would be great if anyone had guidance on how to solve this error.

Thanks, Alex

huntoona commented 6 years ago

Following the documentation in GEMM_API_UG.md I get the same errors, except when I run the hardware emulation command, where I get:

Makefile:122: *** Unknown GEMX_part vu9pf1.  Stop.

It seems that the Makefile has been updated and no longer supports f1. Does that mean I can't test Gemx on AWS F1 instances?

-Alex

lisaliu1 commented 6 years ago

Please checkout 2017.4 branch, which still support GEMX on F1. Before running run.sh, please setup 2017.1 SDx environment via settings64.sh/.csh.