Skip to content

Commit 005d507

Browse files
SDA USRsdausr
authored andcommitted
fix bug for u50 platform (#337)
* Squashed 'hpc/' changes from 1c6ac0e..f28aa9a f28aa9a update release notes e9f956a Merge branch 'dev2021.1' into next 04c17bc update release notes 366f577 update release notes 26599b6 Merge branch 'dev2021.1' into next 4e191d6 updates a40a413 update notes 01d565a Merge branch 'next' of gitenterprise.xilinx.com:FaaSApps/xf_hpc into next fd999c0 Merge branch 'dev2021.1' into next dbe158b fix version error bb0beb4 Merge pull request #77 from liangm/next 95b21eb merge dev2021.1 4ee28f5 Merge branch 'dev2021.1' of gitenterprise.xilinx.com:FaaSApps/xf_hpc into dev2021.1 a188c06 update makefiles 26fd0ea update release notes b7d6078 Update params.mk 550280c Update params.mk git-subtree-dir: hpc git-subtree-split: f28aa9aab61bf0cb761a7844986cad6a2320479f * Squashed 'quantitative_finance/' changes from 5885ea2..21a780a 21a780a Merge pull request #937 from Zhenhong/next f16ec55 fix connection for u50 CR-1103457 b4d28c0 Merge pull request #935 from jingt/next de3387c update benchmark.rst bafca09 Merge pull request #931 from jingt/next d780d09 modify benchmark html path 0483f82 Merge branch 'next' of https://gitenterprise.xilinx.com/jingt/xf_fintech into next 4470704 modify benchmark html path f43157d Merge pull request #1 from FaaSApps/next 495abdc update git-subtree-dir: quantitative_finance git-subtree-split: 21a780aaedb8103d99c572dd0d005de2b03bdb50 Co-authored-by: sdausr <[email protected]>
1 parent 2078f6d commit 005d507

File tree

11 files changed

+194
-72
lines changed

11 files changed

+194
-72
lines changed

quantitative_finance/L2/benchmarks/MCAmericanEngineMultiKernel/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Executable Usage
1212

1313
* **Work Directory(Step 1)**
1414

15-
The steps for library download and environment setup can be found in :ref:`l2_vitis_quantitative_finance`. For getting the design,
15+
For getting the design,
1616

1717
cd L2/benchmarks/MCEuropeanEngine
1818

quantitative_finance/L2/benchmarks/MCEuropeanEngine/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Benchmark of MCEuropeanEngine
2-
*************************************************
32

43

54
Overview
@@ -14,7 +13,7 @@ Executable Usage
1413

1514
* **Work Directory(Step 1)**
1615

17-
The steps for library download and environment setup can be found in :ref:`l2_vitis_quantitative_finance`. For getting the design,
16+
For getting the design,
1817

1918
cd L2/benchmarks/MCEuropeanEngine
2019

quantitative_finance/L2/benchmarks/TreeEngine/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Executable Usage
1313

1414
* **Work Directory(Step 1)**
1515

16-
The steps for library download and environment setup can be found in :ref:`l2_vitis_quantitative_finance`. For getting the design,
16+
For getting the design,
1717

1818
cd L2/benchmarks/TreeEngine/TreeSwaptionEngineHWModel
1919

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[connectivity]
2-
sp=b76_kernel_1.m_axi_in0_port:DDR[1]
3-
sp=b76_kernel_1.m_axi_in1_port:DDR[1]
4-
sp=b76_kernel_1.m_axi_in2_port:DDR[1]
5-
sp=b76_kernel_1.m_axi_in3_port:DDR[1]
6-
sp=b76_kernel_1.m_axi_in4_port:DDR[1]
7-
sp=b76_kernel_1.m_axi_out0_port:DDR[0]
8-
sp=b76_kernel_1.m_axi_out1_port:DDR[0]
9-
sp=b76_kernel_1.m_axi_out2_port:DDR[0]
10-
sp=b76_kernel_1.m_axi_out3_port:DDR[0]
11-
sp=b76_kernel_1.m_axi_out4_port:DDR[0]
12-
sp=b76_kernel_1.m_axi_out5_port:DDR[0]
2+
sp=b76_kernel_1.m_axi_in0_port:HBM[1]
3+
sp=b76_kernel_1.m_axi_in1_port:HBM[1]
4+
sp=b76_kernel_1.m_axi_in2_port:HBM[1]
5+
sp=b76_kernel_1.m_axi_in3_port:HBM[1]
6+
sp=b76_kernel_1.m_axi_in4_port:HBM[1]
7+
sp=b76_kernel_1.m_axi_out0_port:HBM[0]
8+
sp=b76_kernel_1.m_axi_out1_port:HBM[0]
9+
sp=b76_kernel_1.m_axi_out2_port:HBM[0]
10+
sp=b76_kernel_1.m_axi_out3_port:HBM[0]
11+
sp=b76_kernel_1.m_axi_out4_port:HBM[0]
12+
sp=b76_kernel_1.m_axi_out5_port:HBM[0]
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[connectivity]
2-
sp=bs_kernel_1.m_axi_in0_port:DDR[1]
3-
sp=bs_kernel_1.m_axi_in1_port:DDR[1]
4-
sp=bs_kernel_1.m_axi_in2_port:DDR[1]
5-
sp=bs_kernel_1.m_axi_in3_port:DDR[1]
6-
sp=bs_kernel_1.m_axi_in4_port:DDR[1]
7-
sp=bs_kernel_1.m_axi_out0_port:DDR[0]
8-
sp=bs_kernel_1.m_axi_out1_port:DDR[0]
9-
sp=bs_kernel_1.m_axi_out2_port:DDR[0]
10-
sp=bs_kernel_1.m_axi_out3_port:DDR[0]
11-
sp=bs_kernel_1.m_axi_out4_port:DDR[0]
12-
sp=bs_kernel_1.m_axi_out5_port:DDR[0]
2+
sp=bs_kernel_1.m_axi_in0_port:HBM[1]
3+
sp=bs_kernel_1.m_axi_in1_port:HBM[1]
4+
sp=bs_kernel_1.m_axi_in2_port:HBM[1]
5+
sp=bs_kernel_1.m_axi_in3_port:HBM[1]
6+
sp=bs_kernel_1.m_axi_in4_port:HBM[1]
7+
sp=bs_kernel_1.m_axi_out0_port:HBM[0]
8+
sp=bs_kernel_1.m_axi_out1_port:HBM[0]
9+
sp=bs_kernel_1.m_axi_out2_port:HBM[0]
10+
sp=bs_kernel_1.m_axi_out3_port:HBM[0]
11+
sp=bs_kernel_1.m_axi_out4_port:HBM[0]
12+
sp=bs_kernel_1.m_axi_out5_port:HBM[0]
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[connectivity]
2-
sp=bsm_kernel_1.m_axi_in0_port:DDR[1]
3-
sp=bsm_kernel_1.m_axi_in1_port:DDR[1]
4-
sp=bsm_kernel_1.m_axi_in2_port:DDR[1]
5-
sp=bsm_kernel_1.m_axi_in3_port:DDR[1]
6-
sp=bsm_kernel_1.m_axi_in4_port:DDR[1]
7-
sp=bsm_kernel_1.m_axi_in5_port:DDR[1]
8-
sp=bsm_kernel_1.m_axi_out0_port:DDR[0]
9-
sp=bsm_kernel_1.m_axi_out1_port:DDR[0]
10-
sp=bsm_kernel_1.m_axi_out2_port:DDR[0]
11-
sp=bsm_kernel_1.m_axi_out3_port:DDR[0]
12-
sp=bsm_kernel_1.m_axi_out4_port:DDR[0]
13-
sp=bsm_kernel_1.m_axi_out5_port:DDR[0]
2+
sp=bsm_kernel_1.m_axi_in0_port:HBM[1]
3+
sp=bsm_kernel_1.m_axi_in1_port:HBM[1]
4+
sp=bsm_kernel_1.m_axi_in2_port:HBM[1]
5+
sp=bsm_kernel_1.m_axi_in3_port:HBM[1]
6+
sp=bsm_kernel_1.m_axi_in4_port:HBM[1]
7+
sp=bsm_kernel_1.m_axi_in5_port:HBM[1]
8+
sp=bsm_kernel_1.m_axi_out0_port:HBM[0]
9+
sp=bsm_kernel_1.m_axi_out1_port:HBM[0]
10+
sp=bsm_kernel_1.m_axi_out2_port:HBM[0]
11+
sp=bsm_kernel_1.m_axi_out3_port:HBM[0]
12+
sp=bsm_kernel_1.m_axi_out4_port:HBM[0]
13+
sp=bsm_kernel_1.m_axi_out5_port:HBM[0]
1414

1515

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[connectivity]
2-
sp=gk_kernel_1.m_axi_in0_port:DDR[0]
3-
sp=gk_kernel_1.m_axi_in1_port:DDR[0]
4-
sp=gk_kernel_1.m_axi_in2_port:DDR[0]
5-
sp=gk_kernel_1.m_axi_in3_port:DDR[0]
6-
sp=gk_kernel_1.m_axi_in4_port:DDR[0]
7-
sp=gk_kernel_1.m_axi_in5_port:DDR[0]
8-
sp=gk_kernel_1.m_axi_out0_port:DDR[1]
9-
sp=gk_kernel_1.m_axi_out1_port:DDR[1]
10-
sp=gk_kernel_1.m_axi_out2_port:DDR[1]
11-
sp=gk_kernel_1.m_axi_out3_port:DDR[1]
12-
sp=gk_kernel_1.m_axi_out4_port:DDR[1]
13-
sp=gk_kernel_1.m_axi_out5_port:DDR[1]
2+
sp=gk_kernel_1.m_axi_in0_port:HBM[0]
3+
sp=gk_kernel_1.m_axi_in1_port:HBM[0]
4+
sp=gk_kernel_1.m_axi_in2_port:HBM[0]
5+
sp=gk_kernel_1.m_axi_in3_port:HBM[0]
6+
sp=gk_kernel_1.m_axi_in4_port:HBM[0]
7+
sp=gk_kernel_1.m_axi_in5_port:HBM[0]
8+
sp=gk_kernel_1.m_axi_out0_port:HBM[1]
9+
sp=gk_kernel_1.m_axi_out1_port:HBM[1]
10+
sp=gk_kernel_1.m_axi_out2_port:HBM[1]
11+
sp=gk_kernel_1.m_axi_out3_port:HBM[1]
12+
sp=gk_kernel_1.m_axi_out4_port:HBM[1]
13+
sp=gk_kernel_1.m_axi_out5_port:HBM[1]
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[connectivity]
2-
sp=quanto_kernel_1.m_axi_in0_port:DDR[0]
3-
sp=quanto_kernel_1.m_axi_in1_port:DDR[0]
4-
sp=quanto_kernel_1.m_axi_in2_port:DDR[0]
5-
sp=quanto_kernel_1.m_axi_in3_port:DDR[0]
6-
sp=quanto_kernel_1.m_axi_in4_port:DDR[0]
7-
sp=quanto_kernel_1.m_axi_in5_port:DDR[0]
8-
sp=quanto_kernel_1.m_axi_in6_port:DDR[0]
9-
sp=quanto_kernel_1.m_axi_in7_port:DDR[0]
10-
sp=quanto_kernel_1.m_axi_in8_port:DDR[1]
11-
sp=quanto_kernel_1.m_axi_in9_port:DDR[1]
12-
sp=quanto_kernel_1.m_axi_out0_port:DDR[1]
13-
sp=quanto_kernel_1.m_axi_out1_port:DDR[1]
14-
sp=quanto_kernel_1.m_axi_out2_port:DDR[1]
15-
sp=quanto_kernel_1.m_axi_out3_port:DDR[1]
16-
sp=quanto_kernel_1.m_axi_out4_port:DDR[1]
17-
sp=quanto_kernel_1.m_axi_out5_port:DDR[1]
2+
sp=quanto_kernel_1.m_axi_in0_port:HBM[0]
3+
sp=quanto_kernel_1.m_axi_in1_port:HBM[0]
4+
sp=quanto_kernel_1.m_axi_in2_port:HBM[0]
5+
sp=quanto_kernel_1.m_axi_in3_port:HBM[0]
6+
sp=quanto_kernel_1.m_axi_in4_port:HBM[0]
7+
sp=quanto_kernel_1.m_axi_in5_port:HBM[0]
8+
sp=quanto_kernel_1.m_axi_in6_port:HBM[0]
9+
sp=quanto_kernel_1.m_axi_in7_port:HBM[0]
10+
sp=quanto_kernel_1.m_axi_in8_port:HBM[1]
11+
sp=quanto_kernel_1.m_axi_in9_port:HBM[1]
12+
sp=quanto_kernel_1.m_axi_out0_port:HBM[1]
13+
sp=quanto_kernel_1.m_axi_out1_port:HBM[1]
14+
sp=quanto_kernel_1.m_axi_out2_port:HBM[1]
15+
sp=quanto_kernel_1.m_axi_out3_port:HBM[1]
16+
sp=quanto_kernel_1.m_axi_out4_port:HBM[1]
17+
sp=quanto_kernel_1.m_axi_out5_port:HBM[1]

quantitative_finance/docs/benchmark/benchmark.rst renamed to quantitative_finance/docs/benchmark.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ Benchmark
2929
Application Scenario
3030
---------------------
3131

32-
The application scenarios are provided for each case. User could find as bellow.
33-
34-
:ref:`MCEuropeanEngine <MCEE_Profiling>`
35-
:ref:`MCAmericanEngine <MCAE_Profiling>`
36-
:ref:`TreeEngine <TreeEngine_Profiling>`
32+
The application scenarios are provided for each case. User could find details in Profiling section under each case's benchmark description page.
3733

3834
Performance
3935
-----------
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
..
2+
Copyright 2019 Xilinx, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
.. meta::
17+
:keywords: benchmark, European, engine, option
18+
:description: This is a benchmark of MC (Monte-Carlo) European Engine using the Xilinx Vitis environment to compare with QuantLib.
19+
:xlnxdocumentclass: Document
20+
:xlnxdocumenttype: Tutorials
21+
22+
.. _guide_l1_benchmark_SVD_
23+
24+
*************************************************
25+
Benchmark of Singular Value Decomposition (SVD)
26+
*************************************************
27+
28+
29+
Overview
30+
========
31+
This is a benchmark of Singular Value Decomposition. It supports software and hardware emulation as well as running the hardware accelerator on the Alveo U250.
32+
33+
This example resides in ``L1/benchmarks/SVD`` directory. The tutorial provides a step-by-step guide that covers commands for build and runging kernel.
34+
35+
36+
Executable Usage
37+
================
38+
39+
* **Work Directory(Step 1)**
40+
41+
The steps for library download and environment setup can be found in :ref:`l2_vitis_quantitative_finance`. For getting the design,
42+
43+
.. code-block:: bash
44+
45+
cd L1/benchmarks/SVD
46+
47+
* **Build kernel(Step 2)**
48+
49+
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.
50+
51+
.. code-block:: bash
52+
53+
source /opt/xilinx/Vitis/2021.1/settings64.sh
54+
source /opt/xilinx/xrt/setenv.sh
55+
export DEVICE=/opt/xilinx/platforms/xilinx_u250_xdma_201830_2/xilinx_u250_xdma_201830_2.xpfm
56+
export TARGET=hw
57+
make run
58+
59+
* **Run kernel(Step 3)**
60+
61+
To get the benchmark results, please run the following command.
62+
63+
.. code-block:: bash
64+
65+
./build_dir.hw.xilinx_u250_xdma_201830_2/host.exe -xclbin build_dir.hw.xilinx_u250_xdma_201830_2/kernel_svd_0.xclbin
66+
67+
68+
Input Arguments:
69+
70+
.. code-block:: bash
71+
72+
Usage: test.exe -[-xclbin -rep]
73+
-xclbin MCEuropeanEngine binary;
74+
75+
* **Example output(Step 4)**
76+
77+
.. code-block:: bash
78+
Found Platform
79+
Platform Name: Xilinx
80+
Found Device=xilinx_u250_xdma_201830_2
81+
INFO: Importing ./build_dir.hw.xilinx_u250_xdma_201830_2/kernel_svd_0.xclbin
82+
Loading: './build_dir.hw.xilinx_u250_xdma_201830_2.xclbin'
83+
kernel has been created
84+
finished data transfer from h2d
85+
Kernel 0 done!
86+
kernel execution time : 22 us
87+
result correct
88+
89+
90+
.. _SVD_Profiling:
91+
Profiling
92+
==========
93+
94+
The timing performance of the 4x4 SVD is shown in the table below, where matrix size is 4 x 4, and FPGA frequency is 300MHz.
95+
96+
.. _tab_SVD_Execution_Time:
97+
98+
.. table:: Timing_Performance
99+
100+
+-----------------------------------+----------------------------------+
101+
| Platform | Execution time |
102+
| +-----------------+----------------+
103+
| | cold run | warm run |
104+
+-----------------------------------+-----------------+----------------+
105+
| MKL Intel(R) Xeon(R) E5-2690 v3 | N/A | 8 us |
106+
+-----------------------------------+-----------------+----------------+
107+
| FinTech on U250 | 196 us | 22 us |
108+
+-----------------------------------+-----------------+----------------+
109+
| Accelaration Ratio | N/A | 0.36X |
110+
+-----------------------------------+-----------------+----------------+
111+
112+
113+
The hardware resources are listed in the following table (vivado 18.3 report without platform).
114+
115+
.. _tab_SVD_resource:
116+
117+
.. table:: Resource utilization report of SVD on U250
118+
:align: center
119+
120+
+---------------+------+------+------+--------+--------+
121+
| Inmlemetation | BRAM | URAM | DSP | FF | LUT |
122+
+---------------+------+------+------+--------+--------+
123+
| SVD | 9 | 0 | 126 | 46360 | 40313 |
124+
+---------------+------+------+------+--------+--------+
125+
126+
.. toctree::
127+
:maxdepth: 1

0 commit comments

Comments
 (0)