你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-08 15:27:57 +08:00
Tidy memory info printing for OpenCL
这个提交包含在:
@@ -346,12 +346,12 @@ class ModelBuildRun:
|
||||
self.write_output_data()
|
||||
|
||||
# Print information about memory usage and solving time for a model
|
||||
# Add a string on GPU memory usage if applicable
|
||||
mem_str = (
|
||||
f" host + ~{humanize.naturalsize(solver.memused)} GPU"
|
||||
if config.sim_config.general["solver"] == "cuda"
|
||||
else ""
|
||||
)
|
||||
# Add a string on device (GPU) memory usage if applicable
|
||||
mem_str = ""
|
||||
if config.sim_config.general["solver"] == "cuda":
|
||||
mem_str = f" host + ~{humanize.naturalsize(solver.memused)} device"
|
||||
elif config.sim_config.general["solver"] == "opencl":
|
||||
mem_str = f" host + unknown for device"
|
||||
|
||||
logger.info(f"\nMemory used (estimated): " + f"~{humanize.naturalsize(self.p.memory_full_info().uss)}{mem_str}")
|
||||
logger.info(
|
||||
|
@@ -1316,9 +1316,8 @@ class OpenCLUpdates:
|
||||
Returns:
|
||||
Memory (RAM) used on compute device.
|
||||
"""
|
||||
# if iteration == self.grid.iterations - 1:
|
||||
# return self.drv.mem_get_info()[1] - self.drv.mem_get_info()[0]
|
||||
logger.debug("Look at memory estimate for pyopencl")
|
||||
# No clear way to determine memory used from PyOpenCL unlike PyCUDA.
|
||||
pass
|
||||
|
||||
def calculate_solve_time(self):
|
||||
"""Calculates solving time for model."""
|
||||
|
在新工单中引用
屏蔽一个用户