Artem Plastinkin commited on
Commit
7e5dc39
·
1 Parent(s): e9fe245

Move network_config in dedicated file

Browse files
compile_config/network_config.yaml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ last_nodes:
2
+ - /Reshape_output_0
3
+ - /Flatten_output_0
4
+ - /Reshape_1_output_0
5
+ global_config:
6
+ weight_symmetric: true
7
+ optimization_options:
8
+ - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
9
+ - -enable_shallow_conv_opt
10
+ - -enable_dma_fusion
11
+ - -stu_weight
12
+ - -distributed_coef_stu
int8/benchmarks/x5h_mwmx_npu_apm80_12core.yaml CHANGED
@@ -41,31 +41,15 @@ memory:
41
  power:
42
  avg_w: null
43
 
44
- network_configuration:
45
- key: centernet_r18_8xb16_crop512_140e_coco
46
- entry_yaml: |
47
- last_nodes:
48
- - /Reshape_output_0
49
- - /Flatten_output_0
50
- - /Reshape_1_output_0
51
- global_config:
52
- weight_symmetric: true
53
- optimization_options:
54
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
55
- - -enable_shallow_conv_opt
56
- - -enable_dma_fusion
57
- - -stu_weight
58
- - -distributed_coef_stu
59
-
60
  # Exact commands verified against the NNAC "Getting Started" chapter for this
61
- # model (it is that chapter's own worked example), plus the network_configuration
62
- # block verified against the internal model_zoo compile config for this model's
63
  # 12-core slice (see compile_config/l2seg_csm_16mb.json). Rendered by the
64
  # AI-Dashboard in place of the generic placeholder flow — see
65
  # downloadRunHTML() / parse_reproduce(). NOTE: the 1-core vs. 12-core split
66
- # (see `configuration` above) is set at compile time via
67
- # ${WORKDIR}/nnac_config/config.yaml, not a host_app flag — the on-board run
68
- # command below is identical to the 1-core run.
69
  reproduce:
70
  steps:
71
  - title: Activate the Python environment
@@ -76,25 +60,9 @@ reproduce:
76
  kind: note
77
  - title: Download the ONNX model and compile config
78
  command: hf download Renesas/CenterNet-R18-ONNX --repo-type model --include "fp32/*" "compile_config/*" --local-dir ./CenterNet-R18-ONNX-fp32
79
- - title: "Insert this model's entry into network_configuration: in nnac_config/config.yaml"
80
- command: |
81
- centernet_r18_8xb16_crop512_140e_coco:
82
- last_nodes:
83
- - /Reshape_output_0
84
- - /Flatten_output_0
85
- - /Reshape_1_output_0
86
- global_config:
87
- weight_symmetric: true
88
- optimization_options:
89
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
90
- - -enable_shallow_conv_opt
91
- - -enable_dma_fusion
92
- - -stu_weight
93
- - -distributed_coef_stu
94
- kind: snippet
95
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
96
  command: |
97
- python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 12
98
  - title: Set up the R-Car X5H board
99
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
100
  kind: note
 
41
  power:
42
  avg_w: null
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  # Exact commands verified against the NNAC "Getting Started" chapter for this
45
+ # model (it is that chapter's own worked example), plus the network config
46
+ # verified against the internal model_zoo compile config for this model's
47
  # 12-core slice (see compile_config/l2seg_csm_16mb.json). Rendered by the
48
  # AI-Dashboard in place of the generic placeholder flow — see
49
  # downloadRunHTML() / parse_reproduce(). NOTE: the 1-core vs. 12-core split
50
+ # (see `configuration` above) is set at compile time via the
51
+ # --network-config compile_config/network_config.yaml flag on legalize.py —
52
+ # the on-board run command below is identical to the 1-core run.
53
  reproduce:
54
  steps:
55
  - title: Activate the Python environment
 
60
  kind: note
61
  - title: Download the ONNX model and compile config
62
  command: hf download Renesas/CenterNet-R18-ONNX --repo-type model --include "fp32/*" "compile_config/*" --local-dir ./CenterNet-R18-ONNX-fp32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
64
  command: |
65
+ python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 12 --network-config ./CenterNet-R18-ONNX-fp32/compile_config/network_config.yaml
66
  - title: Set up the R-Car X5H board
67
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
68
  kind: note
int8/benchmarks/x5h_mwmx_npu_apm80_3core.yaml CHANGED
@@ -41,22 +41,6 @@ memory:
41
  power:
42
  avg_w: null
43
 
44
- network_configuration:
45
- key: centernet_r18_8xb16_crop512_140e_coco
46
- entry_yaml: |
47
- last_nodes:
48
- - /Reshape_output_0
49
- - /Flatten_output_0
50
- - /Reshape_1_output_0
51
- global_config:
52
- weight_symmetric: true
53
- optimization_options:
54
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
55
- - -enable_shallow_conv_opt
56
- - -enable_dma_fusion
57
- - -stu_weight
58
- - -distributed_coef_stu
59
-
60
  reproduce:
61
  steps:
62
  - title: Activate the Python environment
@@ -65,27 +49,11 @@ reproduce:
65
  (huggingface_hub) and the NNAC toolchain installed, e.g.
66
  `source nnac_venv/bin/activate` -- path depends on your toolchain install.
67
  kind: note
68
- - title: Download the ONNX model
69
- command: hf download Renesas/CenterNet-R18-ONNX --repo-type=model --include "fp32/*" --local-dir ./CenterNet-R18-ONNX-fp32
70
- - title: "Insert this model's entry into network_configuration: in nnac_config/config.yaml"
71
- command: |
72
- centernet_r18_8xb16_crop512_140e_coco:
73
- last_nodes:
74
- - /Reshape_output_0
75
- - /Flatten_output_0
76
- - /Reshape_1_output_0
77
- global_config:
78
- weight_symmetric: true
79
- optimization_options:
80
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
81
- - -enable_shallow_conv_opt
82
- - -enable_dma_fusion
83
- - -stu_weight
84
- - -distributed_coef_stu
85
- kind: snippet
86
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
87
  command: |
88
- python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 3
89
  - title: Set up the R-Car X5H board
90
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
91
  kind: note
 
41
  power:
42
  avg_w: null
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  reproduce:
45
  steps:
46
  - title: Activate the Python environment
 
49
  (huggingface_hub) and the NNAC toolchain installed, e.g.
50
  `source nnac_venv/bin/activate` -- path depends on your toolchain install.
51
  kind: note
52
+ - title: Download the ONNX model and compile config
53
+ command: hf download Renesas/CenterNet-R18-ONNX --repo-type model --include "fp32/*" "compile_config/*" --local-dir ./CenterNet-R18-ONNX-fp32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
55
  command: |
56
+ python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 3 --network-config ./CenterNet-R18-ONNX-fp32/compile_config/network_config.yaml
57
  - title: Set up the R-Car X5H board
58
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
59
  kind: note
int8/benchmarks/x5h_mwmx_npu_apm80_4core.yaml CHANGED
@@ -41,22 +41,6 @@ memory:
41
  power:
42
  avg_w: null
43
 
44
- network_configuration:
45
- key: centernet_r18_8xb16_crop512_140e_coco
46
- entry_yaml: |
47
- last_nodes:
48
- - /Reshape_output_0
49
- - /Flatten_output_0
50
- - /Reshape_1_output_0
51
- global_config:
52
- weight_symmetric: true
53
- optimization_options:
54
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
55
- - -enable_shallow_conv_opt
56
- - -enable_dma_fusion
57
- - -stu_weight
58
- - -distributed_coef_stu
59
-
60
  reproduce:
61
  steps:
62
  - title: Activate the Python environment
@@ -65,27 +49,11 @@ reproduce:
65
  (huggingface_hub) and the NNAC toolchain installed, e.g.
66
  `source nnac_venv/bin/activate` -- path depends on your toolchain install.
67
  kind: note
68
- - title: Download the ONNX model
69
- command: hf download Renesas/CenterNet-R18-ONNX --repo-type=model --include "fp32/*" --local-dir ./CenterNet-R18-ONNX-fp32
70
- - title: "Insert this model's entry into network_configuration: in nnac_config/config.yaml"
71
- command: |
72
- centernet_r18_8xb16_crop512_140e_coco:
73
- last_nodes:
74
- - /Reshape_output_0
75
- - /Flatten_output_0
76
- - /Reshape_1_output_0
77
- global_config:
78
- weight_symmetric: true
79
- optimization_options:
80
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
81
- - -enable_shallow_conv_opt
82
- - -enable_dma_fusion
83
- - -stu_weight
84
- - -distributed_coef_stu
85
- kind: snippet
86
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
87
  command: |
88
- python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 4
89
  - title: Set up the R-Car X5H board
90
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
91
  kind: note
 
41
  power:
42
  avg_w: null
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  reproduce:
45
  steps:
46
  - title: Activate the Python environment
 
49
  (huggingface_hub) and the NNAC toolchain installed, e.g.
50
  `source nnac_venv/bin/activate` -- path depends on your toolchain install.
51
  kind: note
52
+ - title: Download the ONNX model and compile config
53
+ command: hf download Renesas/CenterNet-R18-ONNX --repo-type model --include "fp32/*" "compile_config/*" --local-dir ./CenterNet-R18-ONNX-fp32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
55
  command: |
56
+ python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 4 --network-config ./CenterNet-R18-ONNX-fp32/compile_config/network_config.yaml
57
  - title: Set up the R-Car X5H board
58
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
59
  kind: note
int8/benchmarks/x5h_mwmx_npu_apm80_6core.yaml CHANGED
@@ -41,22 +41,6 @@ memory:
41
  power:
42
  avg_w: null
43
 
44
- network_configuration:
45
- key: centernet_r18_8xb16_crop512_140e_coco
46
- entry_yaml: |
47
- last_nodes:
48
- - /Reshape_output_0
49
- - /Flatten_output_0
50
- - /Reshape_1_output_0
51
- global_config:
52
- weight_symmetric: true
53
- optimization_options:
54
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
55
- - -enable_shallow_conv_opt
56
- - -enable_dma_fusion
57
- - -stu_weight
58
- - -distributed_coef_stu
59
-
60
  reproduce:
61
  steps:
62
  - title: Activate the Python environment
@@ -65,27 +49,11 @@ reproduce:
65
  (huggingface_hub) and the NNAC toolchain installed, e.g.
66
  `source nnac_venv/bin/activate` -- path depends on your toolchain install.
67
  kind: note
68
- - title: Download the ONNX model
69
- command: hf download Renesas/CenterNet-R18-ONNX --repo-type=model --include "fp32/*" --local-dir ./CenterNet-R18-ONNX-fp32
70
- - title: "Insert this model's entry into network_configuration: in nnac_config/config.yaml"
71
- command: |
72
- centernet_r18_8xb16_crop512_140e_coco:
73
- last_nodes:
74
- - /Reshape_output_0
75
- - /Flatten_output_0
76
- - /Reshape_1_output_0
77
- global_config:
78
- weight_symmetric: true
79
- optimization_options:
80
- - -segmentation_json ./CenterNet-R18-ONNX-fp32/compile_config/l2seg_csm_16mb.json
81
- - -enable_shallow_conv_opt
82
- - -enable_dma_fusion
83
- - -stu_weight
84
- - -distributed_coef_stu
85
- kind: snippet
86
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
87
  command: |
88
- python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 6
89
  - title: Set up the R-Car X5H board
90
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
91
  kind: note
 
41
  power:
42
  avg_w: null
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  reproduce:
45
  steps:
46
  - title: Activate the Python environment
 
49
  (huggingface_hub) and the NNAC toolchain installed, e.g.
50
  `source nnac_venv/bin/activate` -- path depends on your toolchain install.
51
  kind: note
52
+ - title: Download the ONNX model and compile config
53
+ command: hf download Renesas/CenterNet-R18-ONNX --repo-type model --include "fp32/*" "compile_config/*" --local-dir ./CenterNet-R18-ONNX-fp32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  - title: Compile with the NNAC toolchain (INT8 auto-cast from the FP32 graph)
55
  command: |
56
+ python3 nnac_frontend/legalize.py -d binary/nnx ./CenterNet-R18-ONNX-fp32/fp32/centernet_r18_8xb16_crop512_140e_coco.onnx --num-core 6 --network-config ./CenterNet-R18-ONNX-fp32/compile_config/network_config.yaml
57
  - title: Set up the R-Car X5H board
58
  command: Configure the board per the AI Compiler (NNAC) "Getting Started" guide, section 3.4 (host TFTP/NFS setup, bootloader flashing, U-Boot, Linux boot, login) -- exact steps depend on your board/network setup.
59
  kind: note