Skip to content

issue with SELECT pgml.clear_gpu_cache(); #1646

Open
@leesean5150

Description

@leesean5150

hi,

running:

psql -d postgresml
SELECT pgml.clear_gpu_cache();

doesnt seem to reduce my gpu usage. currently running a local docker container that is built from https://github.com/postgresml/postgresml/tree/9303cb4b68fe20b3667adeee96e25f5046b71a64/docker.

in an attempt to debug i installed pip, torch and numpy in the container, because i couldnt import torch in the python3 shell.
when running

print(f"Allocated memory: {torch.cuda.memory_allocated() / 1024**2:.2f} MB")
print(f"Allocated memory: {torch.cuda.reserved() / 1024**2:.2f} MB")

i got 0 for both print statements, but if i run

torch.randn(1024, 1024, device='cuda')

before the print statements i have a non-zero output.

for context, i am using korvus pipelines and collections for my models, and i am trying to reduce the amount of gpu resources being hogged, because the only way i have been able to reduce gpu consumption each time has been by restarting the postgresml container, which is not ideal for an application. is this the wrong way of using the command or are there any workarounds for this? thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions