From ad73b396a0210ce0b5a578d66fb788b47f925eef Mon Sep 17 00:00:00 2001 From: "Wang, Kai Lawrence" <109344418+wangkl2@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:01:58 +0800 Subject: [PATCH] Add dependency and modify instructions for env check tool (#2746) Signed-off-by: Wang, Kai Lawrence --- README.md | 22 +++++++++++++++++-- .../experimental/install_for_arc_gpu.md | 11 +++++++++- .../experimental/install_for_gpu_conda.md | 14 ++++++++++-- docs/install/install_for_xpu.md | 11 +++++++++- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 48ab142d..7cdda792 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,18 @@ pip install --upgrade intel-extension-for-tensorflow[xpu] Environment check instructions for XPU: +* Option1: ```bash +pip install wget export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"` -bash ${path_to_site_packages}/intel_extension_for_tensorflow/tools/env_check.sh +python ${path_to_site_packages}/intel_extension_for_tensorflow/tools/python/env_check.py +``` + +* Option2: +```bash +pip install wget +wget https://raw.githubusercontent.com/intel/intel-extension-for-tensorflow/main/tools/python/env_check.py +python env_check.py ``` Refer to [XPU installation](docs/install/install_for_xpu.md) for details. @@ -104,9 +113,18 @@ pip install --upgrade intel-extension-for-tensorflow-weekly[xpu] -f https://deve Environment check instructions for GPU weekly: +* Option1: ```bash +pip install wget export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"` -bash ${path_to_site_packages}/intel_extension_for_tensorflow/tools/env_check.sh +python ${path_to_site_packages}/intel_extension_for_tensorflow/tools/python/env_check.py +``` + +* Option2: +```bash +pip install wget +wget https://raw.githubusercontent.com/intel/intel-extension-for-tensorflow/main/tools/python/env_check.py +python env_check.py ``` #### Install for CPU weekly diff --git a/docs/install/experimental/install_for_arc_gpu.md b/docs/install/experimental/install_for_arc_gpu.md index 801de426..5c3f2932 100644 --- a/docs/install/experimental/install_for_arc_gpu.md +++ b/docs/install/experimental/install_for_arc_gpu.md @@ -192,9 +192,18 @@ To install an XPU version in virtual environment, which depends on Intel GPU dri ``` Check the environment for XPU: +* Option1: ```bash +(tf)$ pip install wget (tf)$ export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"` -(tf)$ bash ${path_to_site_packages}/intel_extension_for_tensorflow/tools/env_check.sh +(tf)$ python ${path_to_site_packages}/intel_extension_for_tensorflow/tools/python/env_check.py +``` + +* Option2: +```bash +(tf)$ pip install wget +(tf)$ wget https://raw.githubusercontent.com/intel/intel-extension-for-tensorflow/main/tools/python/env_check.py +(tf)$ python env_check.py ``` ### 4. Verify the Installation diff --git a/docs/install/experimental/install_for_gpu_conda.md b/docs/install/experimental/install_for_gpu_conda.md index 055900e5..99d82fe7 100644 --- a/docs/install/experimental/install_for_gpu_conda.md +++ b/docs/install/experimental/install_for_gpu_conda.md @@ -49,10 +49,20 @@ source /path/to/intel/oneapi/mkl/latest/env/vars.sh ``` Check the environment for GPU: +* Option1: ```bash -export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"` -bash ${path_to_site_packages}/intel_extension_for_tensorflow/tools/env_check.sh +(tf)$ pip install wget +(tf)$ export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"` +(tf)$ python ${path_to_site_packages}/intel_extension_for_tensorflow/tools/python/env_check.py ``` + +* Option2: +```bash +(tf)$ pip install wget +(tf)$ wget https://raw.githubusercontent.com/intel/intel-extension-for-tensorflow/main/tools/python/env_check.py +(tf)$ python env_check.py +``` + Verify install: ``` python3 -c "import intel_extension_for_tensorflow as itex; print(itex.version.GIT_VERSION)" diff --git a/docs/install/install_for_xpu.md b/docs/install/install_for_xpu.md index 3f2169df..aeba3fd6 100644 --- a/docs/install/install_for_xpu.md +++ b/docs/install/install_for_xpu.md @@ -136,9 +136,18 @@ You can follow below the instruction to check environment for XPU. (tf)$ python -c "import intel_extension_for_tensorflow as itex; print(itex.tools.python.env_check.check())" ``` If you have issue to load itex, You can follow below the instruction to check environment for XPU. +* Option1: ```bash +(tf)$ pip install wget (tf)$ export path_to_site_packages=`python -c "import site; print(site.getsitepackages()[0])"` -(tf)$ python ${path_to_site_packages}/intel_extension_for_tensorflow/tools/python/env_check.py +(tf)$ python ${path_to_site_packages}/intel_extension_for_tensorflow/tools/python/env_check.py +``` + +* Option2: +```bash +(tf)$ pip install wget +(tf)$ wget https://raw.githubusercontent.com/intel/intel-extension-for-tensorflow/main/tools/python/env_check.py +(tf)$ python env_check.py ``` ##### Verify the Installation