|
ONE - On-device Neural Engine
|
Data Structures | |
| class | _Action |
| class | _ArgSpec |
| class | ArgumentParser |
| class | DriverName |
| class | NormalOption |
| class | SchemaReport |
| class | TargetOption |
Functions | |
| _install_onelib_shim () | |
| Tuple[List[_ArgSpec], SchemaReport] | _load_schema (str file_path) |
| bool | _has_action (List[_ArgSpec] args, type action_type) |
| bool | _has_any_name (List[_ArgSpec] args, List[str] names) |
| List[str] | _check_codegen_contract (List[_ArgSpec] args) |
| Tuple[List[str], List[str]] | _check_profile_contract (List[_ArgSpec] args) |
| Dict[str, str] | _read_ini (str path) |
| _resolve_paths (str root, str target, str backend, bool installed) | |
| main () | |
Validator for ONE global target configuration packages.
What this script checks:
1) Target INI existence & minimal required keys (TARGET, BACKEND).
2) Command schema files (codegen.py, profile.py) exist for BACKEND.
3) Command schema is importable without ONE runtime by shimming `onelib.argumentparse`.
4) "Required" arguments are present in schemas:
- codegen: DriverName, TargetOption, input{,_path}, output{,_path}
- profile: DriverName, TargetOption, input{,_path}
Usage:
python tools/validate_global_conf.py --root . \
--target {TARGET_NAME} --backend {BACKEND_NAME}
You can also point to the "installed" layout:
python tools/validate_global_conf.py --installed \
--target {TARGET_NAME} --backend {BACKEND_NAME}
|
protected |
Definition at line 157 of file validate_global_conf.py.
References _has_action(), and _has_any_name().
Referenced by main().
|
protected |
Definition at line 170 of file validate_global_conf.py.
References _has_action(), and _has_any_name().
Referenced by main().
Definition at line 145 of file validate_global_conf.py.
Referenced by _check_codegen_contract(), and _check_profile_contract().
|
protected |
Definition at line 149 of file validate_global_conf.py.
Referenced by _check_codegen_contract(), and _check_profile_contract().
|
protected |
Definition at line 87 of file validate_global_conf.py.
Referenced by _load_schema().
|
protected |
Definition at line 113 of file validate_global_conf.py.
References _install_onelib_shim().
Referenced by main().
|
protected |
Definition at line 181 of file validate_global_conf.py.
Referenced by main().
|
protected |
Definition at line 195 of file validate_global_conf.py.
Referenced by main().
| validate_global_conf.main | ( | void | ) |
Definition at line 207 of file validate_global_conf.py.
References _check_codegen_contract(), _check_profile_contract(), _load_schema(), _read_ini(), _resolve_paths(), and main().
Referenced by main().