Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.
431 Discussions

The Numba erUbunturor of Intel dis of Python

wanben
Novice
4,332 Views

Ubuntu 16.04, XEON Gold 5220R, without GPU.

 

I used the conda to create intel python3.8-full and test the code of numpy and numba,

I had run the test code in the comon  conda python3.8 with these:

os.environ['NUMBA_CPU_FEATURES'] = '+adx,+aes,+avx,+avx2,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512vl,+avx512vnni,+bmi,+bmi2,+clflushopt,+clwb,+cmov,+cx16,+cx8,+f16c,+fma,+fsgsbase,+fxsr,+invpcid,+lzcnt,+mmx,+movbe,+pclmul,+pku,+popcnt,+prfchw,+rdrnd,+rdseed,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+xsave,+xsavec,+xsaveopt,+xsaves'

 

in 47s but run in intel python3.8 and the time up to 2.5 min and show these Error:

 

No device of requested type available. Please check https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html -1 (CL_DEVICE_NOT_FOUND)
/opt/conda/envs/idp/lib/python3.8/site-packages/numba_dppy/config.py:57: UserWarning: Please install dpctl 0.8.* or higher.
warnings.warn(msg, UserWarning)
/opt/conda/envs/idp/lib/python3.8/site-packages/numba/core/dispatcher.py:303: UserWarning: Numba extension module 'numba_dppy.numpy_usm_shared' failed to load due to 'ImportError(Importing numba_dppy failed)'.

 

How can I fix there wrong?

Thanks.

0 Kudos
1 Solution
JaideepK_Intel
Employee
4,220 Views

Hi,

 

Since you are unable to import numba_dppy package, can you please try the below command?

 

conda install numba-dppy

 

If the issue still persists, we can try with a basetoolkit image. Please follow the below steps:

 

Downloading image from docker hub:

 

docker pull intel/oneapi-basekit

 

Run the container from the image:

 

docker run -idt intel/oneapi-basekit

 

Look for the container ID:

 

docker ps
docker exec -it <container ID> bash

 

Update list of packages:

 

apt-get update

 

Update conda:

 

conda update conda

 

Creating conda env:

 

conda create -n idp3.8 intelpython3_full python=3.8

 

activate environment:

 

source activate idp3.8

 

install dpctl package:

 

python -m pip install --index-url https://pypi.org/simple dpctl --ignore-installed

 

install numba_dppy package:

 

conda install numba-dppy

 

I ran this sample (https://github.com/IntelPython/numba-dppy/blob/main/numba_dppy/examples/sum.py) inside the docker container 

idp3.JPG

That's it. Everything is set and you are good to go:)

 

Thanks,

Jaideep

 

 

 

View solution in original post

0 Kudos
6 Replies
JaideepK_Intel
Employee
4,284 Views

Hi,

 

Thank you for posting on the Intel Communities.

 

We were able to run this sample (https://github.com/IntelPython/numba-dppy/blob/main/numba_dppy/examples/sum.py) with your environment variables and it worked fine.

numba.JPG

Note: To run numba-dppy we need to activate DPC++ compiler as mentioned in this documentation. (https://intelpython.github.io/numba-dppy/latest/user_guides/getting_started.html)

Our environmental details:

Ubuntu 18.04 with a 3.60GHz Intel(R) Core(TM) i9-9900K processor.

Intel python 3.8 

Can you please share the details mentioned below?

1. Could you please install Base Toolkit. (https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html )

2. Could you please try to run the above sample and let us know if it works for you ?. If not could you please share your sample reproducer and steps you followed. 

 

Thanks,

Jaideep

 

0 Kudos
wanben
Novice
4,235 Views

If you need more information, I will continue to provide it.

0 Kudos
wanben
Novice
4,268 Views

In fact, when I run this code:

export ONEAPI_ROOT=/opt/intel/oneapi
conda create -n numba-dppy-env -c ${ONEAPI_ROOT}/conda_channel python=3.7 dpctl dpnp numba spirv-tools llvm-spirv llvmdev cython pytest

will show these message:

 

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: |
Found conflicts! Looking for incompatible packages.
Examining conflict for cython llvm-spirv dpnp __glibc dpctl numba spirv-tools python llvmdev: 77%|█████████████████████████████████▊ | 10/13 [01:06<00:21, 7.17s/ifailed 

 

The waiting process is quite long, and is even better for idp-full environments, and because of this error I can't do anything further,.

Other than that probably how to do the same job on an idp-full environment is more important to me.

 

The error is fully reproduced when I enter the following code(idp-full):

conda update conda
conda config --add channels intel
conda create -n idp intelpython3_full python=3.8
source activate idp
export ONEAPI_ROOT=/opt/intel/oneapi
python3.8
import numba_dppy

'''
System Info:
cat /proc/cpuinfo | grep 'model name' |uniq
model name : Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz
cat /proc/meminfo | grep MemTotal
MemTotal: 98474884 kB
'''

 

[GCC 9.3.0] :: Intel Corporation on linux
Type "help", "copyright", "credits" or "license" for more information.
Intel(R) Distribution for Python is brought to you by Intel Corporation.
Please check out: https://software.intel.com/en-us/python-distribution
>>>
No device of requested type available. Please check https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html -1 (CL_DEVICE_NOT_FOUND)
/opt/conda/envs/idp/lib/python3.8/site-packages/numba_dppy/config.py:57: UserWarning: Please install dpctl 0.8.* or higher.
warnings.warn(msg, UserWarning)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/envs/idp/lib/python3.8/site-packages/numba_dppy/__init__.py", line 528, in <module>
raise ImportError("Importing numba_dppy failed")
ImportError: Importing numba_dppy failed

0 Kudos
wanben
Novice
4,268 Views

I'm sure I have the OneAPI base kit installed, I'm not sure if I'll have problems building the above environment under docker's root environment, maybe conflicts between package and package are causing these problems?

 

cd /opt/intel/oneapi
ls

advisor compiler dev-utilities dpl ipp mkl setvars.sh vpl
ccl conda_channel diagnostics etc ippcp modulefiles-setup.sh support.txt vtune
com.intel.launchers.update-advisor-1.0.0-SNAPSHOT.zip dal dnnl installer licensing mpi sys_check.sh
common.sh debugger dpcpp-ct intelpython logs readme-get-started-linux-base-kit.html tbb

0 Kudos
JaideepK_Intel
Employee
4,221 Views

Hi,

 

Since you are unable to import numba_dppy package, can you please try the below command?

 

conda install numba-dppy

 

If the issue still persists, we can try with a basetoolkit image. Please follow the below steps:

 

Downloading image from docker hub:

 

docker pull intel/oneapi-basekit

 

Run the container from the image:

 

docker run -idt intel/oneapi-basekit

 

Look for the container ID:

 

docker ps
docker exec -it <container ID> bash

 

Update list of packages:

 

apt-get update

 

Update conda:

 

conda update conda

 

Creating conda env:

 

conda create -n idp3.8 intelpython3_full python=3.8

 

activate environment:

 

source activate idp3.8

 

install dpctl package:

 

python -m pip install --index-url https://pypi.org/simple dpctl --ignore-installed

 

install numba_dppy package:

 

conda install numba-dppy

 

I ran this sample (https://github.com/IntelPython/numba-dppy/blob/main/numba_dppy/examples/sum.py) inside the docker container 

idp3.JPG

That's it. Everything is set and you are good to go:)

 

Thanks,

Jaideep

 

 

 

0 Kudos
JaideepK_Intel
Employee
4,206 Views

Hi,


Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks,

Jaideep


0 Kudos
Reply