最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Running two subprocesses together - Stack Overflow

programmeradmin2浏览0评论

I need to gather some performance data on some GPU renders in Blender, some of these are very short, like under 5 seconds. I currently run the render via my benchmarking script like so:

render_command_to_run = '{} {} --background --python {} -- --number {} --save {}'.format(
            render_executable, file_to_render, massager_script, num_spheres, new_filename_full_path)

Which basically launches Blender in headless mode to run a render. In order to gather some performance data, I'm using nvidia-smi in another terminal like so:

nvidia-smi --query-gpu=memory.used --format=csv -l 1

and gathering what I need that way, but I would ideally like to have this run as a python subprocess while the other is running so that I can parse the output as needed. How can I do that?

发布评论

评论列表(0)

  1. 暂无评论