Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Missing DSA or platform repo. Stop. #1

Open
liyb13 opened this issue Jan 26, 2018 · 10 comments
Open

Error: Missing DSA or platform repo. Stop. #1

liyb13 opened this issue Jan 26, 2018 · 10 comments

Comments

@liyb13
Copy link

liyb13 commented Jan 26, 2018

when I try to compile the gemm project, the following error happens:
/tmp/cc8fJfho.s: Assembler messages:
/tmp/cc8fJfho.s:318: Error: expecting string instruction after rep' /tmp/cc8fJfho.s:386: Error: expecting string instruction after rep'
/tmp/cc8fJfho.s:6845: Error: expecting string instruction after rep' /tmp/cc8fJfho.s:16931: Error: expecting string instruction after rep'
/tmp/cc8fJfho.s:21658: Error: expecting string instruction after `rep'
make: *** [out_host/gemx_host.exe] Error 1

@lisaliu1
Copy link

lisaliu1 commented Jan 26, 2018 via email

@lisaliu1
Copy link

string instruction afterrep'
/tmp/cc8fJfho.s:6845: Error: expecting string instruction after rep' /tmp/cc8fJfho.s:16931: Error:

This error is caused by the lower version of binutils you are using. Can you run following command to check which version of binutils you are using.
ld -v

Currently we use 2.26, if your version number is lower than that, you might need to upgrade your binutils.

@liyb13
Copy link
Author

liyb13 commented Jan 27, 2018

Thanks for your help. I have successfully compile the project. I run it on AWS F1 and then get some results.
It reports that kernel result does not match the reference.

@lisaliu1
Copy link

lisaliu1 commented Jan 29, 2018 via email

@liyb13
Copy link
Author

liyb13 commented Jan 30, 2018

Thanks for your reply. I did as the README.md (https://github.com/Xilinx/gemx):

  • Compiling and building the FPGA image:
    make run_hw SDA_FLOW=hw GEMX_ddrWidth=32 GEMX_gemmMBlocks=8 GEMX_gemmKBlocks=8 GEMX_gemmNBlocks=8 GEMX_numKernels=4 GEMX_runGemv=0 GEMX_runTransp=0 GEMX_runGemm=1 GEMX_part=vu9pf1 GEMX_kernelHlsFreq=250 GEMX_kernelVivadoFreq=300 GEMX_useURAM=1 GEMX_vivadoFlow=EXP

  • Compiling host code:
    make GEMX_ddrWidth=32 GEMX_gemmMBlocks=8 GEMX_gemmKBlocks=8 GEMX_gemmNBlocks=8 GEMX_numKernels=4 out_host/gemx_api_gemm.exe

  • AWS F1 test:
    source /opt/Xilinx/SDx/2017.1.rte/setup.sh
    gemx_api_gemm.exe gemx.awsxclbin 512 512 512

  • Report:
    Compared 262144 values: exact match 259072 within tolerance 135 mismatch 2937
    INFO: accelerator kernel 0 result does NOT match the reference
    Compared 262144 values: exact match 241760 within tolerance 136 mismatch 20248
    INFO: accelerator kernel 1 result does NOT match the reference
    Compared 262144 values: exact match 0 within tolerance 0 mismatch 262144
    INFO: accelerator kernel 2 result does NOT match the reference
    Compared 262144 values: exact match 0 within tolerance 0 mismatch 262144
    INFO: accelerator kernel 3 result does NOT match the reference

Another question:
I think "gemx_api_gemm.exe gemx.awsxclbin 512 512 512" means the buffer size of A is 512*512. Then buffer A could store the 512*512*16bit. While the buffer size of A is GEMX_gemmMBlocks*GEMX_ddrWidth x GEMX_gemmKBlocks*GEMX_ddrWidth = 256*256. Should I modify the default values of variables?

@lisaliu1
Copy link

I tried the steps you mentioned, and it works on F1 for me.
Can you check following items:

  1. if you copied the generated out_hw/xbinst to the out_hw/ directory on F1?
  2. if you have setup the env correctly? Below is the content of the run.sh I used to run this command
    source /opt/Xilinx/SDx/2017.1.rte/setup.sh
    pushd out_hw/xbinst
    export SDACCEL_TIMELINE_REPORT=true
    export SDACCEL_DEVICE_PROFILE=true
    export LD_LIBRARY_PATH=$PWD/../../lib/opencv:$PWD/../../lib:$LD_LIBRARY_PATH
    GEMX_HOST_DIR=../../out_host
    GEMX_HW_DIR=../
    ${GEMX_HOST_DIR}/gemx_api_gemm.exe ${GEMX_HW_DIR}/gemx.awsxclbin 512 512 512
    popd

regarding your question:
the 512 512 and 512 mean the value for dimention M, K and N.
the matrix multiplication is doing C = A * B, where A has dimension M x K, B has dimension K x N and C has dimension M x N
the local buffer size for A, B and C is controlled by the setup of GEMX_gemmMBlocks, GEMX_gemmKBlocks ang GEMX_gemmNBlocks and GEMX_ddrWidth.

@liyb13
Copy link
Author

liyb13 commented Feb 2, 2018

Thanks for your reply. But I can not find /lib/opencv on aws f1 instance

@lisaliu1
Copy link

lisaliu1 commented Feb 2, 2018

you can remove /lib/opencv from the LD_LIBRARY_PATH, it should still work.

@liyb13
Copy link
Author

liyb13 commented Feb 5, 2018

Thanks. It is declaired that the GEMX supports sparse matrix multiplication. Would you please tell me the detailed procedures to run the simulation and implementation for the sparse mode. Many thanks.

@lisaliu1
Copy link

lisaliu1 commented Feb 5, 2018

please sync your master branch with the repository first. After that, please follow the steps below to run cpu emulation for SPMV implementation.

  1. run settings64.sh / settings64.csh to set up the SDx 2017.4 environment
  2. navigate to gemx/
  3. run

make clean

  1. run

make run_cpu_em GEMX_ddrWidth=16 GEMX_argInstrWidth=1 GEMX_numKernels=1 GEMX_runGemv=0 GEMX_runGemm=0 GEMX_runTransp=0 GEMX_runSpmv=1 GEMX_dataType=float GEMX_part=ku115 GEN_BIN_PROGRAM="spmv 96 128 256 none A0 B0 C0 spmv 0 0 0 data/spmv/Rucci1.mtx.gz A1 B1 C1"

if you change "run_cpu_em" to "run_hw_em" and add "HWEMUGUI=1" then you can run hw emulation with GUI to deplay the waveform of the SPMV simulation results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants