(
et_build_root: str,
model_name: str,
target: str,
system_config: str,
memory_mode: str,
build_output: str,
no_intermediate: bool,
no_quantize: bool,
)
| 136 | |
| 137 | |
| 138 | def build_pte( |
| 139 | et_build_root: str, |
| 140 | model_name: str, |
| 141 | target: str, |
| 142 | system_config: str, |
| 143 | memory_mode: str, |
| 144 | build_output: str, |
| 145 | no_intermediate: bool, |
| 146 | no_quantize: bool, |
| 147 | ): |
| 148 | command_list = [ |
| 149 | "python3", |
| 150 | "-m", |
| 151 | "backends.arm.scripts.aot_arm_compiler", |
| 152 | "--delegate", |
| 153 | "--bundleio", |
| 154 | f"--model_name={model_name}", |
| 155 | f"--target={target}", |
| 156 | f"--output={build_output}", |
| 157 | ] |
| 158 | |
| 159 | if "vgf" != target: |
| 160 | command_list.append(f"--system_config={system_config}") |
| 161 | command_list.append(f"--memory_mode={memory_mode}") |
| 162 | |
| 163 | if not no_quantize: |
| 164 | command_list.append("--quantize") |
| 165 | |
| 166 | if not no_intermediate: |
| 167 | command_list.append(f"--intermediate={output}") |
| 168 | |
| 169 | run_external_cmd(command_list) |
| 170 | |
| 171 | pte_file_ending = "bpte" |
| 172 | pte_file = os.path.join( |
| 173 | output, f"{model_name}_arm_delegate_{args.target}.{pte_file_ending}" |
| 174 | ) |
| 175 | |
| 176 | return pte_file |
| 177 | |
| 178 | |
| 179 | def build_ethosu_runtime( |
no test coverage detected