|
ONE - On-device Neural Engine
|

Public Member Functions | |
| initialize (self, version, build_data) | |
| read_env (self) | |
| prepare_binaries (self) | |
| get_libs_dir (self) | |
| get_runtime_build_dir (self) | |
| copy_libraries (self, src_dir, target_dir, subdir=None) | |
| recreate_dir (self, dir_path) | |
| create_build_tag (self) | |
Data Fields | |
| DEFAULT_PRODUCT_DIR | |
| product_dir | |
| platform | |
| glibc_version | |
| whl_binaries_target_dir | |
Protected Member Functions | |
| _read_env (self, env_var_name) | |
| _validate_platform (self, value) | |
| _validate_product_dir (self, value) | |
| _validate_glibc_version (self, value) | |
Protected Attributes | |
| _validate_platform | |
| _validate_glibc_version | |
| _validate_product_dir | |
This file contains the code used by the runtime/pyproject.toml config file. It's executed when the user attempts to build a python wheel for the ONERT API. The code in this file is executed before the target is built.
Definition at line 9 of file wheel_target_hook.py.
|
protected |
Definition at line 136 of file wheel_target_hook.py.
Referenced by wheel_target_hook.WheelBuildHook.read_env().
|
protected |
Definition at line 173 of file wheel_target_hook.py.
|
protected |
Definition at line 150 of file wheel_target_hook.py.
|
protected |
Definition at line 164 of file wheel_target_hook.py.
References wheel_target_hook.WheelBuildHook.DEFAULT_PRODUCT_DIR.
| wheel_target_hook.WheelBuildHook.copy_libraries | ( | self, | |
| src_dir, | |||
| target_dir, | |||
subdir = None |
|||
| ) |
Copy all .so files found in src_dir to the target_dir If subdir is provided copy from src_dir/subdir to target_dir/subdir
Definition at line 93 of file wheel_target_hook.py.
Referenced by wheel_target_hook.WheelBuildHook.prepare_binaries().
| wheel_target_hook.WheelBuildHook.create_build_tag | ( | self | ) |
Create the most appropriate build tag that will be used to name the wheel
Definition at line 117 of file wheel_target_hook.py.
References wheel_target_hook.WheelBuildHook.glibc_version.
| wheel_target_hook.WheelBuildHook.get_libs_dir | ( | self | ) |
Retrieve the path of a directory where the required shared libraries are
Definition at line 65 of file wheel_target_hook.py.
References wheel_target_hook.WheelBuildHook.get_runtime_build_dir().
Referenced by wheel_target_hook.WheelBuildHook.prepare_binaries().
| wheel_target_hook.WheelBuildHook.get_runtime_build_dir | ( | self | ) |
Retrieve the path of a directory where the runtime's binaries are (the build tree's root)
Definition at line 82 of file wheel_target_hook.py.
References wheel_target_hook.WheelBuildHook.DEFAULT_PRODUCT_DIR, and wheel_target_hook.WheelBuildHook.product_dir.
Referenced by wheel_target_hook.WheelBuildHook.get_libs_dir().
| wheel_target_hook.WheelBuildHook.initialize | ( | self, | |
| version, | |||
| build_data | |||
| ) |
Definition at line 14 of file wheel_target_hook.py.
References wheel_target_hook.WheelBuildHook.initialize().
Referenced by wheel_target_hook.WheelBuildHook.initialize().
| wheel_target_hook.WheelBuildHook.prepare_binaries | ( | self | ) |
Definition at line 55 of file wheel_target_hook.py.
References wheel_target_hook.WheelBuildHook.copy_libraries(), wheel_target_hook.WheelBuildHook.get_libs_dir(), and wheel_target_hook.WheelBuildHook.whl_binaries_target_dir.
| wheel_target_hook.WheelBuildHook.read_env | ( | self | ) |
Read the relevant environment variables or use the defaults
Definition at line 48 of file wheel_target_hook.py.
References wheel_target_hook.WheelBuildHook._read_env(), wheel_target_hook.WheelBuildHook.glibc_version, wheel_target_hook.WheelBuildHook.platform, and wheel_target_hook.WheelBuildHook.product_dir.
| wheel_target_hook.WheelBuildHook.recreate_dir | ( | self, | |
| dir_path | |||
| ) |
Delete a directory (if it exists) and create it again but empty
Definition at line 110 of file wheel_target_hook.py.
|
protected |
Definition at line 139 of file wheel_target_hook.py.
|
protected |
Definition at line 138 of file wheel_target_hook.py.
|
protected |
Definition at line 140 of file wheel_target_hook.py.
| wheel_target_hook.WheelBuildHook.DEFAULT_PRODUCT_DIR |
Definition at line 18 of file wheel_target_hook.py.
Referenced by wheel_target_hook.WheelBuildHook._validate_product_dir(), and wheel_target_hook.WheelBuildHook.get_runtime_build_dir().
| wheel_target_hook.WheelBuildHook.glibc_version |
Definition at line 23 of file wheel_target_hook.py.
Referenced by wheel_target_hook.WheelBuildHook.create_build_tag(), and wheel_target_hook.WheelBuildHook.read_env().
| wheel_target_hook.WheelBuildHook.platform |
Definition at line 22 of file wheel_target_hook.py.
Referenced by wheel_target_hook.WheelBuildHook.read_env().
| wheel_target_hook.WheelBuildHook.product_dir |
Definition at line 21 of file wheel_target_hook.py.
Referenced by wheel_target_hook.WheelBuildHook.get_runtime_build_dir(), and wheel_target_hook.WheelBuildHook.read_env().
| wheel_target_hook.WheelBuildHook.whl_binaries_target_dir |
Definition at line 35 of file wheel_target_hook.py.
Referenced by wheel_target_hook.WheelBuildHook.prepare_binaries().