ONE - On-device Neural Engine
|
Functions | |
_get_parser () | |
load_graph (model_file) | |
generate_metadata_header (original_graph, bcq_version, output_arrays) | |
generate_bcq_metadata_v1 (flags) | |
determine_bcq_version (flags) | |
generate_bcq_metadata (flags) | |
main () | |
Variables | |
tracebacklimit | |
ONE_START_MAGICNUM = int(-2e9 + 27) | |
ONE_END_MAGICNUM = int(2e9 - 27) | |
prog_name = os.path.basename(__file__) | |
|
protected |
Returns an ArgumentParser for generating BCQ metadata.
Definition at line 32 of file generate_bcq_metadata.py.
Referenced by main().
generate_bcq_metadata.determine_bcq_version | ( | flags | ) |
CAUTION : For now, BCQ has only one version and thus always returns 1 when BCQ information nodes are included. If new BCQ version is introduced, this function must be updated accordingly. When BCQ information does not exist, -1 is returned.
Definition at line 163 of file generate_bcq_metadata.py.
References load_graph().
Referenced by generate_bcq_metadata().
generate_bcq_metadata.generate_bcq_metadata | ( | flags | ) |
Basic format of metadata is as following. - Magic number indicating start - Version of BCQ Format - The number of original outputs - Metadata based on each BCQ format - Magic number indicating end
Definition at line 184 of file generate_bcq_metadata.py.
References determine_bcq_version(), generate_bcq_metadata_v1(), and load_graph().
generate_bcq_metadata.generate_bcq_metadata_v1 | ( | flags | ) |
BCQv1 contains following metadata. - The number of each BCQ information set
Definition at line 87 of file generate_bcq_metadata.py.
References generate_metadata_header(), and load_graph().
Referenced by generate_bcq_metadata().
generate_bcq_metadata.generate_metadata_header | ( | original_graph, | |
bcq_version, | |||
output_arrays | |||
) |
Definition at line 73 of file generate_bcq_metadata.py.
Referenced by generate_bcq_metadata_v1().
generate_bcq_metadata.load_graph | ( | model_file | ) |
Definition at line 61 of file generate_bcq_metadata.py.
Referenced by determine_bcq_version(), generate_bcq_metadata(), and generate_bcq_metadata_v1().
generate_bcq_metadata.main | ( | void | ) |
Definition at line 210 of file generate_bcq_metadata.py.
References _get_parser(), and main().
Referenced by main().
generate_bcq_metadata.ONE_END_MAGICNUM = int(2e9 - 27) |
Definition at line 29 of file generate_bcq_metadata.py.
generate_bcq_metadata.ONE_START_MAGICNUM = int(-2e9 + 27) |
Definition at line 28 of file generate_bcq_metadata.py.
generate_bcq_metadata.prog_name = os.path.basename(__file__) |
Definition at line 223 of file generate_bcq_metadata.py.
generate_bcq_metadata.tracebacklimit |
Definition at line 26 of file generate_bcq_metadata.py.