MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / _empty_cache

Method _empty_cache

fastdeploy/spec_decode/mtp.py:1196–1202  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1194 return
1195
1196 def _empty_cache(self):
1197 if current_platform.is_cuda():
1198 paddle.device.cuda.empty_cache()
1199 elif current_platform.is_xpu():
1200 paddle.device.xpu.empty_cache()
1201 else:
1202 paddle.device.empty_cache()
1203
1204 def _get_cache_type(self):
1205 cache_type = None

Calls 2

is_cudaMethod · 0.45
is_xpuMethod · 0.45