Skip to content

Commit 46762d9

Browse files
committed
Update Vitis AI Runtime to 1.3.2
1 parent 8d3b18c commit 46762d9

File tree

7 files changed

+32
-42
lines changed

7 files changed

+32
-42
lines changed

setup/mpsoc/VART/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ source ~/petalinux_sdk/environment-setup-aarch64-xilinx-linux
2929
```
3030
Note that if you close the current terminal, you need to re-execute the above instructions in the new terminal interface.
3131

32-
4. Download the [vitis_ai_2020.2-r1.3.1.tar.gz](https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_2020.2-r1.3.1.tar.gz) and install it to the petalinux system.
32+
4. Download the [vitis_ai_2020.2-r1.3.2.tar.gz](https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_2020.2-r1.3.2.tar.gz) and install it to the petalinux system.
3333
```
34-
tar -xzvf vitis_ai_2020.2-r1.3.1.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux
34+
tar -xzvf vitis_ai_2020.2-r1.3.2.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux
3535
```
3636

3737
5. Cross compile the sample, take `resnet50` as an example.
@@ -76,11 +76,11 @@ steps.**
7676
3. (Optional) How to update Vitis AI Runtime and install them separately.
7777

7878
If you want to update the Vitis AI Runtime or install them to your custom board image, follow these steps.
79-
* Download the [Vitis AI Runtime 1.3.1](https://www.xilinx.com/bin/public/openDownload?filename=vitis-ai-runtime-1.3.1.tar.gz).
79+
* Download the [Vitis AI Runtime 1.3.2](https://www.xilinx.com/bin/public/openDownload?filename=vitis-ai-runtime-1.3.2.tar.gz).
8080
* Untar the runtime packet and copy the following folder to the board using scp.
8181
```
82-
tar -xzvf vitis-ai-runtime-1.3.1.tar.gz
83-
scp -r vitis-ai-runtime-1.3.1/aarch64/centos root@IP_OF_BOARD:~/
82+
tar -xzvf vitis-ai-runtime-1.3.2.tar.gz
83+
scp -r vitis-ai-runtime-1.3.2/aarch64/centos root@IP_OF_BOARD:~/
8484
```
8585
* Log in to the board using ssh. You can also use the serial port to login.
8686
* Install the Vitis AI Runtime. Execute the following command.

tools/Vitis-AI-Library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
cmake_minimum_required(VERSION 3.5)
1717
project(
1818
vitis_ai_library
19-
VERSION 1.3.1
19+
VERSION 1.3.2
2020
LANGUAGES C CXX)
2121
include(${CMAKE_SOURCE_DIR}/cmake/XilinxCommon.cmake)
2222

tools/Vitis-AI-Library/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ source ~/petalinux_sdk/environment-setup-aarch64-xilinx-linux
119119
```
120120
Note that if you close the current terminal, you need to re-execute the above instructions in the new terminal interface.
121121

122-
4. Download the [vitis_ai_2020.2-r1.3.1.tar.gz](https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_2020.2-r1.3.1.tar.gz) and install it to the petalinux system.
122+
4. Download the [vitis_ai_2020.2-r1.3.2.tar.gz](https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_2020.2-r1.3.2.tar.gz) and install it to the petalinux system.
123123
```
124-
tar -xzvf vitis_ai_2020.2-r1.3.1.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux
124+
tar -xzvf vitis_ai_2020.2-r1.3.2.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux
125125
```
126126

127127
5. To compile the library sample in the AI Library, take `facedetect` as an example, execute the following command.
@@ -191,20 +191,20 @@ steps.**
191191
4. (Optional) How to update Vitis AI Runtime and install them separately.
192192

193193
If you want to update the Vitis AI Runtime or install them to your custom board image, follow these steps.
194-
* Download the [Vitis AI Runtime 1.3.1](https://www.xilinx.com/bin/public/openDownload?filename=vitis-ai-runtime-1.3.1.tar.gz).
194+
* Download the [Vitis AI Runtime 1.3.2](https://www.xilinx.com/bin/public/openDownload?filename=vitis-ai-runtime-1.3.2.tar.gz).
195195

196196
* Untar the runtime packet and copy the following folder to the board using scp.
197197
```
198-
tar -xzvf vitis-ai-runtime-1.3.1.tar.gz
199-
scp -r vitis-ai-runtime-1.3.1/aarch64/centos root@IP_OF_BOARD:~/
198+
tar -xzvf vitis-ai-runtime-1.3.2.tar.gz
199+
scp -r vitis-ai-runtime-1.3.2/aarch64/centos root@IP_OF_BOARD:~/
200200
```
201201
* Log in to the board using ssh. You can also use the serial port to login.
202202
* Install the Vitis AI Runtime. Execute the following command.
203203
```
204204
cd centos
205205
bash setup.sh
206206
```
207-
Note if you update the VART to 1.3.1 and want to run the sample program, make sure you also use the latest sample code.
207+
Note if you update the VART to 1.3.2 and want to run the sample program, make sure you also use the latest sample code.
208208

209209
210210
### Running Vitis AI Library Examples

tools/Vitis-AI-Runtime/VART/quick_start_for_edge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ source ~/petalinux_sdk/environment-setup-aarch64-xilinx-linux
2323
```
2424
Note that if you close the current terminal, you need to re-execute the above instructions in the new terminal interface.
2525

26-
4. Download the [vitis_ai_2020.2-r1.3.1.tar.gz](https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_2020.2-r1.3.1.tar.gz) and install it to the petalinux system.
26+
4. Download the [vitis_ai_2020.2-r1.3.2.tar.gz](https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_2020.2-r1.3.2.tar.gz) and install it to the petalinux system.
2727
```
28-
tar -xzvf vitis_ai_2020.2-r1.3.1.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux
28+
tar -xzvf vitis_ai_2020.2-r1.3.2.tar.gz -C ~/petalinux_sdk/sysroots/aarch64-xilinx-linux
2929
```
3030

3131
## Compile the VART

tools/Vitis-AI-Runtime/VART/vart/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616
cmake_minimum_required(VERSION 3.12)
17-
project(vart VERSION 1.3.1 LANGUAGES C CXX)
17+
project(vart VERSION 1.3.2 LANGUAGES C CXX)
1818

1919
link_directories("$ENV{CONDA_PREFIX}/lib")
2020
include(${CMAKE_SOURCE_DIR}/cmake/VitisCommon.cmake)

tools/Vitis-AI-Runtime/VART/vart/dpu-controller/src/dpu_controller_dnndk.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,18 @@ void DpuControllerDnndk::run(size_t core_idx, const uint64_t code,
130130
;
131131
CHECK_EQ(code % 4096u, 0u) << "code = " << code;
132132
struct req_kernel_run_t t2;
133-
// CHECK_EQ(gen_reg.size(), 2u);
134-
auto parameter = gen_reg[0];
135-
auto workspace = gen_reg[1];
133+
auto size = gen_reg.size();
136134
memset(&t2, 0, sizeof(t2));
137135
t2.handle_id = 0u;
138136
t2.addr_code = (uint32_t)code;
139-
t2.addr0 = (uint32_t)parameter;
140-
t2.addr1 = (uint32_t)workspace;
141-
t2.addr2 = (uint32_t)code;
142-
t2.addr3 = 0;
143-
t2.addr4 = 0;
144-
t2.addr5 = 0;
145-
t2.addr6 = 0;
146-
t2.addr7 = 0;
137+
t2.addr0 = (uint32_t)size >= 1 ? gen_reg[0] : 0;
138+
t2.addr1 = (uint32_t)size >= 2 ? gen_reg[1] : 0;
139+
t2.addr2 = (uint32_t)size >= 3 ? gen_reg[2] : 0;
140+
t2.addr3 = (uint32_t)size >= 4 ? gen_reg[3] : 0;
141+
t2.addr4 = (uint32_t)size >= 5 ? gen_reg[4] : 0;
142+
t2.addr5 = (uint32_t)size >= 6 ? gen_reg[5] : 0;
143+
t2.addr6 = (uint32_t)size >= 7 ? gen_reg[6] : 0;
144+
t2.addr7 = (uint32_t)size >= 8 ? gen_reg[7] : 0;
147145
auto retval = ioctl(fd_, REQ_DPU_RUN, (void*)(&t2));
148146

149147
CHECK_EQ(retval, 0) << "run dpu failed.";

tools/Vitis-AI-Runtime/VART/vart/dpu-runner/src/imp/dpu_runner_ddr.cpp

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -204,29 +204,21 @@ void DpuRunnerDdr::fill_gen_reg(size_t device_core_id,
204204
auto reg_id = get_reg_id(reg->get_tensor());
205205
CHECK(reg_id >= 0 && reg_id < 16) << "reg_id = " << reg_id;
206206
int ddr_addr = get_ddr_addr(reg->get_tensor());
207-
208-
for (auto batch_idx = 0; batch_idx < num_of_batch; ++batch_idx) {
209-
auto idx2 = std::min(batch_idx, reg->get_tensor()->get_shape()[0] - 1);
210-
dim_idx[0] = idx2;
207+
for (auto batch_idx = 0; batch_idx < num_of_batch &&
208+
batch_idx <= (reg->get_tensor()->get_shape()[0] - 1); ++batch_idx) {
209+
dim_idx[0] = batch_idx;
211210
uint64_t base;
212211
size_t size;
213212
std::tie(base, size) = reg->data_phy(dim_idx);
214213
CHECK_NE(size, 0u);
215-
// move get_ddr_addr() out of this loop to improve perf;
216-
// int ddr_addr = get_ddr_addr(reg->get_tensor());
214+
//move get_ddr_addr() out of this loop to improve perf;
215+
//int ddr_addr = get_ddr_addr(reg->get_tensor());
217216
base = base - ddr_addr;
218217
auto reg_idx = batch_idx * num_of_regs + reg_id;
219218
LOG_IF(INFO, ENV_PARAM(DEBUG_DPU_RUNNER) >= 2)
220-
<< "set base reg: " << reg_idx //
221-
<< " num_of_regs: " << num_of_regs //
222-
<< " reg_id: " << reg_id //
223-
<< " batch_idx: " << batch_idx //
224-
<< " num_of_batch " << num_of_batch //
225-
<< " / " << (reg->get_tensor()->get_shape()[0] - 1) //
226-
<< " base = " << std::hex << "0x" << base << std::dec //
227-
<< " ddr = " << std::hex << "0x" << ddr_addr << std::dec //
228-
<< " tensor " << reg->get_tensor()->to_string() //
229-
;
219+
<< "set base reg: " << reg_idx //
220+
<< "base = " << std::hex << "0x" << base << std::dec
221+
<< "ddr = " << std::hex << "0x" << ddr_addr << std::dec;
230222
gen_reg[reg_idx] = base;
231223
}
232224
}

0 commit comments

Comments
 (0)