Python
Python

Reputation: 417

How to flush GPU memory using CUDA on WSL2

I have interrupted the training of the model in PyTorch on CUDA, which I've run on Windows Subsystem for Linux 2 (WSL2). The dedicated GPU memory of NVIDIA GeForce RTX 3080Ti was not flushed.

enter image description here

What I have tried:

UPDATE:

Running nvidia-smi in the command prompt on Windows (not on WSL2) yields the following enter image description here

Upvotes: 0

Views: 3475

Answers (1)

Lorewalker Cho
Lorewalker Cho

Reputation: 70

I don't know your actual environment.

suppose that you use anaconda window-venv

  1. On cmd >nvidia-smi shows following.

cmd->nvidia-smi

  1. Check pid of python process name(>envs\psychopy\python.exe).
  2. On cmd taskkill /f /PID xxxx

this could be help.

and you don't want doing like this.

if you feeling annoying you can run the script on prompt, it would be automatically flushing gpu memory.

Upvotes: 1

Related Questions