intelnumbaintel-oneapiintel-python

Unable to Import Numba Package Getting Error


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'

https://github.com/IntelPython/numba-dpex/blob/main/numba_dpex/examples/sum.py- The issue exists with this sample too.

When I run in intel python3.8 and the time up to 2.5 min and I get the below Error.
Showing Error :

 No device of requested type available. Please check https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements... -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 resolve this error?

I used conda to create intel python3.8-full and test the code of numpy and numba, Ubuntu 16.04, XEON Gold 5220R, without GPU.


Solution

  • 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 

    enter image description here