Giter Club home page Giter Club logo

Comments (3)

w5688414 avatar w5688414 commented on June 9, 2024

可以显式的使用下面的API:

https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/empty_cache_cn.html#paddle.device.cuda.empty_cache

hint:

大多数情况下您不需要使用该函数,当您删除 GPU 上的 Tensor 时,Paddle 框架并不会将显存释放,而是将显存保留起来,以便在下一次申明显存时可以更快的完成分配。

from paddlenlp.

bitChill avatar bitChill commented on June 9, 2024

可以显式的使用下面的API:

https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/device/cuda/empty_cache_cn.html#paddle.device.cuda.empty_cache

hint:

大多数情况下您不需要使用该函数,当您删除 GPU 上的 Tensor 时,Paddle 框架并不会将显存释放,而是将显存保留起来,以便在下一次申明显存时可以更快的完成分配。

感谢解答,加上这个语句后,确实显存的占用速度变慢了,但还是上升后还是释放不了。比方就是:之前问100个问题占用的是5000MB,加上了之后占用是3800M,但是这个3800不会释放显存还是回不到100个问题之前的大小

from paddlenlp.

w5688414 avatar w5688414 commented on June 9, 2024

推荐使用fastdeploy做服务化部署。

https://github.com/PaddlePaddle/FastDeploy/tree/develop/examples/text/uie

我搜了一下历史,可以参考:

PaddlePaddle/Paddle#52011
PaddlePaddle/Paddle#54852

from paddlenlp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.