Open ZhaoBaofu opened 6 years ago
Please follow the steps below:
In above command, the GEN_BIN_PROGRAM option describes the operations that will be executed on FPGA. For example, the first one, gemm 512 512 512 512 512 512 512 1 0 A05 B05 C05 X05 means operatopn C05 = ((A05 B05 + X05) 1) >> 0 will be executed on FPGA. Where A05, B05, X05 and C05 are 512 x 512 matrices. you can find the operation definition in src/gemx_gen_bin.cpp
once the hw build finishes, run following command to launch the FPGA run. ./out_host/gemx_host.exe out_hw/gemx.xclbin out_host/app.bin out_hw/app_out.bin 2
the results will show you the time you need. Look the main function of gemx_gen_bin.cpp, the source of gemx_host.exe, you will find the code to calculate this time intervals you need.
what should I do or which make command should I use when I want to run the hardware simulation of gemx ?
if you run make run_hw_em GEMX_ddrWidth=32 GEMX_XddrWidth=16 GEMX_keepMacBits=1 GEMX_argInstrWidth=1 GEMX_numKernels=1 GEMX_runGemv=0 GEMX_runGemm=1 GEMX_runTransp=0 GEMX_runSpmv=0 GEMX_gemmMBlocks=4 GEMX_gemmKBlocks=4 GEMX_gemmNBlocks=4 GEMX_splitMesh=1 GEMX_part=vcu1525 GEN_BIN_PROGRAM="gemm 512 512 512 512 512 512 512 1 0 A05 B05 C05 X05 "
you will see the hw emulation results for the instruction gemm 512 512 512 512 512 512 512 1 0 A05 B05 C05 X05 .
if you change run_hw_em to run_cpu_em, you will see cpu emulation results if you add HWEMUGUI=1 to the run_hw_em make command, you can see the waveform.
Hi, I want to use the gemx program to compute matrix multiplication in FPGA . Here I want to know how to measure the execution time of these steps included: 1)read data from DDR to FPGA 2)compute matrix multiplication 3)write results from FPGA to DDR which command should I use ?