Does @jit run a python code on the gpu if we do not explicitly mention a target?

122 views
Skip to first unread message

Shatadeep Banerjee

unread,
Jan 28, 2017, 1:28:53 AM1/28/17
to NumFOCUS

I have a python code I am trying to accelerate using Cuda. I have used the @jit function. How do I know if the code is actually being run on the gpu? Is there any way to check/verify that?

Max Linke

unread,
Jan 28, 2017, 12:50:54 PM1/28/17
to numf...@googlegroups.com
Hi

It is impossible from your mail to say if your code runs on a CPU. I
assume you will import the `jit` decorator from a library like theano or
numba. You should ask on their mailing lists directly if they can help you.

best Max
> --
> You received this message because you are subscribed to the Google
> Groups "NumFOCUS" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to numfocus+u...@googlegroups.com
> <mailto:numfocus+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Jérôme Kieffer

unread,
Jan 28, 2017, 2:58:02 PM1/28/17
to numf...@googlegroups.com
run nvidia-smi and search for a (new) Python process allocating memory on the GPU.

HTH

Jerome

Shatadeep Banerjee

unread,
Jan 31, 2017, 1:38:00 AM1/31/17
to NumFOCUS
Hi Jerome
Thanks fro replying. I did run nvidia-smi, but I got the following error:
'nvidia-smi' is not recognized as an internal or external command, operable program or batch file.
Do you know a workaround? Thanks a lot!

Jérôme Kieffer

unread,
Jan 31, 2017, 1:50:46 AM1/31/17
to numf...@googlegroups.com
On Mon, 30 Jan 2017 22:38:00 -0800 (PST)
Shatadeep Banerjee <shatadeep...@gmail.com> wrote:

> Hi Jerome
> Thanks fro replying. I did run nvidia-smi, but I got the following error:
> 'nvidia-smi' is not recognized as an internal or external command, operable
> program or batch file.
> Do you know a workaround? Thanks a lot!

Install nvidia-smi it is part of the cuda toolkit or the nvidia driver.
On debian it has its own package. This tool is the equivalent of "top"
for the nvidia GPU.

I guess AMD has an equivalent tool, but I have never heard of an
equivalent for Intel's IGP.

HTH

Jerome
Reply all
Reply to author
Forward
0 new messages