Name | edgetpu-compiler-log-parser JSON |
Version |
0.1.3
JSON |
| download |
home_page | None |
Summary | Parse EdgeTPU compiler log |
upload_time | 2025-02-11 09:51:07 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License
Copyright (c) 2025 Changhun Han
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
|
keywords |
edgetpu
compiler
log
parser
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# edgetpu-compiler-log-parser
Parse the result of edgetpu_compiler!
## Build (Optional)
```sh
python -m build
```
## Install
```sh
python3 -m pip install -e .
```
## example
```python
# tests/example.py
from pprint import pprint
import subprocess
from edgetpu_compiler_log_parser import EdgeTPUCompilerLogParser
model_path_1 = "tests/model/efficientnet-edgetpu-M_quant.tflite"
model_path_2 = "tests/model/efficientnet-edgetpu-S_quant.tflite"
if __name__ == "__main__":
cmd = "edgetpu_compiler "
cmd += model_path_1 + " "
cmd += model_path_2 + " "
output = subprocess.check_output(cmd, shell=True)
log_parser = EdgeTPUCompilerLogParser(output)
pprint(log_parser.get_compile_infos())
```
```sh
python3 tests/example.py
```
```json
{'compile_time': '2037ms',
'compiled_info': [{'input_model': 'tests/model/efficientnet-edgetpu-M_quant.tflite',
'input_size': 7639.04,
'num_of_edge_tpu_subgraphs': 1,
'off_chip_memory_used': 4259.84,
'on_chip_memory_remaining': 0.0,
'on_chip_memory_used': 4311.04,
'operation_log': 'efficientnet-edgetpu-M_quant_edgetpu.log',
'output_model': 'efficientnet-edgetpu-M_quant_edgetpu.tflite',
'output_size': 8847.36,
'total_num_of_operations': 86},
{'input_model': 'tests/model/efficientnet-edgetpu-S_quant.tflite',
'input_size': 6000.64,
'num_of_edge_tpu_subgraphs': 1,
'off_chip_memory_used': 3450.88,
'on_chip_memory_remaining': 0.0,
'on_chip_memory_used': 3276.8,
'operation_log': 'efficientnet-edgetpu-S_quant_edgetpu.log',
'output_model': 'efficientnet-edgetpu-S_quant_edgetpu.tflite',
'output_size': 6952.96,
'total_num_of_operations': 66}],
'compiler_version': '16.0.384591198'}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "edgetpu-compiler-log-parser",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "EdgeTPU, compiler, log, parser",
"author": null,
"author_email": "Changhun Han <ehwjs1914@naver.com>",
"download_url": "https://files.pythonhosted.org/packages/c5/a8/86bfc48598364c00b7f0ba0a4e7bbee259f82b807e9f57f2f2d72f040daa/edgetpu_compiler_log_parser-0.1.3.tar.gz",
"platform": null,
"description": "# edgetpu-compiler-log-parser\n\nParse the result of edgetpu_compiler!\n\n## Build (Optional)\n\n```sh\npython -m build\n```\n\n## Install\n\n```sh\npython3 -m pip install -e .\n```\n\n## example\n\n```python\n# tests/example.py\nfrom pprint import pprint\n\nimport subprocess\nfrom edgetpu_compiler_log_parser import EdgeTPUCompilerLogParser\n\nmodel_path_1 = \"tests/model/efficientnet-edgetpu-M_quant.tflite\"\nmodel_path_2 = \"tests/model/efficientnet-edgetpu-S_quant.tflite\"\n\nif __name__ == \"__main__\":\n cmd = \"edgetpu_compiler \"\n cmd += model_path_1 + \" \"\n cmd += model_path_2 + \" \"\n\n output = subprocess.check_output(cmd, shell=True)\n\n log_parser = EdgeTPUCompilerLogParser(output)\n pprint(log_parser.get_compile_infos())\n```\n\n```sh\npython3 tests/example.py\n```\n\n```json\n{'compile_time': '2037ms',\n 'compiled_info': [{'input_model': 'tests/model/efficientnet-edgetpu-M_quant.tflite',\n 'input_size': 7639.04,\n 'num_of_edge_tpu_subgraphs': 1,\n 'off_chip_memory_used': 4259.84,\n 'on_chip_memory_remaining': 0.0,\n 'on_chip_memory_used': 4311.04,\n 'operation_log': 'efficientnet-edgetpu-M_quant_edgetpu.log',\n 'output_model': 'efficientnet-edgetpu-M_quant_edgetpu.tflite',\n 'output_size': 8847.36,\n 'total_num_of_operations': 86},\n {'input_model': 'tests/model/efficientnet-edgetpu-S_quant.tflite',\n 'input_size': 6000.64,\n 'num_of_edge_tpu_subgraphs': 1,\n 'off_chip_memory_used': 3450.88,\n 'on_chip_memory_remaining': 0.0,\n 'on_chip_memory_used': 3276.8,\n 'operation_log': 'efficientnet-edgetpu-S_quant_edgetpu.log',\n 'output_model': 'efficientnet-edgetpu-S_quant_edgetpu.tflite',\n 'output_size': 6952.96,\n 'total_num_of_operations': 66}],\n 'compiler_version': '16.0.384591198'}\n ```\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Changhun Han\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \n copies of the Software, and to permit persons to whom the Software is \n furnished to do so, subject to the following conditions: \n \n The above copyright notice and this permission notice shall be included in \n all copies or substantial portions of the Software. \n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, \n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE \n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER \n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING \n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER \n DEALINGS IN THE SOFTWARE.\n ",
"summary": "Parse EdgeTPU compiler log",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/HanChangHun/edgetpu-compiler-log-parser",
"Issues": "https://github.com/HanChangHun/edgetpu-compiler-log-parser/issues",
"Repository": "https://github.com/HanChangHun/edgetpu-compiler-log-parser"
},
"split_keywords": [
"edgetpu",
" compiler",
" log",
" parser"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "79f001d023325aa68851ac34c1ce6e61dd96875e2b537ab9b329535079a7cf76",
"md5": "5c7129684f8f22ac92273055d62a7378",
"sha256": "4e81adb704ec70ada4f4f310dec0e4cb08e2d139c1981c051af6cdba3473ed45"
},
"downloads": -1,
"filename": "edgetpu_compiler_log_parser-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5c7129684f8f22ac92273055d62a7378",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5001,
"upload_time": "2025-02-11T09:51:06",
"upload_time_iso_8601": "2025-02-11T09:51:06.597922Z",
"url": "https://files.pythonhosted.org/packages/79/f0/01d023325aa68851ac34c1ce6e61dd96875e2b537ab9b329535079a7cf76/edgetpu_compiler_log_parser-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c5a886bfc48598364c00b7f0ba0a4e7bbee259f82b807e9f57f2f2d72f040daa",
"md5": "db55c64f57df8f7f8684c3d4d67c8f57",
"sha256": "104021164cb9beb976bef9eb3b3ede6228ed1187b6d4b6a3f9a88bb3d0ed02e7"
},
"downloads": -1,
"filename": "edgetpu_compiler_log_parser-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "db55c64f57df8f7f8684c3d4d67c8f57",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4340,
"upload_time": "2025-02-11T09:51:07",
"upload_time_iso_8601": "2025-02-11T09:51:07.701811Z",
"url": "https://files.pythonhosted.org/packages/c5/a8/86bfc48598364c00b7f0ba0a4e7bbee259f82b807e9f57f2f2d72f040daa/edgetpu_compiler_log_parser-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-11 09:51:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "HanChangHun",
"github_project": "edgetpu-compiler-log-parser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "edgetpu-compiler-log-parser"
}