From 199c2255e6fde4f4c476f7b697d59b9b5439d473 Mon Sep 17 00:00:00 2001 From: Yanqingshang Date: Thu, 22 Oct 2020 20:35:54 +0800 Subject: [PATCH] add configure at build --- README.en.md | 2 +- README.md | 8 +++----- configure.py | 9 ++------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/README.en.md b/README.en.md index 5dda4c04f..856870bd4 100755 --- a/README.en.md +++ b/README.en.md @@ -15,7 +15,7 @@ You can build the TF_Adapter software package from the source code and install i > 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 >版本](https://www.tensorflow.org/install) 。 -At the same time, the system meets the following requirements +You may also build GraphEngine from source. To build GraphEngine, please make sure that you have access to an Ascend 910 environment as compiling environment, and make sure that following software requirements are fulfilled. - Linux OS - GCC >= 7.3.0 - CMake >= 3.14.0 diff --git a/README.md b/README.md index f94c366ef..e7e014005 100755 --- a/README.md +++ b/README.md @@ -15,15 +15,13 @@ Tensorflow Adapter For Ascend(简称TF_Adapter)致力于将昇腾AI处理器 > TF_Adapter 插件与 Tensorflow 有严格的匹配关系,从源码构建前,您需要确保已经正确安装了 [Tensorflow v1.15.0 >版本](https://www.tensorflow.org/install) 。 -同时系统满足以下要求: + +tfadapter也支持由源码编译,进行源码编译前,首先确保你有昇腾910 AI处理器的环境,同时系统满足以下要求: - Linux OS - GCC >= 7.3.0 - CMake >= 3.14.0 -- [SWIG](http://www.swig.org/download.html) -- 配置昇腾处理器开发套件安装路径的环境变量D_LINK_PATH - export D_LINK_PATH=安装路径(例如:/usr/local/Ascend) +- [SWIG](http://www.swig.org/download.html) - #### 下载源码 ``` diff --git a/configure.py b/configure.py index 7a50aa969..73d6d98e4 100755 --- a/configure.py +++ b/configure.py @@ -28,7 +28,7 @@ except ImportError: _COMPAT_TENSORFLOW_VERSION = "1.15.0" _COMPAT_PYTHON_VERSION = "Python 3.7" _COMPAT_SWIG_VERSION = "SWIG Version " -_ASCEND_INSTALL_PATH_ENV = "D_LINK_PATH" +_ASCEND_INSTALL_PATH_ENV = "ASCEND_CUSTOM_PATH" @@ -120,17 +120,12 @@ def setup_python(): def setup_ascend(env_path): """Get ascend install path.""" default_ascend_path = "/usr/local/Ascend" - ask_ascend_path = ('Please specify the location of ascend. [Default is ' - '%s]\n(You can make this quiet by set env [D_LINK_PATH]): ') % default_ascend_path custom_ascend_path = env_path while True: if not custom_ascend_path: - ascend_path = get_input(ask_ascend_path) + ascend_path = default_ascend_path else: ascend_path = custom_ascend_path - custom_ascend_path = None - if not ascend_path: - ascend_path = default_ascend_path # Check if the path is valid if os.path.isdir(ascend_path) and os.access(ascend_path, os.X_OK): break -- Gitee