Skip to content

Add GPU memory release method #25

Open

Description

@gourdchen

surfplot is such a excellect toolbox for visualization surface in Python.
However, I found that if I called it looping to draw, it could cause a GPU memory overflow (I only have 4G GPU mem) and IPython to crash. I found that I could manually clear the existing plotter to avoid this problem, while the surfplot only return plotter.show() not plotter.
So, I use

from brainspace.plotting.base import Plotter
Plotter.close_all()

to avoid GPU memory overflow.
I believe it can be better if there are some method that can automatically close plotter afer we build the matplotlib object.
I hope this can be helpful.

Activity

  1. danjgale commented on Jun 6, 2023

    @danjgale
    Owner

    Excellent idea and great catch! I completely agree. This will be easy to implement, and I'll let you know when I've added this in shortly. Thanks for the issue and using surfplot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions