Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to merge latest changes for the RyzenAI-SW from the development branch (PR-117) #118

Merged
merged 48 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
a16cf62
updates the read document for transformers and llama.cpp
cyndwith Aug 7, 2024
6474cdd
Merge branch 'main' into main
cyndwith Aug 7, 2024
7a26d29
update the ReadMe instruction across PyTorch, ONNX and Llama.cpp
cyndwith Aug 7, 2024
577e76b
Merge pull request #84 from savsrini/igpu-cpp
cyndwith Aug 7, 2024
3de4ba1
Merge pull request #85 from dwchenna/main
cyndwith Aug 7, 2024
f951935
Merge pull request #86 from VitisAI/main
savitha-srinivasan Aug 7, 2024
e7452f4
removing the --help instructions from llm onnx flow
cyndwith Aug 13, 2024
77e44c6
Update README.md
fanz-xlnx Aug 14, 2024
a59ea96
Updated Hello World Example for Ryzen AI SW 1.2 Release
vgodsoe Aug 16, 2024
4f88354
updates to onnx-benchmark to support STX and PHX
cyndwith Aug 27, 2024
f94c4c4
typo
giovanniguastiamd Aug 19, 2024
e9c088e
typo
giovanniguastiamd Aug 19, 2024
110589b
typo
giovanniguastiamd Aug 19, 2024
3b5427c
Merge pull request #89 from vigodsoe/helloworld-1-2-updates
cyndwith Aug 19, 2024
8b57cc5
PR
giovanniguastiamd Aug 20, 2024
3a97663
Update README.md
cyndwith Aug 21, 2024
a9ff650
updates to merge changes from dev to main branch
cyndwith Aug 27, 2024
0df9e3e
Merge branch 'main' into dev
cyndwith Aug 21, 2024
c2b63c9
merge changes from VitisAI/dev
cyndwith Aug 27, 2024
7657edf
fix to https://github.com/onnx/onnx/issues/6267
giovanniguastiamd Aug 22, 2024
fb64be1
fix for the build for windows
cyndwith Aug 27, 2024
c49c1a6
Refreshed Hello World example for 1.2 release, included new descripti…
vgodsoe Aug 23, 2024
c6bc8e5
Merge pull request #97 from vigodsoe/helloworld_1_2_updates
cyndwith Aug 23, 2024
455259e
adding clarificatoin to use Anaconda prompt for onnx-benchmark
cyndwith Aug 23, 2024
c62c8b5
Merge branch 'main' into main_ci_add
cyndwith Aug 23, 2024
2f6dd68
Merge pull request #96 from abalasa/main_ci_add
cyndwith Aug 23, 2024
3a8ea56
Merge branch 'dev' into unified_public
cyndwith Aug 23, 2024
35d3f6c
Merge pull request #95 from gguasti/unified_public
cyndwith Aug 23, 2024
4ce8d4e
Merge branch 'main' into dev
cyndwith Aug 23, 2024
efc9b6c
Merge branch 'main' of https://gitenterprise.xilinx.com/VitisAI/Ryzen…
cyndwith Aug 23, 2024
ce40f25
update the documentation for LLMs pytorch flow
cyndwith Aug 23, 2024
3b31e6a
Merge pull request #99 from VitisAI/llm_readme_updates
cyndwith Aug 24, 2024
95816f1
update cmakelist.txt to fixed compile issue OPENCV_DIR is add
Aug 26, 2024
9865e69
update multi-model demo
Aug 26, 2024
7264b50
update Opncv_DIR
Aug 26, 2024
8cb8856
update the readme
Aug 26, 2024
0a16c7c
update multi-model demo readme
Aug 26, 2024
630526b
Merge branch 'dev' into main
cyndwith Aug 26, 2024
60cc9cf
Merge branch 'dev' into main
cyndwith Aug 26, 2024
16f697f
Merge branch 'dev' into dev
cyndwith Aug 26, 2024
8ce4d48
Merge pull request #101 from VitisAI/main
cyndwith Aug 26, 2024
929663f
Merge branch 'dev' into dev
cyndwith Aug 26, 2024
2f4b57e
Merge pull request #100 from dachang/dev
cyndwith Aug 26, 2024
2a4fc84
Merge pull request #102 from VitisAI/dev
cyndwith Aug 26, 2024
7f51920
Merge pull request #1 from cyndwith/hot_fixes_v1.2.2
cyndwith Aug 27, 2024
c20f80b
updates to include dependencies for yolov8 tutorial
cyndwith Aug 27, 2024
b00783a
clean-up the CI config file
cyndwith Aug 28, 2024
a059a19
Merge branch 'main' into pr-117
cyndwith Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
updates to merge changes from dev to main branch
  • Loading branch information
cyndwith committed Aug 27, 2024
commit a9ff650c637b1b54593282587a98759fa110303c
Binary file removed demo/multi-model-exec/1x4.xclbin
Binary file not shown.
48 changes: 21 additions & 27 deletions demo/multi-model-exec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,16 @@ This is the demo of showing multiple AI models running concurrently on Ryzen AI.


```
│ 1x4.xclbin
│ env.yaml
│ README.md
│ vaip_config.json
│ voe-0.1.0-cp39-cp39-win_amd64.whl
├─.vscode
│ settings.json
├─bin
ipu_multi_models.exe
npu_multi_models.exe
│ onnxruntime.dll
│ onnxruntime_providers_shared.dll
│ onnxruntime_providers_vitisai.dll
│ onnxruntime_vitisai_ep.dll
│ DirectML.dll
│ vaip_config.json
├─images
│ mobilenet_V2.jpg
Expand All @@ -56,12 +53,19 @@ This is the demo of showing multiple AI models running concurrently on Ryzen AI.
│ segmentation.jpg
│ yolox.jpg
└─ipu_modelsx4_demo
│ generate_script.py
└─npu_modelsx4_demo
│ run_mobile_net_v2.bat
│ run_modelx4.bat
│ run_modelx4_with_camera_on.bat
│ run_resnet50.bat
│ run_retinaface.bat
│ run_segmentation.bat
│ run_yolovx.bat
└─config
mobile_net_v2.json
modelx4.json
modelx4_with_camera_on.json
resnet50.json
retinaface.json
segmentation.json
Expand All @@ -72,7 +76,7 @@ This is the demo of showing multiple AI models running concurrently on Ryzen AI.

### 3.1 Environment Setup

Please note that all the steps mentioned here need to be performed in ***Windows CMD Prompt***. Make sure the IPU driver has been installed by following the instructions on the [Ryzen AI Developer Guide](https://ryzenai.docs.amd.com/en/latest). The IPU driver version >= 10.106.8.62 has been tested. The older version might work but no guaranteed.
Please note that all the steps mentioned here need to be performed in ***Windows CMD Prompt***. Make sure the NPU driver has been installed by following the instructions on the [Ryzen AI Developer Guide](https://ryzenai.docs.amd.com/en/latest). The NPU driver version = 32.0.201.204 has been tested. The older version might work but no guaranteed.

1. Follow these steps to install Anaconda on your system if it has not been installed:

Expand All @@ -82,27 +86,24 @@ Please note that all the steps mentioned here need to be performed in ***Windows

- **Verify Installation:** After installation, open Anaconda Prompt on Windows and type `conda --version` to verify that Anaconda was installed correctly. You should see the installed Conda version.

2. Create a Conda Environment by using the env.yaml
```bash
conda create --name <env_name> --file=env.yaml
```
2. Install Ryzen AI by following the [documentation](https://ryzenai.docs.amd.com/en/latest/inst.html#)

3. Activate the Environment
```bash
conda activate <env_name>
```
### 3.2 Demo Preparation

1. Download the onnx models and test image/video package, and unzip it under **<path_to_RyzenAI-SW>/demo/multi-model-exec/ipu_modelsx4_demo/**.
Download the onnx models and test image/video package, and unzip it under **<path_to_RyzenAI-SW>/demo/multi-model-exec/ipu_modelsx4_demo/**.


[Download Package](https://www.xilinx.com/bin/public/openDownload?filename=resource_multi_model_demo.zip)

You should have the directory like this:
```bash
.
├── generate_script.py
├── modelsx4_screenshot.png
├── ***.bat
├── config
├── resource
│   ├── RetinaFace_int.onnx
│   ├── detection
Expand All @@ -117,13 +118,6 @@ Please note that all the steps mentioned here need to be performed in ***Windows
│   └── to_video.py
```

2. Generate the config files by running the comand:

```bash
python generate_script.py
```



## 4 Run The Demo

Expand All @@ -149,6 +143,6 @@ run_modelx4.bat

## 5 Know Issues

- Python version version 3.9 is required if not "The code execution cannot proceed because python39.dll was not found. Reinstalling he programm may fix this problem"
- If you find an exclamation mark on the icon of the AMD IPU device in the System Devices list in your Device Manager, it indicates that there is an issue with your driver installation, and the program may not function correctly.
- Python version version 3.10 is required if not "The code execution cannot proceed because python39.dll was not found. Reinstalling he programm may fix this problem"
- If you find an exclamation mark on the icon of the AMD NPU device in the System Devices list in your Device Manager, it indicates that there is an issue with your driver installation, and the program may not function correctly.
- If this demo aborted with the 'glog.dll cannot be found' error, you need to use the command 'set PATH=C:<path-to-conda-glog>;%PATH%' to explicitly export the path to 'glog.dll'. 'glog.dll' is installed along with ANACONDA3. The recommended ANACONDA3 installer is 'Anaconda3-2023.07-2-Windows-x86_64'.
Binary file removed demo/multi-model-exec/bin/ipu_multi_models.exe
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions demo/multi-model-exec/bin/onnxruntime.dll

This file was deleted.

3 changes: 0 additions & 3 deletions demo/multi-model-exec/bin/onnxruntime_vitisai_ep.dll

This file was deleted.

173 changes: 173 additions & 0 deletions demo/multi-model-exec/bin/vaip_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"passes": [
{
"name": "init",
"plugin": "vaip-pass_init"
},
{
"name": "fuse_DPU",
"plugin": "vaip-pass_level1_dpu",
"passDpuParam": {
"subPass": [
{
"name": "convert_ending_blacklist_ops_to_unknown_op",
"plugin": "vaip-pass_convert_ending_blacklist_ops_to_unknown_op",
"disabled": false
},
{
"name": "dynamic_input_batch",
"plugin": "vaip-pass_dynamic_input_batch"
},
{
"name": "create_const_op",
"plugin": "vaip-pass_create_const_op"
},
{
"name": "convert_split_to_xir",
"plugin": "vaip-pass_convert_split_to_xir_op"
},
{
"name": "to_xir",
"plugin": "vaip-pass_to_xir_ops"
},
{
"name": "convert_pad",
"plugin": "vaip-pass_convert_pad",
"enableGc": true
},
{
"name": "convert_in_to_gn",
"plugin": "vaip-pass_convert_instancenorm_to_groupnorm",
"enableGc": true
},
{
"name": "remove_extra_q_dq",
"plugin": "vaip-pass_remove_extra_q_dq"
},
{
"name": "merge_add_into_conv_bias",
"plugin": "vaip-pass_merge_add_into_conv_bias"
},
{
"name": "merge_fix",
"plugin": "vaip-pass_merge_fix",
"enableGc": true
},
{
"name": "layoutransform",
"plugin": "vaip-pass_layout_transform_via_adding_transpose"
},
{
"name": "gc_after_layout_transform",
"plugin": "vaip-pass_remove_isolated_node"
},
{
"name": "fuse_transpose",
"plugin": "vaip-pass_fuse_transpose",
"enableGc": true
},
{
"name": "gc_after_fuse_transpose",
"plugin": "vaip-pass_remove_isolated_node"
},
{
"name": "remove_identity",
"plugin": "vaip-pass_remove_identity",
"logVerbosity": 1
},
{
"name": "add_fix_after_const",
"plugin": "vaip-pass_const_add_fix"
},
{
"name": "remove_reshape_fix",
"plugin": "vaip-pass_py_ext",
"disabled": true,
"pyExt": {
"moduleName": "voe.passes.remove_reshape_fix",
"methodName": "rules"
}
},
{
"name": "const_fold_batchnorm_to_scale",
"plugin": "vaip-pass_const_fold_batchnorm_to_scale"
},
{
"name": "const_fold_transpose",
"plugin": "vaip-pass_const_fold_transpose"
},
{
"name": "merge_pad",
"plugin": "vaip-pass_merge_pad"
},
{
"name": "merge_hard_sigmoid",
"plugin": "vaip-pass_merge_hard_sigmoid"
},
{
"name": "merge_mul",
"plugin": "vaip-pass_merge_mul",
"enableGc": true
},
{
"name": "merge_consecutive_fix",
"plugin": "vaip-pass_merge_consecutive_fix",
"disabled": true,
"enableLog": true,
"logVerbosity": 1
},
{
"_comment": "test case 110",
"name": "convert_softmax_to_hard_softmax",
"plugin": "vaip-pass_convert_softmax_to_hard_softmax",
"disabled": true
},
{
"name": "merge_fix_fix_transpose",
"plugin": "vaip-pass_merge_fix_fix_transpose",
"enableGc": true,
"disabled": true
},
{
"name": "final_gc",
"plugin": "vaip-pass_remove_isolated_node"
}
],
"xcompilerAttrs": {
"debug_mode": {
"stringValue": "performance"
},
"dpu_subgraph_num": {
"uintValue": 32
},
"opt_level": {
"uintValue": 0
},
"dump_subgraph_ops": {
"boolValue": false
},
"profile": {
"uintValue": 0
},
"disable_std_quant": {
"boolValue": false
},
"enable_fast_pm": {
"boolValue": true
}
},
"minimum_num_of_conv": 2
}
}
],
"target": "RyzenAI_vision_config_1",
"targets": [
{
"name": "RyzenAI_vision_config_1",
"pass": [
"init",
"fuse_DPU"
]
}
]
}
15 changes: 0 additions & 15 deletions demo/multi-model-exec/env.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions demo/multi-model-exec/ipu_modelsx4_demo/config/mobile_net_v2.json

This file was deleted.

62 changes: 0 additions & 62 deletions demo/multi-model-exec/ipu_modelsx4_demo/config/modelx4.json

This file was deleted.

Loading