# STEP 3 : How to run the test code

1. ทำการ optimize โมดูล DPU ให้เกิดข้อผิดพลาดในการแสดงผลลดลง&#x20;

{% code title="VScode SSH terminal" %}

```bash
# Fix bug
$ cd ~/dpu_sw_optimize/zynqmp
$ source ./zynqmp_dpu_optimize.sh
```

{% endcode %}

โดยทำการ รัน script นี้จะแก้ไขปัญหาสองอย่างคือ&#x20;

* แก้ไขพื้นที่ partition rootfs ให้เหมาะสมกับการใช้งาน
* แก้ปัญหา Qos ในการใช้งานหน่วยความจำ DDR เพื่อให้สามารถทำงานในการแสดงภาพได้&#x20;

<figure><img src="https://paper-attachments.dropboxusercontent.com/s_7FDFE9AB4A4DA6B13FE9A5F3BB2BB10E271E0934CA0EAF1EC1294E8E6D5AC88D_1643098427366_image.png" alt=""><figcaption></figcaption></figure>

2. *ทำการ Compile* code ที่ได้ทำการแก้ไข

{% code title="VScode SSH terminal" %}

```bash
# Compile program
$ cd ~/Vitis-AI/demo/Vitis-AI-Library/samples/pointpillars
$ sh build.sh
```

{% endcode %}

3. ทำการรันโปรแกรมที่ Compile เสร็จเรียบร้อยแล้ว&#x20;

{% code title="VScode SSH terminal" %}

```bash
# Run code
$ env XLNX_POINTPILLARS_PRE_MT=1 ./test_bin_pointpillars  pointpillars_kitti_12000_0_pt pointpillars_kitti_12000_1_pt sample_pointpillars.bin  sample_pointpillars.png
```

{% endcode %}

* Output result (sample)

```bash
output : 
0       18.456533 4.032932 -1.682877 1.771039 4.524079 1.512004 1.671563     0.904651
0       34.541061 1.562399 -1.557331 1.538705 3.495937 1.431536 1.741875     0.904651
1       21.353041 -2.429055 -1.600262 0.590698 1.917939 1.757244 4.656905     0.835484
0       10.950532 4.672932 -1.657603 1.716550 4.384888 1.753955 1.632500     0.798187
```

<figure><img src="https://paper-attachments.dropboxusercontent.com/s_88D8AC9B41F18EA9F67E9A3155C653B583B5EC5E647A2AD2186B80CCD3541172_1643775527832_image.png" alt=""><figcaption><p>sample</p></figcaption></figure>

* ทดสอบประสิทธิภาพ

{% code title="VScode SSH terminal" %}

```bash
# Test performance
$ env XLNX_POINTPILLARS_PRE_MT=1 ./test_performance_pointpillars pointpillars_kitti_12000_0_pt  pointpillars_kitti_12000_1_pt  -t 1 -s 30 test_performance_pointpillars.list
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/fpga-design/c-c++-programming-on-ultra96v2-fpga-board/application-c-c++-on-ultra96v2-part-2/step-3-how-to-run-the-test-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
