Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.
450 ディスカッション

Help developing my first code

PabloBL
ビギナー
3,833件の閲覧回数

Hello everyone,

First of all, thanks for reading this.

 

I am new to programming in Python with GPU, and as my laptop has an Intel GPU, I cannot use cupy  as a substitute of numpy. I am trying to use Intel's package dpnp. I followed the guidelines, and I installed Intel distribution for Python and Intel® oneAPI Base Toolkit, in that order, on my Windows 10 machine.

Then, I  added a new environment into my Visual Studio project with the path of the installation, and it seems to work, because when I type Python I get the following

 

PabloBL_0-1690891388180.png

Now, if I try to install the dpnp package in the environment, it looks like it is already installed, because I get

 

PabloBL_1-1690891705488.png

But, if I try to run any code where I need to use it, it cannot be found. For example, if I try to import it:

 

PabloBL_2-1690891929963.png

 

In the screen-shot, it looks like the problem is with the package dpctl, but it also says that it's already installed.

 

Can anybody explain to me what I am doing wrong?

 

As a follow-up question, do you know if there is an easier way to make use of my laptop's GPU for programming with Python in any numpy-like library?

 

Thanks in advance,

Pablo

 

 

 

 

0 件の賞賛
1 解決策
AlekhyaV_Intel
モデレーター
3,782件の閲覧回数

Hi,

 

Thank you for posting in Intel Communities.

 

We tried reproducing your issue. We got the same error as yours when didn't run the setvars.sh/setvars.bat to initialize oneAPI environment. Please find the below screenshot for your reference:

AlekhyaV_Intel_0-1691057218378.png

 

In a command prompt, Initialize oneAPI environment with the below command:

C:\\Program files(x86)\Intel\oneAPI\setvars.bat

After sourcing oneAPI:

AlekhyaV_Intel_1-1691057371144.png

If this resolves your issue, make sure to accept this as a solution. This helps others with similar issue. Thanks!

 

Regards,

Alekhya

 

 

元の投稿で解決策を見る

4 返答(返信)
AlekhyaV_Intel
モデレーター
3,783件の閲覧回数

Hi,

 

Thank you for posting in Intel Communities.

 

We tried reproducing your issue. We got the same error as yours when didn't run the setvars.sh/setvars.bat to initialize oneAPI environment. Please find the below screenshot for your reference:

AlekhyaV_Intel_0-1691057218378.png

 

In a command prompt, Initialize oneAPI environment with the below command:

C:\\Program files(x86)\Intel\oneAPI\setvars.bat

After sourcing oneAPI:

AlekhyaV_Intel_1-1691057371144.png

If this resolves your issue, make sure to accept this as a solution. This helps others with similar issue. Thanks!

 

Regards,

Alekhya

 

 

AlekhyaV_Intel
モデレーター
3,745件の閲覧回数

Hi,


Has the solution provided helped? Could you please give us an update regarding this issue?


Regards,

Alekhya


PabloBL
ビギナー
3,737件の閲覧回数

Hello,

 

After following some guideline where examples where presented (https://www.intel.com/content/www/us/en/docs/oneapi-base-toolkit/get-started-guide-windows/2023-2/overview.html ), I could do it. I think it was the proposed step that was missing, so I have accepted your reply.

 

Thank you very much,

Pablo

AlekhyaV_Intel
モデレーター
3,662件の閲覧回数

Hi,


Glad to know that your issue is resolved. Thanks for accepting our solution. If you need any further information, please post a new question as this case is no longer monitored by Intel.


Regards,

Alekhya


返信