diff --git a/README.en.md b/README.en.md deleted file mode 100755 index 8c3fa6708925659111a9b5cb405bd56cccf1c0b3..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,15 +0,0 @@ -# TF_Adapter - -[View Chinese](README.md) - -TF_Adapter is committed to providing the outstanding computing power of Ascend AI Processors to developers who use the TensorFlow framework. -Developers only need to install the TF_Adapter plug-in and add a small amount of configuration to the existing TensorFlow script to accelerate their training jobs on the Ascend AI Processors. - -## Details on TensorFlow version adaptation -tensorflow 1.15.x reference [tf_adapter 1.x](./tf_adapter/README.md) - -tensorflow 2.6.x reference [tf_adapter 2.x](./tf_adapter_2.x/README.md) - -## License - -[Apache License 2.0](LICENSE) diff --git a/tf_adapter/README.en.md b/tf_adapter/README.en.md deleted file mode 100755 index ccda21920656bece8d46cf836c9372d3c7f1db13..0000000000000000000000000000000000000000 --- a/tf_adapter/README.en.md +++ /dev/null @@ -1,59 +0,0 @@ -# Ascend Adapter for TF1.X - -[查看中文](README.md) - -TF_Adapter1.x is committed to providing the outstanding computing power of Ascend AI Processors to developers who use the TensorFlow framework. -Developers only need to install the TF_Adapter plug-in and add a small amount of configuration to the existing TensorFlow script to accelerate their training jobs on the Ascend AI Processors. - -![tfadapter](https://images.gitee.com/uploads/images/2020/1027/094640_8f305b88_8175427.jpeg "framework.jpg") - -You can obtain more details on usage by reading the TensorFlow 1.15 model migration section in the third-party framework adaptation of TensorFlow within the [Ascend Community Documentation Center](https://www.hiascend.com/zh/document). -## Installation Guide -### Building from source - -You can build the TF_Adapter software package from the source code and install it on the Ascend AI Processor environment. -> The TF_Adapter plug-in has a strict matching relationship with TensorFlow. Before building from source code, you need to ensure that it has been installed correctly [TensorFlow v1.15.0 ->Version](https://www.tensorflow.org/install/pip). - -You may also build GraphEngine from the source. To build GraphEngine, please make sure that you have access to an Ascend 910 environment as compiling environment, and make sure that the following software requirements are fulfilled. -- Linux OS -- GCC >= 7.3.0 -- CMake >= 3.14.0 -- [SWIG](http://www.swig.org/download.html) - -#### Download -``` -git clone https://gitee.com/ascend/tensorflow.git -cd tensorflow -``` - -#### Execute the script to generate the installation package -``` -chmod +x build.sh -./build.sh -``` - - -After the script is successfully executed, a compressed file of tfadapter.tar will be generated in the output directory. - -#### Install -Unzip the tfadapter.tar file to generate npu_bridge-1.15.0-py3-none-any.whl. -Then you can install the TF_Adapter plug-in using pip. -``` -pip install ./dist/python/dist/npu_bridge-1.15.0-py3-none-any.whl -``` - -It should be noted that you should ensure that the installation path is the same as the Python you specified when compiling -The interpreter search path is consistent. - -## Contributing - -Welcome to contribute. - -## Release Notes - -For Release Notes, see our [RELEASE](RELEASE.md). - -## License - -[Apache License 2.0](LICENSE) diff --git a/tf_adapter/README.md b/tf_adapter/README.md index 8fc57ce941ea553a96e52e0bcc91425edce6e000..843999e9c2ab84af848c6659cb0d5fec9a7f1f99 100755 --- a/tf_adapter/README.md +++ b/tf_adapter/README.md @@ -8,7 +8,7 @@ Ascend Adapter for TF1.X 致力于将昇腾AI处理器卓越的运算能力, 您可以通过阅读[昇腾社区文档中心-TensorFlow 1.15模型迁移](https://hiascend.com/document/redirect/canntfmigr)手册获取更多使用细节。 -## 源码安装 +## 编译与安装 您可以通过此仓中的源代码构建TF Adapter软件包并将其部署在昇腾AI处理器所在环境上。 ### 环境准备 @@ -17,7 +17,7 @@ Ascend Adapter 软件包需要在Linux OS环境上进行编译,同时环境上 - **Python3.7** - Ascend Adapter 需要使用python3.7版本进行编译 + Ascend Adapter 需要使用python3.7版本进行编译。 - **TensorTlow 1.15.0** @@ -31,6 +31,14 @@ Ascend Adapter 软件包需要在Linux OS环境上进行编译,同时环境上 Ascend Adapter 需要使用3.14.0及更高版本的cmake编译 +- **SWIG** + + Ascend Adapter 源码编译依赖SWIG, SWIG安装命令示例如下: + ```shell + # Ubuntu/Debian操作系统安装命令示例如下,其他操作系统请自行安装 + apt-get install swig + ``` + - **CANN开发者套件** 请根据"[CANN版本配套说明](../README.md#cannversionmap)"获取对应的CANN软件版本号,并在“[CANN软件下载页面](https://www.hiascend.com/developer/download/community/result?module=cann)”下载对应版本的CANN开发套件包`Ascend-cann-toolkit__linux-.run`,CANN开发套件包支持的安装方式及操作系统请参见配套版本的[用户手册](https://hiascend.com/document/redirect/CannCommunityInstSoftware)。 @@ -42,23 +50,17 @@ Ascend Adapter 软件包需要在Linux OS环境上进行编译,同时环境上 - 使用默认路径安装 ```shell ./Ascend-cann-toolkit__linux-.run --install - ``` + ``` - 若使用root用户安装,安装完成后相关软件存储在`/usr/local/Ascend/ascend-toolkit/latest`路径下。 - + - 若使用非root用户安装,安装完成后相关软件存储在`$HOME/Ascend/ascend-toolkit/latest`路径下。 - 指定路径安装 ```bash ./Ascend-cann-toolkit__linux-.run --install --install-path=${ASCEND_INSTALLED_PATH} - ``` + ``` 安装完成后,相关软件存储在`${ASCEND_INSTALLED_PATH}`指定路径下。 - -- **swig** - Ascend Adapter 源码编译依赖SWIG,可执行如下命令进行SWIG的安装: - -`apt-get install swig` - - **CommunitySDK包** Ascend Adapter 软件的编译还需要依赖CommunitySDK包,此包可在“[CANN软件下载页面](https://www.hiascend.com/developer/download/community/result?module=cann)”下载。 @@ -99,13 +101,14 @@ chmod +x build.sh 编译结束后,TF Adapter安装包生成在如下路径: ``` -./build/tfadapter/dist/python/dist/npu_bridge-1.15.0-py3-none-any.whl +./build/tfadapter/dist/python/dist/npu_bridge-1.15.0-py3-none-manylinux2014_.whl ``` +\表示操作系统架构,取值为x86_64与aarch64。 ### 安装TF Adapter -执行如下命令安装TF Adapter。 +执行如下命令安装TF Adapter,请注意替换为实际的包名。 ``` -pip3 install ./build/tfadapter/dist/python/dist/npu_bridge-1.15.0-py3-none-any.whl --upgrade +pip3 install ./build/tfadapter/dist/python/dist/npu_bridge-1.15.0-py3-none-manylinux2014_.whl --upgrade ``` 执行完成后,TF Adapter相关文件安装到python解释器搜索路径下,例如“/usr/local/python3.7.5/lib/python3.7/siite-packages”路径,安装后文件夹为“npu_bridge”与“npu_bridge-1.15.0.dist-info”。 diff --git a/tf_adapter_2.x/README.md b/tf_adapter_2.x/README.md index a29c903d8760c9ee0437d64409ebca1a153bf62f..c6a7ad7dabd7d4351eade4220b9705dd5554fb12 100644 --- a/tf_adapter_2.x/README.md +++ b/tf_adapter_2.x/README.md @@ -13,6 +13,10 @@ TF2.X插件,并在现有Tensorflow 2.x脚本中添加少量配置,即可实 Ascend Adapter 软件包需要在Linux OS环境上进行编译,同时环境上需要安装一下软件依赖: +- **Python3.7~Python3.9** + + Ascend Adapter可以使用python3.7、Python3.8、Python3.9版本进行编译。 + - **TensorFlow 2.6.5** Ascend Adapter 与 Tensorflow 有严格的匹配关系,从源码构建前,您需要确保已经正确安装了[Tensorflow v2.6.5 版本](https://www.tensorflow.org/install) ,安装方式可参见[昇腾社区文档中心-TensorFlow 2.6.5模型迁移](https://hiascend.com/document/redirect/canntfmigr)中的“TensorFlow 2.6.5模型迁移 > 环境准备 > 安装开源框架TensorFlow 2.6.5”章节。 @@ -25,6 +29,14 @@ Ascend Adapter 软件包需要在Linux OS环境上进行编译,同时环境上 Ascend Adapter 需要使用3.14.0及更高版本的cmake编译。 +- **SWIG >= 4.1.0** + + Ascend Adapter 源码编译依赖SWIG, SWIG安装命令示例如下: + ```shell + # Ubuntu/Debian操作系统安装命令示例如下,其他操作系统请自行安装 + apt-get install swig + ``` + - **CANN开发者套件** 请根据"[CANN版本配套说明](../README.md#cannversionmap)"获取对应的CANN软件版本号,并在“[CANN软件下载页面](https://www.hiascend.com/developer/download/community/result?module=cann)”下载对应版本的CANN开发套件包`Ascend-cann-toolkit__linux-.run`,CANN开发套件包支持的安装方式及操作系统请参见配套版本的[用户手册](https://hiascend.com/document/redirect/CannCommunityInstSoftware)。 @@ -47,12 +59,6 @@ Ascend Adapter 软件包需要在Linux OS环境上进行编译,同时环境上 ``` 安装完成后,相关软件存储在`${ASCEND_INSTALLED_PATH}`指定路径下。 -- **swig** - - Ascend Adapter 软件源码编译依赖SWIG,可执行如下命令进行SWIG(http://www.swig.org/download.html)的安装: - -`pip3 install swig` - - **CommunitySDK包** Ascend Adapter 软件的编译还需要依赖CommunitySDK包,此包可在“[CANN软件下载页面](https://www.hiascend.com/developer/download/community/result?module=cann)”下载。 @@ -121,8 +127,9 @@ make -j8 编译结束后,安装包会生成在 ``` -./dist/python/dist/npu_device-0.1-py3-none-any.whl +./dist/python/dist/npu_device-2.6.5-py3-none-manylinux2014_.whl ``` +\表示操作系统架构,取值为x86_64与aarch64。 ### 安装TF Adapter @@ -132,10 +139,10 @@ make -j8 make install ``` -将Ascend Adapter安装到配置时指定的 python 解释器包目录下,或者使用 pip3 安装 Ascend Adapter 到您期望的位置。 +将Ascend Adapter安装到配置时指定的 python 解释器包目录下,或者使用 pip3 安装 Ascend Adapter 到您期望的位置。请注意替换为实际的包名。 ``` -pip3 install ./dist/python/dist/npu_device-0.1-py3-none-any.whl --upgrade +pip3 install ./dist/python/dist/npu_device-2.6.5-py3-none-manylinux2014_.whl --upgrade ``` ## 许可证