你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 07:24:19 +08:00
Trying to fix GPU memory leak
这个提交包含在:
@@ -235,6 +235,8 @@ class CUDAUpdates:
|
||||
|
||||
# Import PyCUDA modules
|
||||
self.drv = import_module("pycuda.driver")
|
||||
self.clear_context_caches = getattr(import_module("pycuda.tools"),
|
||||
"clear_context_caches")
|
||||
self.source_module = getattr(import_module("pycuda.compiler"), "SourceModule")
|
||||
self.drv.init()
|
||||
|
||||
@@ -786,7 +788,9 @@ class CUDAUpdates:
|
||||
"""Cleanup GPU context."""
|
||||
# Remove context from top of stack and delete
|
||||
self.ctx.pop()
|
||||
del self.ctx
|
||||
self.ctx = None
|
||||
self.clear_context_caches()
|
||||
|
||||
|
||||
|
||||
class OpenCLUpdates:
|
||||
|
在新工单中引用
屏蔽一个用户