pykeio/diffusers

not running on GPU

geocine opened this issue · 2 comments

When I am running script from https://github.com/pykeio/diffusers/blob/main/examples/stable-diffusion.rs . Its using up my CPU and system Memory. I don't see the GPU being utilized

image

I have the following setup:

May Cargo.toml looks like this

[dependencies]
pyke-diffusers = "0.1"

Output of nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 527.56       Driver Version: 527.56       CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ... WDDM  | 00000000:0A:00.0  On |                  N/A |
|  0%   50C    P5    38W / 220W |    988MiB /  8192MiB |     11%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

Output of nvcc -v

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:28:54_Pacific_Standard_Time_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0

From C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include\cudnn_version.h version is 8.6.0

#define CUDNN_MAJOR 8
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 0

image

I have successfully run CUDA workloads on this machine outside of this library

Make sure you've enabled the ort-cuda Cargo feature. You may have to cargo clean and rebuild. Sorry, I should've been more clear in the docs.

Thanks, you did mention in the docs to use ort-cuda . I forgot to uncomment when I was trying to make fp16 work on the other issue I opened. All good now