- Work Directory(Step 1)
The steps for library download and environment setup can be found in l2_vitis_data_analytics. For getting the design,
cd L2/benchmarks/classification/naive_bayes
- Build kernel(Step 2)
Run the following make command to build your XCLBIN and host binary targeting a specific device. Please be noticed that this process will take a long time, maybe couple of hours.
make run TARGET=hw PLATFORM=xilinx_u200_xdma_201830_2
- Run kernel(Step 3)
To get the benchmark results, please run the following command.
./build_dir.hw.xilinx_u200_xdma_201830_2/test_nb.exe -xclbin build_dir.hw.xilinx_u200_xdma_201830_2/naiveBayesTrain_kernel.xclbin ./data/test.dat -g ./data/test_g.dat -c 10 -t 13107
Naive Bayes Input Arguments:
Usage: test_nb.exe -xclbin <xclbin_name> -in <input_data> -g <golden_data> -c <number of class> -t <number of feature> -xclbin: the kernel name -in : input data -g : golden data -c : number of class -t : number of feature
Note: Default arguments are set in Makefile, you can use other platforms to build and run.
- Example output(Step 4)
---------------------Multinomial Training Test of Naive Bayes----------------- Found Platform Platform Name: Xilinx Found Device=xilinx_u200_xdma_201830_2 INFO: Importing build_dir.hw.xilinx_u200_xdma_201830_2/naiveBayesTrain_kernel.xclbin Loading: 'build_dir.hw.xilinx_u200_xdma_201830_2/naiveBayesTrain_kernel.xclbin' kernel has been created kernel start------ kernel end------ Total Execution time 17.381ms Start Profiling... Write DDR Execution time 0.108582ms Kernel Execution time 0.519421ms Read DDR Execution time 0.03953ms Total Execution time 0.667533ms ============================================================ Prior probability: -2.34341 -2.38597 -2.30259 -2.43042 -2.20727 -2.36446 -2.22562 -2.30259 -2.27303 -2.21641 0 0 0 0 0 0 Check pass. ------------------------------------------------------------