# Checking that work is being sent to processors: GPU vs Multiple CPUs

**URL:** <https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179>\
**Category:** New to Julia\
**Created:** [September 13, 2022, 2:24am UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179 "2022-09-13T02:24:29Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 14, 2022, 1:56am UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/21 "2022-09-14T01:56:01Z")

</div>

That’s really odd. The REPL isn’t showing you anything? If you run other GPU codes, is it fine?

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [September 14, 2022, 10:04am UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/22 "2022-09-14T10:04:03Z")

</div>

Using `watch -n 1 nvidia-smi` might be useful to keep it going.

When CUDA loads it downloads and installs the toolkit. You might want to do this manually first to be sure it works:

```julia
using CUDA
CUDA.versioninfo()

```

This should download everything you need.

---

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [September 14, 2022, 1:03pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/23 "2022-09-14T13:03:51Z")

</div>

This helped a little: I see that the GPU’s fans are turning on as a result some usage. But I see nothing in the processes section. Should I expect to see something here?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/4/e4fdd0ec382106f3341ebd53f2f269384e0372f2.png)

---

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [September 14, 2022, 1:06pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/24 "2022-09-14T13:06:52Z")

</div>

Is there some example julia code floating around where I would expect to see something populating in the processes section in the nvidia-smi tool? Sorry, I’m new to all this. I’m just relying on script kiddie luck and matlab experience to get me through right now.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 14, 2022, 1:14pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/25 "2022-09-14T13:14:14Z")

</div>

Did you run the first CUDA tutorial?

[https://cuda.juliagpu.org/dev/tutorials/introduction/#Your-first-GPU-computation](https://cuda.juliagpu.org/dev/tutorials/introduction/#Your-first-GPU-computation)

You should be able to see utilization from just a simple matmul.

```julia
using CUDA
A = cu(rand(1000,1000))
B = cu(rand(1000,1000))
A*B

```

---

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [September 14, 2022, 1:21pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/26 "2022-09-14T13:21:14Z")

</div>

The only indication that anything is occurring is that the GPU fan turns on, the temp goes up, and the power usage increases. I don’t see anything in the processes section though. I’m running watch -n .2 nvidia-smi.

Ya – I went through this tutorial and watch some of the youtube videos online.

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [September 14, 2022, 1:26pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/27 "2022-09-14T13:26:02Z")

</div>

Does the performance of the matmul increase? Like by orders of magnitude.

---

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [September 14, 2022, 1:34pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/29 "2022-09-14T13:34:00Z")

</div>

yes

maybe this is something about how the integrator is programmed. are processes running so fast that they’re not being picked up in nividia-smi?

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [September 14, 2022, 2:33pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/30 "2022-09-14T14:33:25Z")

</div>

Well, could be, `nvidia-smi` probably also has a certain sampling rate. In any case, the performance increase tells you that it’s running on the GPU. Otherwise, if you only want to run “something” on the GPU and see it pop up in `nvidia-smi` you could try to run a [GPU stresstest with GPUInspector.jl](https://pc2.github.io/GPUInspector.jl/dev/examples/gpustresstest/)

---

<div class="post-metadata">

**Author:** ![jmair](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jmair/32/35117_2.png) [@jmair](https://discourse.julialang.org/u/jmair)\
**Post date:** [September 14, 2022, 3:06pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/31 "2022-09-14T15:06:54Z")

</div>

If you are running the examples in the REPL and look at `nvidia-smi` in a different process concurrently then a process of julia should show up, even if it is not processing at the time, since it still has memory allocated.

---

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [September 14, 2022, 5:00pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/32 "2022-09-14T17:00:29Z")

</div>

This is strange. Using the stresstest, I still see nothing in nvidia-smi’s processes.

However, when I look at the reporting tools that come with GPUInspector, I can see the GPU is being utilized. Its reporting some of the metrics that I mentioned before (power, temperature, fan use). It also shows GPU% utilization which appears non-zero (not the case in nvidia-smi – see the screenshot above).

I’m not sure why nvdia-smi isn’t reporting these processes. Do you see them when you run stresstest?

Update: I ran the monitor commands from GPUInspector and wrapped them around the ODEcomputations that I was originally trying to run and still saw 0% GPU utilization, until the very end of the computation.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/e/5eab28cc36a6a9f0db52444d5b9eaed087167c87.png)

---

<div class="post-metadata">

**Author:** ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)\
**Post date:** [September 14, 2022, 5:01pm UTC](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179/33 "2022-09-14T17:01:30Z")

</div>

Ya that’s strange, I see nothing. What do you see in nvidia-smi when you run julia?

[Previous page](https://discourse.julialang.org/t/checking-that-work-is-being-sent-to-processors-gpu-vs-multiple-cpus/87179.md?page=1)
