Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 1 | # Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved. |
| 2 | # |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the License); you may |
| 6 | # not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an AS IS BASIS, WITHOUT |
| 13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 16 | # Description: |
| 17 | # Packaging for the Vela compiler |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 18 | from os import path |
Diego Russo | e8a1045 | 2020-04-21 17:39:10 +0100 | [diff] [blame] | 19 | |
| 20 | from setuptools import Extension |
| 21 | from setuptools import find_namespace_packages |
| 22 | from setuptools import setup |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 23 | |
| 24 | # Read the contents of README.md file |
| 25 | this_directory = path.abspath(path.dirname(__file__)) |
| 26 | with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: |
| 27 | long_description = f.read() |
| 28 | |
| 29 | mlw_module = Extension( |
| 30 | "ethosu.mlw_codec", |
| 31 | ["ethosu/mlw_codec/mlw_encode.c", "ethosu/mlw_codec/mlw_decode.c", "ethosu/mlw_codec/mlw_codecmodule.c"], |
| 32 | ) |
| 33 | |
| 34 | setup( |
| 35 | name="ethos-u-vela", |
| 36 | use_scm_version=True, |
| 37 | description="Optimise TensorFlow Lite models for Ethos-U55 NPU.", |
| 38 | long_description=long_description, |
| 39 | long_description_content_type="text/markdown", |
| 40 | url="https://git.mlplatform.org/ml/ethos-u/ethos-u-vela.git/", |
| 41 | author="Arm Ltd.", |
| 42 | license="Apache License 2.0", |
| 43 | classifiers=[ |
Tim Hall | e76a533 | 2020-06-23 09:52:07 +0100 | [diff] [blame] | 44 | "Development Status :: 5 - Production/Stable", |
Tim Hall | 79d07d2 | 2020-04-27 18:20:16 +0100 | [diff] [blame] | 45 | "Intended Audience :: Developers", |
| 46 | "License :: OSI Approved :: Apache Software License", |
| 47 | "Operating System :: POSIX :: Linux", |
| 48 | "Programming Language :: C", |
| 49 | "Programming Language :: Python :: 3", |
| 50 | "Programming Language :: Python :: 3.6", |
| 51 | "Programming Language :: Python :: 3.7", |
| 52 | "Programming Language :: Python :: 3.8", |
| 53 | "Topic :: Scientific/Engineering :: Artificial Intelligence", |
| 54 | "Topic :: Software Development :: Compilers", |
| 55 | ], |
| 56 | keywords=["ethos-u", "vela compiler", "tflite", "npu"], |
| 57 | packages=find_namespace_packages(include=["ethosu.*"]), |
| 58 | python_requires="~=3.6", # We support only 3.6+ |
| 59 | install_requires=["flatbuffers==1.11.0", "numpy>=1.16.6"], |
| 60 | entry_points={"console_scripts": ["vela = ethosu.vela.vela:main"]}, |
| 61 | ext_modules=[mlw_module], |
| 62 | setup_requires=["setuptools_scm"], |
| 63 | ) |