Skip to content

Commit

Permalink
Update to version 2.2.1. The setting to enable sparse mode when compi…
Browse files Browse the repository at this point in the history
…ling for RZ/V2H is now the default.
  • Loading branch information
hiroyuki-sakamoto committed Apr 1, 2024
1 parent d501cac commit 7fba7e1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apps/tutorial_app_v2ml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ int main(int argc, char** argv)
int udmabuf_fd = 0;
/* u-dma-buf start addres */
uint64_t udmabuf_addr_start = 0;
uint64_t drpaimem_addr_start = 0;
uint32_t drpaimem_addr_start = 0;
uint32_t udmabuf_size = INPUT_IMAGE_H*INPUT_IMAGE_W*INPUT_IMAGE_C;
/* Load Label list */
label_file_map = load_label_file(labels);
Expand All @@ -385,7 +385,7 @@ int main(int argc, char** argv)

/*Load model_dir structure and its weight to runtime object */
drpaimem_addr_start = get_drpai_start_addr();
if (drpaimem_addr_start == (uint64_t)NULL) return 0;
if (drpaimem_addr_start == (uint32_t)NULL) return 0;
runtime.LoadModel(model_dir, drpaimem_addr_start+0x38E0000);

/*Get input data */
Expand Down
4 changes: 2 additions & 2 deletions docs/Model_List.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Below is a list of AI models that Renesas has verified for conversion with the D
|------------------------|------------|------------|-------------|-------------|
| DRP-AI TVM[^1] | v1.1.1 | v1.1.1 | v1.1.1 | v2.2.0 |
| Evaluation Board | RZ/V2L EVK | RZ/V2M EVK | RZ/V2MA EVK | RZ/V2H EVK |
| DRP-AI Translator | v1.82 | v1.82 | v1.82 | v1.83 |
| DRP-AI Translator | v1.82 | v1.82 | v1.82 | i8 v1.01 |
| Linux Package | v3.0.2 | v1.3.0 | v1.0.0 | AISDK v3.00 |
| DRP-AI Support Package | v7.30 | v7.30 | v7.20 | AISDK v3.00 |

Expand Down Expand Up @@ -47,7 +47,7 @@ Below is a list of AI models that Renesas has verified for conversion with the D
|[YOLOv8m](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m.pt) |Object Detection |ONNX |147706ms|1020ms |356004ms|987ms |177888ms|971ms | | |
|[YOLOv8l](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt) |Object Detection |ONNX |143141ms|447ms |352785ms|398ms |176179ms|399ms | | |
|[YOLOv8x](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x.pt) |Object Detection |ONNX |60873ms |594ms |147215ms|524ms |73570ms |522ms | | |
|[YOLOX_s](https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_s.pth) |Object Detection |ONNX |56540ms |402ms |138831ms|368ms |69598ms |373ms | |69ms |
|[YOLOX_s](https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_s.pth) |Object Detection |ONNX |56540ms |402ms |138831ms|368ms |69598ms |373ms | |16ms |
|[YOLOX_m](https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_m.pth) |Object Detection |ONNX |150285ms|686ms |361990ms|580ms |180987ms|587ms | | |
|[YOLOX_l](https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_l.pth) |Object Detection |ONNX |139775ms|289ms |344315ms|228ms |172028ms|229ms | | |
|[YOLOX_x](https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_x.pth) |Object Detection |ONNX |65489ms |463ms |157959ms|341ms |78918ms |344ms | | |
Expand Down
3 changes: 1 addition & 2 deletions setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ Requirements are listed below.
- Package : git
- Evaluation Board: RZ/V2L EVK, RZ/V2M EVK, RZ/V2MA EVK
- Related Software Version:
- [DRP-AI Translator V1.84](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/drp-ai-translator)
- RZ/V2L
- [DRP-AI Translator V1.83](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/drp-ai-translator)
- [RZ/V2L AI SDK v2.10](https://www.renesas.com/software-tool/rzv2l-ai-software-development-kit)
- RZ/V2M, RZ/V2MA
- [DRP-AI Translator V1.83](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/drp-ai-translator)
- [RZ/V Verified Linux Package V3.0.4 or lator](https://www.renesas.com/us/en/software-tool/rzv-verified-linux-package)
- DRP-AI Support Package V7.40 or lator [RZ/V2L](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzv2l-drp-ai-support-package) [RZ/V2M](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpusl/rzv2m-drp-ai-support-package) [RZ/V2MA](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzv2ma-drp-ai-support-package)

Expand Down
12 changes: 11 additions & 1 deletion tutorials/run_drp_quant_compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ ONNX_FILE=$6
work_dir=$PWD
mkdir -p ${OUT}

if [ -z $SPARSE_ENABLE ] ; then
SPARSE_OPT="--sparse"
else
if "${SPARSE_ENABLE}" ; then
SPARSE_OPT="--sparse"
else
SPARSE_OPT=" "
fi
fi

expected_result_files=(
"addr_map.txt"
"addr_map.yaml"
Expand All @@ -58,7 +68,7 @@ for file in "${expected_result_files[@]}"; do
done

cd ${TOOL_DIR}
python3 DRP-AI_Translator/run.py ${CNAME} --onnx ${work_dir}/${ONNX_FILE} --prepost ${work_dir}/${PREPOST_FILE} --s_addr ${START_ADDR}
python3 DRP-AI_Translator/run.py ${CNAME} --onnx ${work_dir}/${ONNX_FILE} --prepost ${work_dir}/${PREPOST_FILE} --s_addr ${START_ADDR} ${SPARSE_OPT}

cd ${work_dir}
mv ${TOOL_DIR}/output/${CNAME}/* ${OUT}/
Expand Down
12 changes: 11 additions & 1 deletion tutorials/tutorial_RZV2H.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,17 @@ Please set `OPTIMIZER_ENABLE=false` as below.
``` bash
OPTIMIZER_ENABLE=false python3 compile_onnx_model_quant.py ./resnet50-v1-7.onnx -o resnet50_v1_onnx -t $SDK -d $TRANSLATOR -c $QUANTIZER --images calibrate_images_voc -v 100
```
### b. Interpreter mode

### b. SPARSE_ENABLE option
SPARSE_ENABLE is sparse option.
This option is enabled by default.
If you want to explicitly disable Sparse mode (to ensure processing in Dense mode), specify this option to false.
Please set `SPARSE_ENABLE=false` as below.
``` bash
SPARSE_ENABLE=false python3 compile_onnx_model_quant.py ./resnet50-v1-7.onnx -o resnet50_v1_onnx -t $SDK -d $TRANSLATOR -c $QUANTIZER --images calibrate_images_voc -v 100
```

### c. Interpreter mode

Interpreter mode is inference-simulation function supported by DRP-AI TVM[^1].
You can refer inference results from quantized models on PC.
Expand Down

0 comments on commit 7fba7e1

Please sign in to comment.