Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load Intel Extension for Tensorflow* GPU backend, GPU will not be used. #73

Open
ibrahimshahid1 opened this issue Jul 4, 2024 · 6 comments
Assignees
Labels

Comments

@ibrahimshahid1
Copy link

2024-07-03 22:05:41.445430: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-07-03 22:05:41.446433: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-07-03 22:05:41.924553: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-07-03 22:05:42.266600: W itex/core/wrapper/itex_gpu_wrapper.cc:32] Could not load dynamic library: libze_loader.so.1: cannot open shared object file: No such file or directory
running on xps 15 with intel arc a370m

@yinghu5 yinghu5 self-assigned this Jul 4, 2024
@yinghu5 yinghu5 added the aitce label Jul 4, 2024
@yinghu5
Copy link

yinghu5 commented Jul 4, 2024

Hi [ibrahimshahid1]
We happened to see a similar issue from Intel-extension for pyTorch :
intel/intel-extension-for-pytorch#666

could you please check your OS version and other dependency as https://intel.github.io/intel-extension-for-tensorflow/v2.14.0.1/docs/install/install_for_xpu.html
and check the Environment for XPU
(tf)$ bash /path to site-packages/intel_extension_for_tensorflow/tools/env_check.sh

and let us know your output. thanks

@ibrahimshahid1
Copy link
Author

i mean im on windows 11

@ibrahimshahid1
Copy link
Author

im honestly kinda new to all of this so idk what ur really asking lol

@yinghu5
Copy link

yinghu5 commented Jul 15, 2024

Hi Ibrahimshahid1,

thank you for letting us know. you are working on Window 11 + Arc 370m, and you hope to make the Intel extension for Tensorflow work on the Arc 370m, right?

The missing library is from intel level zero GPU runtime library , could you please check if you have the library in your WSL system, if there is, it is under /usr/lib/x86_64-linux-gnu
(itex) yhu5@rajeshch-desk89:~$ find / -name libze_loader.so*
/usr/lib/x86_64-linux-gnu/libze_loader.so.1.11.0
/usr/lib/x86_64-linux-gnu/libze_loader.so.1

and if it is not there, then you may need to install the related GPU driver runtime library :

Here are one install steps for your reference :

Hardware setup:

Host: Windows 11
better 16G or more GB RAM ddr4
your CPU: xxx
Intel Arc A370m 4GB
first install Arc driver : https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html
and make sure in the Windows performance monitor, you can see the GPU,

for example, ( my machine has one Xe GPU with 8GB)
image

Then open one CMD prompt, install Ubuntu

wsl2:
Ubuntu 22.04 on WSL2
ubuntu22.04 official distro
(this runs on Microsoft special kernel

once you have WSL2 installed, open the Ubuntu command windows from the window start-up menu
running uname -r
5.15.153.1-microsoft-standard-WSL2

from fresh installation:
following steps here: https://github.com/intel/intel-extension-for-tensorflow/blob/main/docs/install/experimental/install_for_arc_gpu.md

wget -qO - https://repositories.intel.com/gpu/intel-graphics.key |
sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg
echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy client" |
sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list
sudo apt update
then

sudo apt-get install
intel-igc-cm
intel-level-zero-gpu
intel-opencl-icd
level-zero
libigc1
libigdfcl1
libigdgmm12

To install the whole oneapi

wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fdc7a2bc-b7a8-47eb-8876-de6201297144/l_BaseKit_p_2024.1.0.596.sh
sudo sh ./l_BaseKit_p_2024.1.0.596.sh
then

source /opt/intel/oneapi/setvars.sh

setting up my conda environment: https://intel.github.io/intel-extension-for-tensorflow/latest/docs/install/experimental/install_for_gpu_conda.html

curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o Miniconda3-latest-Linux-x86_64.sh (or miniforge 's conda environment)
bash Miniconda3-latest-Linux-x86_64.sh
conda update conda
conda create -n itex -c intel intelpython3_full python=3.9
#I removed the version orig: conda create -n itex -c intel intelpython3_full==2023.2.0 python=3.9
activated my conda
conda activate itex
proceeded as documented

pip install --upgrade pip
pip install tensorflow==2.15.0
pip install intel-extension-for-tensorflow[xpu]
source /opt/intel/oneapi/setvars.sh
sycl-ls

Please let me know if any steps you run into a problem

@RafinRono
Copy link

RafinRono commented Sep 5, 2024

So, the extension is only available for Ubuntu and not Windows?

@yinghu5
Copy link

yinghu5 commented Sep 6, 2024

Hi RafinRono,

Right, currently the extension is only support Linux or WSL, no native windows. Here is the system requirements: https://intel.github.io/intel-extension-for-tensorflow/latest/get_started.html#install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants